![]() |
#1 |
but forgot what it's like
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 741
Karma: 2345678
Join Date: Dec 2011
Location: north (by northwest)
Device: Kindle Touch
|
[Kindle Touch] Boot over USB HID serial / "USB downloader" mode
While poking with my "bricked" Kindle Touch, I've found a way to enable "USB downloader" boot mode of Freescale i.MX508 MCU used in a device.
When mode is enabled, Kindle is recognized as USB HID device with VID 0x15A2 and PID 0x0052. It should be possible to connect to it via custom Serial Download Protocol designed by Freescale and described in MCU Reference Manual. Protocol allows to read/write memory, upload program image into RAM and start executing at given address. (More info has been dumped to wiki page about Kindle Touch hacking). To enable this mode one should perform "hard reset" with pressed Home button. Hold Home button, then perform "hard reset" by holding Power button for 20 seconds and releasing it. Then wait about a second or two and release Home button. That's all. It's easier to follow with Kindle connected to computer. After 20 seconds of holding Power button, Kindle USB disk should be detached from computer. It's time to release Power button. Then Kindle should be recognized as USB HID device. Now Home button could be released. With loading arbitary code to RAM and executing it, this mode could be used as base for the ultimate unbricking solution, so I'm pretty excited about it. But it could be just a useless discovery if any restrictions will be revealed in further exploration. Anyway, it is of no value for ordinary user right now. |
![]() |
![]() |
![]() |
#2 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 84
Karma: 26720
Join Date: Mar 2011
Device: Kindle 3 WIFI
|
Thank you very much for this information, I wonder if I can get my bricked touch working.
|
![]() |
![]() |
![]() |
#3 |
Kindle Dissector
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 662
Karma: 475607
Join Date: Jul 2010
Device: Amazon Kindle 3
|
Awesome! Does the diags option "USB download" do the same thing? I was afraid to choose it because I may not be able to get back into normal mode.
|
![]() |
![]() |
![]() |
#4 |
Carpe diem, c'est la vie.
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
When I tried that a couple of days ago, Windows automatically installed two different HID device drivers for it. They must be built into Windows XP. I also downloaded some tools and source code to use it.
There was a discussion about which software tools may be used with this mode on the IRC channel. IRC archive here: http://kindle-synchrone.dotcloud.com Last edited by geekmaster; 12-27-2011 at 04:21 PM. |
![]() |
![]() |
![]() |
#5 |
Kindle Dissector
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 662
Karma: 475607
Join Date: Jul 2010
Device: Amazon Kindle 3
|
If you read iMX's documentions about running android on iMX cpus, one of the step involves flashing the bootloader, ramdisk, kernel, and other partitions using the iMX tool. Just saying.
|
![]() |
![]() |
![]() |
#6 |
Junior Member
![]() Posts: 1
Karma: 10
Join Date: Dec 2011
Device: kt
|
Is this means we can boot android or linux from tftp and NFS without break kindle's file system?
see 3.3.2 Boot from TFTP and NFS http://reviews.androids.name/2011/03...ual-very-good/ I have download the demo from http://www.freescale.com/webapp/sps/...?code=IMX50_SW |
![]() |
![]() |
![]() |
#7 | |
Carpe diem, c'est la vie.
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
Quote:
Android supports running the system on NFS root file system. You can put the total Android root system into NFS, but you need to load the kernel image from the TFTP server. Therefore, you must have a PC that has NFS and TFTP servers, with their root directory set up correctly, that is, /opt/tftproot for TFTP root, and /opt/nfsroot for NFS root. That looks pretty exciting to me! Besides being a potential recovery method, it may be usable for other things if needed later (mp3 replacement, for example). Last edited by geekmaster; 12-28-2011 at 12:33 AM. |
|
![]() |
![]() |
![]() |
#8 |
Carpe diem, c'est la vie.
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
For anybody following this thread, I started a new thread where you can see my progress with the things that interested me in the post above:
https://www.mobileread.com/forums/sho...d.php?t=169645 Most importantly, I am providing tools to recover bricked kindles, which have been used successfully by mutliple kindle owners. I am also working on extensions to this for root access, jailbreak, and application installations. I plan to provide support for Kindle 3 and earlier as well. |
![]() |
![]() |
![]() |
#9 | |
Going Viral
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Quote:
My reasoning on that: Code:
root:k321# ls -l etc/udev/rules.d total 15 lrwxrwxrwx 1 root root 32 May 6 2011 10-hw.rules -> /etc/udev/rules.d/XX-mario.rules That should be /etc/udev/XX-mario.rules - but that is lab126's problem. Code:
root:k321# less etc/udev/rules.d/XX-mario.rules - - - big snip - - - # USB notifications KERNEL=="arc_udc", RUN+="/lib/udev/bin/notifyusb" KERNEL=="g_file_storage", RUN+="/lib/udev/bin/notifyusb" KERNEL=="g_ether", RUN+="/lib/udev/bin/notifyusb" KERNEL=="g_serial", RUN+="/lib/udev/bin/notifyusb" Code:
root:cat$ grep 'XX-mario.rules' Amazon_2012.02.18_sha1.cat root:cat$ include with a specific model/system-version. Anyway - What that says is the USB port is put into 'serial mode' on the loading of the kernel's g_serial module. Note: The Kindle-3.2.1 system build does not include usb_modeswitch, might be a nice thing to add to the system images. Last edited by knc1; 02-23-2012 at 01:10 PM. |
|
![]() |
![]() |
![]() |
#10 |
Going Viral
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Hmm...
Only two versions of udev in the Kindles (udev v-1.1.2 and udev v-1.4.6) no mention of the modified configuration rules (which may be a violation of section 3 of the gpl). Code:
root:cat$ grep 'rules.d/' Amazon_2012.02.18_sha1.cat | sort >rules.d.txt |
![]() |
![]() |
![]() |
#11 | |
Going Viral
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Quote:
What that says is that it sends an even notification using lipc to anything that is listening for the event. ![]() (Contractors often do that, re-invent standard software - it pays more.) But the root cause is the same, loading of the kernel module. Don't see anything in the gaget driver itself that sets the line speed: Code:
root:k321$ modinfo ./lib/modules/2.6.26-rt-lab126/kernel/drivers/usb/gadget/g_serial.ko filename: ./lib/modules/2.6.26-rt-lab126/kernel/drivers/usb/gadget/g_serial.ko license: GPL author: Al Borchers description: Gadget Serial depends: arcotg_udc vermagic: 2.6.26-rt-lab126 mod_unload modversions ARMv6 parm: read_q_size:Read request queue size, default=32 (uint) parm: write_q_size:Write request queue size, default=32 (uint) parm: write_buf_size:Write buffer size, default=8192 (uint) parm: use_acm:Use CDC ACM, 0=no, 1=yes, default=no (uint) and I don't recall what those limits where in this old a kernel version. EDIT: Hmm... Since that module depends on (and modprobe will thus pre-load it) arcotg_udc, and there is a udev notification for that event (the loading of the dependant module).... Anything listen for either (or both) events should certainly "get the word" (msg). Last edited by knc1; 02-23-2012 at 01:14 PM. |
|
![]() |
![]() |
![]() |
#12 |
Carpe diem, c'est la vie.
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
The source code files for 4.0 and 4.0.1 have same length and md5sum so no need to catalog both of them.
The source code files for 5.0.0 and 5.0.3 have same length and md5sum so no need to catalog both of them. |
![]() |
![]() |
![]() |
#13 | |
Carpe diem, c'est la vie.
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
Quote:
Did I miss something here? |
|
![]() |
![]() |
![]() |
#14 | |
Going Viral
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Quote:
Plus, some of the terms get handed around like a cheap wh.... Here, this may help: http://cgit.openembedded.org/openemb...enembedded.dev And click 'files' in the breadcrumb trail to get at the init and config files. An example of a worked script to handle them all in the general case. Last edited by knc1; 02-25-2012 at 02:15 PM. |
|
![]() |
![]() |
![]() |
#15 | |
Carpe diem, c'est la vie.
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
Quote:
But now that we know that kindles have OTG external USB ports, we can use USB keyboards when we figure out how to switch modes. ![]() Last edited by geekmaster; 02-25-2012 at 03:05 PM. |
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
"Displaygetauschter" 302 lässt sich nicht mehr per USB verbinden | lp344 | PocketBook | 29 | 09-15-2010 01:55 AM |
"USB Memory Stick Blank or using unsupported filesystem" | P.J. | enTourage Archive | 6 | 04-07-2010 11:28 AM |
Building USB HID modules for 2.4.19-rmk7 | hudson | iRex | 38 | 12-05-2009 03:05 AM |
New PRS-700: "USB Device Not Recognized" -- HELP! | Cyrusx7 | Sony Reader | 13 | 09-10-2009 12:38 AM |
My Sony Reader only shows: "USB connected" | luisbeltran | Sony Reader | 12 | 02-20-2009 10:15 PM |