Register Guidelines E-Books Search Today's Posts Mark Forums Read

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

Notices

Reply
 
Thread Tools Search this Thread
Old 02-27-2012, 08:15 PM   #46
Nyoxi
Connoisseur
Nyoxi can talk all four legs off a donkey... then persuade it to go for a walk.Nyoxi can talk all four legs off a donkey... then persuade it to go for a walk.Nyoxi can talk all four legs off a donkey... then persuade it to go for a walk.Nyoxi can talk all four legs off a donkey... then persuade it to go for a walk.Nyoxi can talk all four legs off a donkey... then persuade it to go for a walk.Nyoxi can talk all four legs off a donkey... then persuade it to go for a walk.Nyoxi can talk all four legs off a donkey... then persuade it to go for a walk.Nyoxi can talk all four legs off a donkey... then persuade it to go for a walk.Nyoxi can talk all four legs off a donkey... then persuade it to go for a walk.Nyoxi can talk all four legs off a donkey... then persuade it to go for a walk.Nyoxi can talk all four legs off a donkey... then persuade it to go for a walk.
 
Posts: 55
Karma: 124493
Join Date: Jan 2012
Device: Kindle Touch
Yes there are patches for wine (on the page hawhill pointed to: "Download patches for your Wine version from ftp://ftp.etersoft.ru/pub/people/amorozov/usb"). I tried them with sb_loader without success. I didn't try with MfgTool though.
Nyoxi is offline   Reply With Quote
Old 02-27-2012, 08:17 PM   #47
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
It was only a suggestion, thought it might be worth offering, not intended to offend anyone.
knc1 is offline   Reply With Quote
Old 02-27-2012, 08:46 PM   #48
geekmaster
Carpe diem, c'est la vie.
geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.
 
geekmaster's Avatar
 
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
Quote:
Originally Posted by Nyoxi View Post
Yes there are patches for wine (on the page hawhill pointed to: "Download patches for your Wine version from ftp://ftp.etersoft.ru/pub/people/amorozov/usb"). I tried them with sb_loader without success. I didn't try with MfgTool though.
For that matter, I have had no success with sb_loader in Windows XP either. Not even the one that comes precompiled, with the MfgTool you can download with i.MX50 profiles.

I also compiled it from source, and that was not working either, so I am not very surprised that Linux can be included in the list of systems it does not work on.

MfgTool does come with source code, but a much more restrictive license than sb_loader. At least it works on windows.
geekmaster is offline   Reply With Quote
Old 02-27-2012, 09:05 PM   #49
Poetcop
Connoisseur
Poetcop began at the beginning.
 
Posts: 55
Karma: 46
Join Date: Feb 2012
Device: Kindle
Quote:
Originally Posted by geekmaster View Post
WARNING: Although fastboot seems to flash partitions correctly on a K4NT, according to serial port messages while flashing various partitions on the Touch, it always writes to mmcblk0 instead, which destroys the linux kernels for both the main and diags partitions. More evidence is that after I flashed mmcblk0p4 with a "filled in" version (I cannot export the USB drive), it now reports "cannot find linux kernel" when trying to boot main or diags. Both linux kernels are in mmcblk0p1, which is what appears to get damaged when you try to flash anything else. This is also probably why it finishes so quickly.
Ok! So this is now the most plausible explanation for my Kindle's symptoms following running "sudo ./fastboot erase data". Which to recap, are a completely black screen and no USB drive, which goes into HID mode and responds to the MfgTool but doesn't go into diagnostic mode, and shows signs of going into fastboot mode but doesn't respond to the fastboot tool. Instead of erasing /var/local (to repair a full /var/local/) perhaps that command blitzed those two partitions, main and diags. Not sure about the fastboot symptom. So it's in pretty bad shape, but I'm hoping there is still something I can try using MfgTool - which is, again, literally the only way I can communicate with the Kindle at this point. (barring perhaps the serial port)

Thanks for the tip about power - I bought a power adapter and charged it overnight and now it doesn't keep going to the charging screen. Interestingly, it only seems to charge on the charging screen and when the kindle is turned off, not in black screen mode). No other changes in behaviour, but given the symptoms you describe that could easily have been the problem so good to rule it out.
Poetcop is offline   Reply With Quote
Old 02-27-2012, 09:12 PM   #50
Poetcop
Connoisseur
Poetcop began at the beginning.
 
