Original "Simple" debricking methods for K5-Touch, K4-Mini, & K3-Keyboard
UPDATE: This method has been expanded to use a simpler inclusive semi-automated framework featuring a bootable CD, in a new sticky thread. Please try ixtab's KUBRICK tools first: https://www.mobileread.com/forums/sho...d.php?t=206064
NOTE: Before debricking, CHARGE THE BATTERY ON A WALL CHARGER FOR 20 HOURS! Seriously. We have been plagued with too many recent reports of "bricked" kindles that only had a battery so discharged that it could only be charged slowly (20 hour charge curve). After charging, either the kindle works as-is, or at least debricking will function correctly.
UPDATE: We now have Kubrick, a LiveCD to debrick Kindle 3, Kindle 4 and Kindle Touch. It means you do not need to install Linux to use the Linux debricking tools. More news (and download link) for this awesome debricking tool here:
UPDATE: Good news for Paperwhite owners! A PW has been debricked from the dreaded "Your Kindle Needs Repair" screen! Nice job kaznelson!
UPDATE: Awesome news! Thanks to eureka, we now have a custom u-boot that can be loaded and run from MfgTool or the command-line usb downloader tool, which contains fastboot protocol. This will be a HUGE help when debricking kindles that have a completely erased mmc! Check it out:
UPDATE: There is a cross-platform replacement for MfgTool (imx_usb_loader command-line tool). You can get it from the "references and Links" section below.
UPDATE: To clarify our goals, we have renamed "forensic images" to "debricking repair images". Please edit your old posts to change "forensic" to "debricking repair". Thank you. :thumbsup:
NOTE: When flashing "debricking repair images", be sure to use matching partition and kernel versions to prevent problems. Read this for kernel version compatibility details:
Definitions: Kindle model name K5 is also known as Touch, KT, or KTouch. Model name K4 is also known as K4NT, K4 Non-Touch, K4S (silver) or K4B (black). Model K3 is also know as K3G, Kindle 3G, or Kindle Keyboard. The words debrick and debricking can also be called unbrick, unbricking, recover, recovery, repair, repairing, restore, restoring, restoration, or brick fix. :bookworm:
I have posted this information in various forms to multiple threads, but it keeps getting missed by those who need it, so it is being place in its own thread, in hopes that it will be noticed by those who need it. SUMMARY: You should be able to recover from most K4/K5 bricking situations by using MfgTool to get to fastboot mode, then using fastboot to flash mmcblk0p2_ssh.img to the diags partition, then booting diags and exporting the USB drive to copy mmcblk0p1 on it, then starting an SSH shell and using dd to copy the /mnt/us/mmcblk0p1.img to /dev/mmcblk0p1, then finally by running the factory_restore script. The K3 uses different tools to achieve the same results by also flashing a known-good firmware image (see K3 USB debricking links below for details).
DETAILS: You can now download an mmcblk0p2_ssh.img.gz file from the "debricking repair images" link below. It adds the missing USBnet dropbear SSH files to an otherwise unchanged diags partition. This lets you SSH in from the Diagnostics menu and fix or restore your bricked main system partition from the linux command line. A similar method can be used with a K4, which already has SSH built into the diags partition, so NO need to reflash mmcblk0p2 on a K4.
The following instructions are for a linux host PC. For windows, you need to adapt them.
Follow the instructions in the "Select Boot" thread to get your bricked kindle into fastboot mode.
Or, if you want to mount the main system drive and repair individual files on it, then do:
mount /dev/mmcblk0p1 /mnt/mmc
With the main system partition mounted, you can then repair or replace damaged or missing files in /mnt/mmc/ (which is the mounted writeable main system partition).
If your kindle still will not boot to the main system framework, then your /var/local partition may be damaged or full. To reset it do this:
dd if=/dev/zero of=/dev/mmcblk0p3 bs=4K count=1K
That last step above successfully recovered multiple "difficult" kindles recently, when they still would not boot to the main system partition after doing the previous steps. Resetting /var/local will erase your collections database, so you may want to backup files in /var/local before resetting it.
This is documented in the "Select Boot" and "Fastboot Manifesto" threads (see links provided below).
(...and others in PMs, IRC, and countless "lurkers"... :D)
:sunny: Past and Future History
Spoiler:
This was copied from another thread in another forum, but I think it really belongs here. So here it is. :D
Quote:
Originally Posted by ixtab
(Post 2170823)
geekmaster pretty much invented this method, so he knows it inside and out :D
Actually, I gave credit to yifanlu for the original push in the right direction (as can be seen in gray at the bottom of first "simple debricking" post). After all, it was his "slip of the finger" that discovered the "magic key" for USB Downloader mode on the K4, and how to boot a custom u-boot from USB using that special mode. Together, we worked out how to use it to get my SEVERELY bricked K4 (with internal serial port pads ripped loose from the circuit board) working again during an IRC session spread out over a week. If not for my bricked K4 with a dead serial port, this method may not have become available to all those who used it successfully, and a lot of dead kindles would still be sitting in drawers and closets around the world. So my bricked and damaged K4 should also share credit for this "simple debricking" method. :D
Of course, it took a HUGE effort on the part of myself and others to gather all the tools together and grow it, organize it, simplify it, and document it for use by beginners. As measured by download counts of tools and debricking repair images, the "success reports" list is only about ONE PERCENT of all those who appear to have used this method.
The "simple debricking" method is also being used almost as a "routine step" in the development process by some developers now, and it is also being used to "downgrade" to previous firmware versions, and to install firmware that already has jailbreak and popular hacks pre-installed.
And this "simple debricking" method will get even simpler and more powerful when yifanlu completes his "one-click" project that will integrate these protocols, tools and steps into a single easy-to-use program that can be used for much more than "simple debricking".
And now hawhill has extended this "simple debricking" method to work on the K3 too, using the ATK (Advanced ToolKit) to replace "MfgTool" and "fastboot", and he is also working on a simple easy-to-use custom program to replace ATK. EDIT: Done! Check out hawhill's k3flasher tool.
We can look forward to more powerful and simpler tools and methods in the future. Thanks guys! :thumbsup:
P.S. We need to thank yifanlu for getting us started on the right path. :thumbsup:
perzer
03-03-2012 06:15 AM
Thanks! You are good!
geekmaster
03-03-2012 09:39 AM
Quote:
Originally Posted by perzer
(Post 1989255)
Thanks! You are good!
Of course I am good :D -- my role models while I was growing up were Jesus Christ (for compassion and kindness) and Spock from Startrek (for hard science and the analytical approach). I selected other role models as well, but those two stand well above all the rest. :thumbsup:
And thank you for the positive feedback. It is good to know that my posts are appreciated enough to make it worth the effort for me to continue to contribute my valuable and limited time to these forums.
Poetcop
03-03-2012 11:09 AM
Amazing work! I wish I'd waited for this, I'll bet it would have fixed mine up in its earlier, non-black-screen-of-death state immediately!
geekmaster
03-03-2012 12:04 PM
Quote:
Originally Posted by Poetcop
(Post 1989457)
Amazing work! I wish I'd waited for this, I'll bet it would have fixed mine up in its earlier, non-black-screen-of-death state immediately!
You should be able to recover from that "black death" by using MfgTool to get to fastboot mode, then using fastboot to flash mmcblk0p2_ssh.img to the diags partition, then booting diags and exporting the USB drive to copy mmcblk0p1 on it, then starting an SSH shell and using dd to copy the /mnt/us/mmcblk0p1.img to /dev/mmcblk0p1, then finally by running the factory_restore script.
I pretty much described the entire recovery process for even a severely bricked kindle in that one sentence. It takes a little linux knowledge to fill in the missing details.
thomass
03-03-2012 03:22 PM
Thanks for this. :)
Finally we have a well described way to fix Touch.
(BTW: links to the corresponding threads are missing here :rolleyes:)
geekmaster
03-03-2012 04:05 PM
Quote:
Originally Posted by thomass
(Post 1989723)
Thanks for this. :)
Finally we have a well described way to fix Touch.
(BTW: links to the corresponding threads are missing here :rolleyes:)
It takes a lot of study and experimentation with feedback from many people, to simplify a previously very complex procedure that requires significant technical expertise, to the point where it fits into a single page of text and can be followed by people with limited technical abilities, the result of which can be seen in the first post in this thread.
And now, that first post (above) even contains those mysterious "missing links".
thomass
03-03-2012 05:16 PM
Quote:
Originally Posted by geekmaster
(Post 1989766)
And now, that first post (above) even contains those mysterious "missing links".
It seems to me that you get me wrong.If this is not the case please ignore this. My only concern is to have " everything" in one single post to reference it later.
Thanks again for your efforts on this so far. ( I'm the first person who unbricked his Touch with your new tool and really thankful for that)
hawhill
03-03-2012 05:24 PM
@geekmaster: Nice. I think a short note on unmounting should be added. Otherwise, some repair tries might fail - depending on how the device is being restarted. Another thing would be a short information that in the case of dd'ing a backup image no mounting is needed (and might even be harmful).
geekmaster
03-03-2012 09:13 PM
Quote:
Originally Posted by thomass
(Post 1989824)
It seems to me that you get me wrong.If this is not the case please ignore this. My only concern is to have " everything" in one single post to reference it later.
Thanks again for your efforts on this so far. ( I'm the first person who unbricked his Touch with your new tool and really thankful for that)
That was meant to be a humorous (funny / comedy) comment. Humor often does not translate well to other cultures. What was meant is that I think your idea was a good one, and I added the links that you suggested to the first post. Sorry to cause confusion. And thank you for the suggestions.
geekmaster
03-03-2012 09:16 PM
Quote:
Originally Posted by hawhill
(Post 1989832)
@geekmaster: Nice. I think a short note on unmounting should be added. Otherwise, some repair tries might fail - depending on how the device is being restarted. Another thing would be a short information that in the case of dd'ing a backup image no mounting is needed (and might even be harmful).
Agreed. I am trying to keep the amount of typing to an absolute minimum here, for people intimidated by the shell scripts and the linux command line. I recommend a proper shutdown rather than a hard reset whenever possible, so the system has an opportunity to unmount the disks cleanly.
I do not know if it would be better to tell people to always unmount the disk, or just unmount it before doing a hard reset. The problem is that if you document all the corner cases, it begins to look like the posts that this simplified version was meant to replace. EDIT: Rather than specifically saying to unmount it, I changed the order of restoring, and mount and repair, to eliminate that confusion.
Poetcop
03-03-2012 10:12 PM
Quote:
Originally Posted by geekmaster
(Post 1989526)
You should be able to recover from that "black death" by using MfgTool to get to fastboot mode, then using fastboot to flash mmcblk0p2_ssh.img to the diags partition, then booting diags and exporting the USB drive to copy mmcblk0p1 on it, then starting an SSH shell and using dd to copy the /mnt/us/mmcblk0p1.img to /dev/mmcblk0p1, then finally by running the factory_restore script.
Great stuff, even more concise! Now I know that my priority should definitely be getting the fastboot tool talking to my Kindle in fastboot mode. (currently can't do it because of that problem with it dropping out when unplugged)
geekmaster
03-03-2012 11:57 PM
Quote:
Originally Posted by Poetcop
(Post 1990056)
Great stuff, even more concise! Now I know that my priority should definitely be getting the fastboot tool talking to my Kindle in fastboot mode. (currently can't do it because of that problem with it dropping out when unplugged)
UPDATE: There is now a fastboot tool for windows, so you can set fastboot mode from MfgTool and then run fastboot from windows, with no risk of fastboot mode dropping out. You can download it here:
I am glad you like it. I added a "generic" verision of it as a "summary" to the top of the first post in this thread.
Regarding dropping out when unplugged, mine does that too. So it would seem that it should not be unplugged then. dasmoover had that problem when moving his kindle between his windows and his linux computers. I do not remember how that was solved, but the complete IRC conversation was placed into a post if you wish to read it to see how he solved that problem. I will go look for it now... EDIT: Found it. Post #87. Some of my threads are getting rather large. Read this:
That's good reading! But it looks like the solution the two of you came up with was to boot into fastboot from diags mode, and diags mode isn't working for me. So I think I will try getting linux running in a virtual machine to run the fastboot tool, unless someone can get the PC fastboot tool working.
I wonder if things would change if I could charge it all the way. It only seems to want to charge when it's in "plug-me-in" mode - no matter what state it's in with a black screen, and whether wall-charger or computer charging, it always seems close to running out of batteries. Of course this would be easier to investigate if I had a way of querying the battery state - very hard to infer from the limited information given by its behaviour.
knc1
03-04-2012 12:15 PM
Quote:
Originally Posted by Poetcop
(Post 1990454)
That's good reading! But it looks like the solution the two of you came up with was to boot into fastboot from diags mode, and diags mode isn't working for me. So I think I will try getting linux running in a virtual machine to run the fastboot tool, unless someone can get the PC fastboot tool working.
I wonder if things would change if I could charge it all the way. It only seems to want to charge when it's in "plug-me-in" mode - no matter what state it's in with a black screen, and whether wall-charger or computer charging, it always seems close to running out of batteries. Of course this would be easier to investigate if I had a way of querying the battery state - very hard to infer from the limited information given by its behaviour.
The few compile command lines I have seen scattered around the site showed the reference of MaxOSx USB libraries.
Not gonna work on Linux like that, would need the corresponding Linux USB libraries instead.
In advance of the question: No, I don't know which libraries. I have not (yet) tried to build it myself.