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 12-26-2011, 07:24 PM   #1
eureka
but forgot what it's like
eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.
 
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.
eureka is offline   Reply With Quote
Old 12-26-2011, 10:08 PM   #2
dasmoover
Connoisseur
dasmoover is not intimidated by interfenestral monkeys.dasmoover is not intimidated by interfenestral monkeys.dasmoover is not intimidated by interfenestral monkeys.dasmoover is not intimidated by interfenestral monkeys.dasmoover is not intimidated by interfenestral monkeys.dasmoover is not intimidated by interfenestral monkeys.dasmoover is not intimidated by interfenestral monkeys.dasmoover is not intimidated by interfenestral monkeys.dasmoover is not intimidated by interfenestral monkeys.dasmoover is not intimidated by interfenestral monkeys.dasmoover is not intimidated by interfenestral monkeys.
 
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.
dasmoover is offline   Reply With Quote
Advert
Old 12-26-2011, 10:27 PM   #3
yifanlu
Kindle Dissector
yifanlu ought to be getting tired of karma fortunes by now.yifanlu ought to be getting tired of karma fortunes by now.yifanlu ought to be getting tired of karma fortunes by now.yifanlu ought to be getting tired of karma fortunes by now.yifanlu ought to be getting tired of karma fortunes by now.yifanlu ought to be getting tired of karma fortunes by now.yifanlu ought to be getting tired of karma fortunes by now.yifanlu ought to be getting tired of karma fortunes by now.yifanlu ought to be getting tired of karma fortunes by now.yifanlu ought to be getting tired of karma fortunes by now.yifanlu ought to be getting tired of karma fortunes by now.
 
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.
yifanlu is offline   Reply With Quote
Old 12-27-2011, 08:07 AM   #4
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
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.
geekmaster is offline   Reply With Quote
Old 12-27-2011, 02:36 PM   #5
yifanlu
Kindle Dissector
yifanlu ought to be getting tired of karma fortunes by now.yifanlu ought to be getting tired of karma fortunes by now.yifanlu ought to be getting tired of karma fortunes by now.yifanlu ought to be getting tired of karma fortunes by now.yifanlu ought to be getting tired of karma fortunes by now.yifanlu ought to be getting tired of karma fortunes by now.yifanlu ought to be getting tired of karma fortunes by now.yifanlu ought to be getting tired of karma fortunes by now.yifanlu ought to be getting tired of karma fortunes by now.yifanlu ought to be getting tired of karma fortunes by now.yifanlu ought to be getting tired of karma fortunes by now.
 
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.
yifanlu is offline   Reply With Quote
Advert
Old 12-28-2011, 12:06 AM   #6
laneovcc
Junior Member
laneovcc began at the beginning.
 
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
laneovcc is offline   Reply With Quote
Old 12-28-2011, 12:28 AM   #7
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 laneovcc View Post
That link contains this text:

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.
geekmaster is offline   Reply With Quote
Old 02-23-2012, 12:16 AM   #8
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
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.
geekmaster is offline   Reply With Quote
Old 02-23-2012, 09:04 AM   #9
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
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.
And for people who have not (yet) bricked their kindle - the USB-serial mode should be available during "normal" operation also.

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
Which is a bit brain-dead, it causes XX-mario.rules to be loaded twice.
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"
Not provided as part of any of the source code releases:
Code:
root:cat$ grep 'XX-mario.rules' Amazon_2012.02.18_sha1.cat
root:cat$
Developers get to examine the actual file system images to see if it is
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.
knc1 is offline   Reply With Quote
Old 02-23-2012, 09:46 AM   #10
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
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
Output of query attached.
Attached Files
File Type: gz rules.d.txt.gz (1.3 KB, 491 views)
knc1 is offline   Reply With Quote
Old 02-23-2012, 01:05 PM   #11
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 knc1 View Post
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.
Minor correction -
What that says is that it sends an even notification using lipc to anything that is listening for the event.
Note: just gotta get rid of that propritary lipc thing using an opensource equivalent.
(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)
Must be set at the usb-serial level in the stack,
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.
knc1 is offline   Reply With Quote
Old 02-25-2012, 01:29 PM   #12
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
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.
geekmaster is offline   Reply With Quote
Old 02-25-2012, 01:32 PM   #13
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 knc1 View Post
And for people who have not (yet) bricked their kindle - the USB-serial mode should be available during "normal" operation also.
I thought that USB Downloader mode (which uses MfgTool or sb_loader) and USB Serial mode (a gadget that uses a USB serial device driver and a serial terminal program) were different things.

Did I miss something here?
geekmaster is offline   Reply With Quote
Old 02-25-2012, 02:13 PM   #14
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
I thought that USB Downloader mode (which uses MfgTool or sb_loader) and USB Serial mode (a gadget that uses a USB serial device driver and a serial terminal program) were different things.

Did I miss something here?
I may have been half-asleep when I wrote that.
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.
knc1 is offline   Reply With Quote
Old 02-25-2012, 03:03 PM   #15
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 knc1 View Post
And click 'files' in the breadcrumb trail to get at the init and config files.
Nice. Thanks. I see opie in the breadcrumb trail. I actually booted that up on my Palm Tx a few weeks ago. It was sitting on a shelf gathering dust for a few years, and I needed to drop in and say "hello" to it when some folding serial keyboards arrived from ebay...

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.
geekmaster is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
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


All times are GMT -4. The time now is 06:08 PM.


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