Posts: 55
Karma: 46
Join Date: Feb 2012
Device: Kindle
Quote:
Originally Posted by hostar View Post

Good point

EDIT: attachment contains linux and windows fastboot binary
Thanks for doing this hostar! The makefile didn't work for me in MinGW on Windows XP, I got "usb_windows.c:32:20: fatal error: usb100.h: No such file or directory" (I'm sure this is something obvious) but the binary seems to. I say seems to because I'm still not able to connect in fastboot mode, but the < waiting for device > message matches that of the linux version. It definitely helped me to rule out one possibility.
Poetcop is offline   Reply With Quote
Old 02-27-2012, 09:15 PM   #51
geekmaster
Carpe diem, c'est la vie.
geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.
 
geekmaster's Avatar
 
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
MfgTool can recover any kindle that is not physically broken. You just need to be patient while we get all the pieces in place to do this. My kindle can boot into fastboot because I have done damaged fastboot stored on the mmc (yet).

With the right profiles, MfgTool can flash partitions from images just like fastboot, but by using the USB Downloader mode, instead of a flashboot module inside bist u-boot saved on the mmc.

fastboot is simpler and runs on more devices, but it needs firmware support. USB Downloader mode is built in and cannot (afaik) be damaged or removed, but is different for each different processor.
geekmaster is offline   Reply With Quote
Old 02-27-2012, 10:01 PM   #52
Nyoxi
Connoisseur
Nyoxi can talk all four legs off a donkey... then persuade it to go for a walk.Nyoxi can talk all four legs off a donkey... then persuade it to go for a walk.Nyoxi can talk all four legs off a donkey... then persuade it to go for a walk.Nyoxi can talk all four legs off a donkey... then persuade it to go for a walk.Nyoxi can talk all four legs off a donkey... then persuade it to go for a walk.Nyoxi can talk all four legs off a donkey... then persuade it to go for a walk.Nyoxi can talk all four legs off a donkey... then persuade it to go for a walk.Nyoxi can talk all four legs off a donkey... then persuade it to go for a walk.Nyoxi can talk all four legs off a donkey... then persuade it to go for a walk.Nyoxi can talk all four legs off a donkey... then persuade it to go for a walk.Nyoxi can talk all four legs off a donkey... then persuade it to go for a walk.
 
Posts: 55
Karma: 124493
Join Date: Jan 2012
Device: Kindle Touch
Quote:
Originally Posted by geekmaster View Post
For that matter, I have had no success with sb_loader in Windows XP either.
What exactly you mean by "no success" -- it did not detect the USB device, or you were not able to upload and execute the image? For me sb_loader could detect the device but uploading and executing the image didn't seem to work. On the other hand under wine with the usb patches compiled in th sb_loader couldn't detect the USB device. From that I assume that the usb code in wine isn't working, at least not at the level we need it to. So I guess MfgTool won't work either. But who knows, maybe it uses some other way windows specific way of accessing the USB.
Nyoxi is offline   Reply With Quote
Old 02-27-2012, 10:38 PM   #53
geekmaster
Carpe diem, c'est la vie.
geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.
 
geekmaster's Avatar
 
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
Even in windows, I can upload an image and sb_loader says it runs, but it does not run. One example is my custom u-boot images. There is no output to the serial port and they do not boot, when I use sb_loader. There is a lot of information on the net about .sb files needing to be signed with the "all zeroes" key. Perhaps it wants signed firmware images.

What I was getting at in the previous post was that I am not surprised that the linux version does not work better than the Windows version. It sounds from your details that the linux and windows versions act the same.

Yifanlu reported success using this same sb_loader, so perhaps the file format needs to be different from modules that MfgTool needs or something. I asked yifanlu on the IRC channel how he got it working, but I got no answer. I wonder if sb_loader is expecting a different file format or something (.sb format).

I have an sbloader for linux from RockBox I have been tweaking (mostly to display status messages). It communicates with the device, but not enough yet to send an image to it. it uses libusb-1.0. It is a single monolithic C program (no modules other than main). The comments say it is a stripped down version of the freescale sb_loader. I need to tweak the protocol more, but not enough time spent with it yet.

