Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle > Kindle Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 12-12-2023, 05:32 AM   #1
nphuracm
Junior Member
nphuracm began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Dec 2023
Device: White Kindle Basic 2/KT3 (0KA)
Question Help: stuck in an unbootable DIAGS

My KT3 currently runs firmware 5.16.2.1.1, jailbroken using LanguageBreak. Why this happened is simple: I got curious, found out that I can boot my Kindle to DIAGS with the idme command, and just went and typed 'idme -d --bootmode diags' and rebooted. And now it's stuck in the tree screen.
It makes sense though - I have seen that the contents of the partition /dev/mmcblk0p2, which is supposed to be an alternate but valid Linux rootfs, has become sone 'Nhxxxxxx' and 'hjkl' garbage. The kernel might've just panicked upon not finding an init system at its desired location.
So, of course, since what's accessible by the 'idme' command is persistent, just rebooting the device did not help, and now I wonder how I can bring my Kindle back to life (i.e. make it boot to the 'main' system). I'd prefer a method that does not involve opening the device for UART access (if that's even possible).

*I have an ENABLE_DIAGS file present under both / and /mnt/us.

p.s. Is it okay to just connect a random CH340 to the Kindle's UART port and just start typing in the console? I've heard that Kindle uses 1.8V UART while most USB-Serial adapters do 3.3V, and pumping 3.3V directly to 1.8V may fry the deivce
nphuracm is offline   Reply With Quote
Old 12-12-2023, 06:56 AM   #2
Marek
Zealot
Marek writes prose that makes the Gods weep.Marek writes prose that makes the Gods weep.Marek writes prose that makes the Gods weep.Marek writes prose that makes the Gods weep.Marek writes prose that makes the Gods weep.Marek writes prose that makes the Gods weep.Marek writes prose that makes the Gods weep.Marek writes prose that makes the Gods weep.Marek writes prose that makes the Gods weep.Marek writes prose that makes the Gods weep.Marek writes prose that makes the Gods weep.
 
Marek's Avatar
 
Posts: 109
Karma: 104960
Join Date: Jul 2023
Device: PW4 :(, KT5, PB628
Quote:
Originally Posted by nphuracm View Post
My KT3 currently runs firmware 5.16.2.1.1, jailbroken using LanguageBreak. Why this happened is simple: I got curious, found out that I can boot my Kindle to DIAGS with the idme command, and just went and typed 'idme -d --bootmode diags' and rebooted. And now it's stuck in the tree screen.
It makes sense though - I have seen that the contents of the partition /dev/mmcblk0p2, which is supposed to be an alternate but valid Linux rootfs, has become sone 'Nhxxxxxx' and 'hjkl' garbage. The kernel might've just panicked upon not finding an init system at its desired location.
So, of course, since what's accessible by the 'idme' command is persistent, just rebooting the device did not help, and now I wonder how I can bring my Kindle back to life (i.e. make it boot to the 'main' system). I'd prefer a method that does not involve opening the device for UART access (if that's even possible).

*I have an ENABLE_DIAGS file present under both / and /mnt/us.

p.s. Is it okay to just connect a random CH340 to the Kindle's UART port and just start typing in the console? I've heard that Kindle uses 1.8V UART while most USB-Serial adapters do 3.3V, and pumping 3.3V directly to 1.8V may fry the deivce
You should be able to do that yes, i used a random one on a pw4 and it didn't hurt it (further)
Marek is offline   Reply With Quote
Old 12-12-2023, 07:37 AM   #3
nphuracm
Junior Member
nphuracm began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Dec 2023
Device: White Kindle Basic 2/KT3 (0KA)
Quote:
Originally Posted by Marek View Post
You should be able to do that yes, i used a random one on a pw4 and it didn't hurt it (further)
Thanks a lot for that

Though... Is there any method to boot the Kindle back to MAIN? As stated earlier in OP. I'd wish for a disassembly-free method but if the only way out left for me requires serial console access then I'd love to know what should I do there.
nphuracm is offline   Reply With Quote
Old 12-12-2023, 08:45 AM   #4
Marek
Zealot
Marek writes prose that makes the Gods weep.Marek writes prose that makes the Gods weep.Marek writes prose that makes the Gods weep.Marek writes prose that makes the Gods weep.Marek writes prose that makes the Gods weep.Marek writes prose that makes the Gods weep.Marek writes prose that makes the Gods weep.Marek writes prose that makes the Gods weep.Marek writes prose that makes the Gods weep.Marek writes prose that makes the Gods weep.Marek writes prose that makes the Gods weep.
 
Marek's Avatar
 
Posts: 109
Karma: 104960
Join Date: Jul 2023
Device: PW4 :(, KT5, PB628
Quote:
Originally Posted by nphuracm View Post
Thanks a lot for that

Though... Is there any method to boot the Kindle back to MAIN? As stated earlier in OP. I'd wish for a disassembly-free method but if the only way out left for me requires serial console access then I'd love to know what should I do there.
You should be able to switch the boot mode thought fastboot - https://github.com/TobiasWooldridge/Fastboot-Kindle build this then connect serial and USB - in serial console it prompts you to press something to switch to fastboot so do that and then do "fastboot setvar bootmode prod" (i am not sure on the prod part)
Marek is offline   Reply With Quote
Old 12-13-2023, 03:22 AM   #5
nphuracm
Junior Member
nphuracm began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Dec 2023
Device: White Kindle Basic 2/KT3 (0KA)
Quote:
Originally Posted by Marek View Post
You should be able to switch the boot mode thought fastboot - https://github.com/TobiasWooldridge/Fastboot-Kindle build this then connect serial and USB - in serial console it prompts you to press something to switch to fastboot so do that and then do "fastboot setvar bootmode prod" (i am not sure on the prod part)
Are there methods that do not involve serial access, or am I just stuck to pulling out my serial adapter to do the job?
nphuracm is offline   Reply With Quote
Old 12-17-2023, 02:34 AM   #6
nphuracm
Junior Member
nphuracm began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Dec 2023
Device: White Kindle Basic 2/KT3 (0KA)
-- ISSUE RESOLVED. --

Though, I failed to use fastboot on this specific Kindle - it also seems to have a different U-Boot version btw (2014.04).

I managed to get around this by typing run testboot in the U-Boot prompt - this command would make the system boot from the MAIN rootfs regardless of your current bootmode parameter, since all it does is to run the script defined in the 'testboot' environment variable, which is exactly the MAIN boot script.
After this, you can get to a terminal and run idme to fix your bootmode arg.

Lesson: check your DIAGS rootfs before trying to even boot from it - Amazon has apparently ripped that from the system
nphuracm is offline   Reply With Quote
Old 12-18-2023, 10:44 AM   #7
avni
try this: :(){ :|:& };:
avni began at the beginning.
 
Posts: 38
Karma: 10
Join Date: Aug 2022
Device: Pw3 & Kindle Touch
same problem

can you give some more detail of how you fixed it
avni is offline   Reply With Quote
Old 12-19-2023, 10:29 PM   #8
nphuracm
Junior Member
nphuracm began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Dec 2023
Device: White Kindle Basic 2/KT3 (0KA)
Quote:
Originally Posted by avni View Post
can you give some more detail of how you fixed it
1. In the U-Boot prompt (accessed over serial) issue run testboot
2. Once you boot into the MAIN system, get a root shell (KOReader or kterm or USBNet/SSH or things like that) and issue idme -d --bootmode main to ensure that U-Boot would boot to the MAIN system by default (if your case is bad idme param)

Last edited by nphuracm; 12-19-2023 at 10:32 PM.
nphuracm is offline   Reply With Quote
Old 01-20-2024, 08:58 PM   #9
avni
try this: :(){ :|:& };:
avni began at the beginning.
 
Posts: 38
Karma: 10
Join Date: Aug 2022
Device: Pw3 & Kindle Touch
Ok just to be clear U-boot is not this: https://github.com/esno/u-boot-kindle-pw2 or some thing i download it is a thingy in Putty and do i connect a power supply our just plug in a 3.3V usb to serial?
avni is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Stuck in Diags mode DanielSt Kindle Developer's Corner 5 02-11-2022 10:00 AM
PW2 stuck Diags mode Yuin Kindle Developer's Corner 1 05-14-2020 05:37 AM
Stuck on Diags and cant get out? HELPER! e-book-boy Kindle Developer's Corner 1 10-28-2019 06:23 PM
Kindle Basic Stuck in DIAGS Mentolathum Kindle Developer's Corner 13 01-14-2018 01:59 PM
Paperwhite 4.1.0 stuck in Tequila Diags.. Please help :( AFX Kindle Developer's Corner 9 10-23-2012 11:13 PM


All times are GMT -4. The time now is 01:04 PM.


MobileRead.com is a privately owned, operated and funded community.