Last edited by geekmaster; 02-27-2012 at 10:45 PM.
geekmaster is offline   Reply With Quote
Old 02-27-2012, 11:46 PM   #54
sjheiss
Connoisseur
sjheiss began at the beginning.
 
Posts: 58
Karma: 26
Join Date: Dec 2011
Device: K3G, KF2
Geekmaster, I just wanted to say that from reading what you post, you are an amazing developer, so props to you.

I read through this thread and found it very interesting, even though my Kindle is not bricked.

Also (not that I'm asking), it would be great to see if someone will port an Android OS to the Kindle. Only time will tell.
sjheiss is offline   Reply With Quote
Old 02-28-2012, 12:55 AM   #55
hostar
Zealot
hostar is a glorious beacon of lighthostar is a glorious beacon of lighthostar is a glorious beacon of lighthostar is a glorious beacon of lighthostar is a glorious beacon of lighthostar is a glorious beacon of lighthostar is a glorious beacon of lighthostar is a glorious beacon of lighthostar is a glorious beacon of lighthostar is a glorious beacon of lighthostar is a glorious beacon of light
 
Posts: 138
Karma: 12324
Join Date: Dec 2011
Location: CZ
Device: Kindle 4 non-touch
Quote:
Originally Posted by Poetcop View Post
I say seems to because I'm still not able to connect in fastboot mode, but the < waiting for device > message matches that of the linux version.
Actually, as I remember, I haven't managed to run Windows version properly, it was still in <waiting for device>, as you say. But on linux under sudo it worked, so at least something
hostar is offline   Reply With Quote
Old 02-28-2012, 01:11 AM   #56
geekmaster
Carpe diem, c'est la vie.
geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.
 
geekmaster's Avatar
 
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
Woohoo! I have it all figured out! I recovered my touch with fastboot!

I used the serial port ONLY to see what I was doing. You do not need it to repair the kindle.

You can ignore those serial I/O messages. *Something* killed my kernels, either when I tried to erase user data, or flash mmcblk0p4.

But, I extracted the main and diags kernels from my mmcblk0.img file, and I flashed them with fastboot. I could see by the serial port messages when booting diags and main that the main and diags partitions were damaged to, so I flashed with with fastboot as well from the dasmoover debricking repair images.

Although fastboot reported success writing mmbclk0p1.img, and much too quickly, the serial console told why. It said it the image was too being truncated to a smaller size. Apparently fastboot mode has a maximum file size just like USB Downloader mode, and that main system partition is too big!

Lucky for us, the diags partition is small enough to flash with fastboot. I flashed diags with no serial port error messages.

I did "sudo ./fastboot setvar bootmode diags", and
"sudo ./fastboot reboot", and it booted to diags. It took quite awhile because serial port messages said it was testing and rebuilding a bunch of stuff, including the FAT32 partition and /var/local.

In diags I exported the USB drive, then copied the mmcblk0p1.img that was too big for fastboot to the USB drive, and my data.tar.gz, and a RUNME.sh that does "dd if=/mnt/us/mmcblk0p1.img of=/dev/mmcblk0p1 bs=1024", and I added an ENABLE_DIAGS to the USB drive too.

ENABLE_DIAGS is important, because we must be in diags mode to write mmcblk0p1 successfully. Rebooting will install data.tar.gz, which runs RUNME.sh on the next boot.

After putting all the stuff you need, reboot from the diags menu, which will install data.tar.gz but will not run RUNME.sh. Boot a second time to run RUNME.sh. It is taking a long time to write mmcblk0p1, and I know my battery was low, so I probably need to recharge it in fastboot mode and try again after a few hours of recharging. If you read the IRC chat with dasmoover, you can see that he had this problem, but things went well after recharging the battery.

Anyway, other than a low battery at this point, my touch boots to diags and runs my RUNME.sh scripts. I will let my script run a few more minutes, then recharge the battery in fastboot mode, then try again later. I am quite sure it will complete restoring mccblk0p1 with a full charge, like it did for dasmoover.

Update: It completed. I took about 30 minutes to finish copying mmcblk0p1 with bs=1024...
It all works now, but I had to crack dasmoovers root password from his image file. ;-)
And after booting to main, it is sitting at the factory screen telling where the touch zones are...


I will provide more RUNME.sh scripts to install various options, and a program that builds a RUNME.sh for you depending on the options that you select.

I will also write a simple step-by-step guide.

But for those who want to do as I did, just do as I did.

Last edited by geekmaster; 03-10-2016 at 03:23 PM. Reason: Rename "forensic" to "debricking repair" per ixtab.
geekmaster is offline   Reply With Quote
Old 02-28-2012, 03:10 AM   #57
geekmaster
Carpe diem, c'est la vie.
geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.
 
geekmaster's Avatar
 
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
My recovered kindle touch registered with amazon, and now it has special offers again. I suppose I need to erase my mmc when I do the step-by-step documentary video...

The keys are MfgTool to get to fastboot, fastboot to flash all but mmcblk0p1, diags to export USB drive and add ENABLE_DIAGS and other recovery files, data.tar.gz to get to RUNME.sh (after rebooting), and RUNME.sh in diags mode (after rebooting again) to copy mmcblk0p1.img from usb drive to UNMOUNTED main partition.

The real secret to success is NOT writing data to a partition with open files (i.e. not booted). And not trusting fastboot that says it truncated the "too big" partition 1 image and still returns "success" (quickly)...

The first boot installs the data.tar.gz payload. The second reboot runs RUNME.sh. Not too difficult. I will try to automate most stuff by preinstalling it in image files. Jailbreak and developer keys will already be in the main boot image. dropbear will already be in both main and diags boot images. The root password will be set to a safe default (or an identical no-salt DES like the original will be computed and updated during the RUNME.sh phase).

At some point, when the overlay file system is ready for "prime time", we can have that preinstalled to.

What other hacks should come preinstalled in our image files? Of course, the hack parts that go on the usb drive will be put there during the RUNME.sh phase. And the data.tar.gz can probably put all the files on the usb drive except itself. RUNME.sh can change bootmode and reboot automatically as needed. Because writing the main boot partition can take up to a half hour (like mine did, probably because the battery was low), I thing a background process keeping a progress bar active on the display would be good too -- it could be a simple countdown timer based on estimated time (30 minutes?).

Last edited by geekmaster; 02-28-2012 at 03:25 AM.
geekmaster is offline   Reply With Quote
Old 02-28-2012, 08:14 AM   #58
murz_07
Connoisseur
murz_07 began at the beginning.
 
Posts: 67
Karma: 10
Join Date: Feb 2012
Device: Kindle Touch SO
Hello.
Something is still wrong with my Kindle.
I try to boot it in fastboot mode then "fastboot.exe setvar bootmode diags" and see <waiting for device>.
Why can be wrong?
murz_07 is offline   Reply With Quote
Old 02-28-2012, 08:26 AM   #59
thomass
Wizard
thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.
 
Posts: 1,669
Karma: 2300001
Join Date: Mar 2011
Location: Türkiye
Device: Kindle 5.3.7
Quote:
Originally Posted by geekmaster View Post
.... when I do the step-by-step documentary video......
.......

..... I will try to automate most stuff by preinstalling it in image files. ......

...........
Thanks for your all efforts.
thomass is offline   Reply With Quote
Old 02-28-2012, 09:13 AM   #60
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by geekmaster View Post
What other hacks should come preinstalled in our image files?
Re-built Busybox with inetd enabled.

It would be better to use auFS than the posted "file overlay hack" but the kernel(s) in the Kindle(s) are too old for that.
Using auFS requires a newer kernel (a big project, even if only considering the testing that is involved) so that can wait for a later release of the "restore it" tool.

Last edited by knc1; 02-28-2012 at 09:15 AM.
knc1 is offline   Reply With Quote
Reply

Tags
kindle fastboot manifesto

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Simple linux fastboot installing command aditya3098 Kindle Developer's Corner 20 04-23-2019 04:13 PM
Fastboot GUI hostar Kindle Developer's Corner 53 07-31-2017 09:52 AM
Fastboot not working aditya3098 Kindle Developer's Corner 10 05-12-2012 01:44 PM
fastboot for win32 geekmaster Kindle Developer's Corner 30 03-13-2012 02:39 PM
help me get out of fastboot kindle nontouch please 123123 Kindle Developer's Corner 30 02-10-2012 05:14 AM


All times are GMT -4. The time now is 01:31 AM.


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