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 05-28-2012, 08:01 PM   #1
silver18
THE NOOB
silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.
 
silver18's Avatar
 
Posts: 698
Karma: 1545625
Join Date: Jan 2012
Location: Italy
Device: Kindle Touch 5.3.2
OK, I bricked it...shame on me

Good night!
I bricked my Kindle playing with /etc/upstart files. I know, I'm a real stupid!
I edited the dbus.conf file and now I'm stuck at the "under the tree" image.
I can enter in diagnostic mode (thanks Geekmaster!!), I can mount USB and drop files in it.
I also have a backup copy of that file, but I don't manage to replace it.

Here's what I'm doing:
in diagnostic mode, I select USB device mode, than open my Kindle USB drive.
I drop data.tar.gz, dbus.conf and this RUNME.sh:

Code:
test -f /mnt/us/RUNME.done && exit
# The following set of commands will be executed (in the context of your Kindle) exactly once. To make them execute again, remove RUNME.done
#
# (mntroot rw and mntroot ro below are only shown for convenience, and not needed for this particular script. These commands allow
# to modify the internal file system. Use only if you know what you are doing. Oh well, you should have only ended up needing this advice
# if you knew what you were doing in the first place. ;-)
mntroot rw
mv -f /mnt/us/dbus.conf /etc/upstart/dbus.conf
mntroot ro
touch /mnt/us/RUNME.done
Than, I close USB device mode, reboot the Kindle but I don't find the RUNME.done in USB drive.

Any help?
silver18 is online now   Reply With Quote
Old 05-28-2012, 08:50 PM   #2
geekmaster
Всё гениальное просто.
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: 5,067
Karma: 6789001
Join Date: Nov 2011
Location: Щедрость не имеет пределов.
Device: *.*
Quote:
Originally Posted by silver18 View Post
Good night!
I bricked my Kindle playing with /etc/upstart files. I know, I'm a real stupid!
I edited the dbus.conf file and now I'm stuck at the "under the tree" image.
I can enter in diagnostic mode (thanks Geekmaster!!), I can mount USB and drop files in it.
I also have a backup copy of that file, but I don't manage to replace it.

Here's what I'm doing:
in diagnostic mode, I select USB device mode, than open my Kindle USB drive.
I drop data.tar.gz, dbus.conf and this RUNME.sh:

Code:
test -f /mnt/us/RUNME.done && exit
# The following set of commands will be executed (in the context of your Kindle) exactly once. To make them execute again, remove RUNME.done
#
# (mntroot rw and mntroot ro below are only shown for convenience, and not needed for this particular script. These commands allow
# to modify the internal file system. Use only if you know what you are doing. Oh well, you should have only ended up needing this advice
# if you knew what you were doing in the first place. ;-)
mntroot rw
mv -f /mnt/us/dbus.conf /etc/upstart/dbus.conf
mntroot ro
touch /mnt/us/RUNME.done
Than, I close USB device mode, reboot the Kindle but I don't find the RUNME.done in USB drive.

Any help?
I have lost count of all the times I bricked mine. It is just standard part of the edit/compile/test/edit/compile/test/brick/debrick development cycle.

In the worst case, use fastboot to flash a clean main partition and matching kernel, then update the firmware to whatever version you want to use, then continue the development cycle at the next step.

If I were you, I would get all my stuff and custom scripts installed, then make a backup of mmcblk0p1 with dd, and then later you can flash that to backstep to the last known good development image you were working on. Then you would not need to reflash a kernel.

EDIT: If I were you, I would use diags SSH to fix the problem in an interactive exploratory manner. A RUNME.sh should check to see if it is running from main or diags, and mount main at /mnt/mmc if it needs to, then make changes there.

Last edited by geekmaster; 05-28-2012 at 08:52 PM.
geekmaster is offline   Reply With Quote
 
Enthusiast
Old 05-28-2012, 08:54 PM   #3
silver18
THE NOOB
silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.
 
silver18's Avatar
 
Posts: 698
Karma: 1545625
Join Date: Jan 2012
Location: Italy
Device: Kindle Touch 5.3.2
Quote:
Originally Posted by geekmaster View Post
... then continue the development cycle at the next step.

I.E brick it again...

Anyway, is that RUNME.sh correct? Do I need to switch from diag to main to copy that damn file?

EDIT: I was thinking the same thing...then, how to use SSH in diag?
I can start USBnet in diag mode but I can't ssh into kindle using the way I always do (with winscp or putty)...

EDIT2: I get "connection refused" even if I can see the Kindle in the right mood (detected as Linux USB Ethernet/RNDIS gadget in my windows xp...)

EDIT3: I think I got it. I need to get to fastboot mode, use mmcblk0p2_ssh.img.gz to have ssh in diags, activate the USBnet in diag, than I should be able to use WinSCP to fix that damn file...
I need to make windows xp to use fastboot!

Last edited by silver18; 05-28-2012 at 09:03 PM.
silver18 is online now   Reply With Quote
Old 05-28-2012, 09:06 PM   #4
geekmaster
Всё гениальное просто.
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: 5,067
Karma: 6789001
Join Date: Nov 2011
Location: Щедрость не имеет пределов.
Device: *.*
A complication is that there have been some reports of a recent OTA update that adds a startup script that deletes the diags /usr/local folder containing the dropbear files needed for SSH. This requires a fastboot reflash to restore them.

It is worth making a data.tar.gz that contains all the /usr/local files for diags, so after OTA is naughty to you, just drop the data.tar.gz (and ENABLE_DIAGS) on the USB drive and reboot to diags, and SSH should work again.

Last edited by geekmaster; 05-28-2012 at 09:08 PM.
geekmaster is offline   Reply With Quote
Old 05-28-2012, 09:23 PM   #5
silver18
THE NOOB
silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.
 
silver18's Avatar
 
Posts: 698
Karma: 1545625
Join Date: Jan 2012
Location: Italy
Device: Kindle Touch 5.3.2
Ok, kindle-fastboot detected by windows...now...I should send these commands:

Code:
In fastboot mode, do:
gunzip mmcblk0p2.img.gz
sudo ./fastboot flash diags mmcblk0p2.img

Then reboot to diags mode. Select menu items N) U) Z) X). Wait 20 seconds for dropbear to startup. Do:
sudo ifconfig usb0 192.168.15.201
ssh root@192.168.15.244

The password is mario.
but how? From where?
silver18 is online now   Reply With Quote
Old 05-28-2012, 09:27 PM   #6
geekmaster
Всё гениальное просто.
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: 5,067
Karma: 6789001
Join Date: Nov 2011
Location: Щедрость не имеет пределов.
Device: *.*
Those are linux commands. You can unzip the image with 7-zip (or whatever you prefer). The "sudo ./" is a linux thing. Just do "fastboot flash diags mmcblk0p2.img".

Instead of the linux "ssh", use putty. Instead of "scp", use winscp.

Do them from a command prompt.
geekmaster is offline   Reply With Quote
Old 05-29-2012, 03:29 AM   #7
silver18
THE NOOB
silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.
 
silver18's Avatar
 
Posts: 698
Karma: 1545625
Join Date: Jan 2012
Location: Italy
Device: Kindle Touch 5.3.2
Ok, I just flashed the new diag with SSH using:
Code:
fastboot flash diags mmcblk0p2_ssh.img
I rebooted in diag mode, but I got the charge needed screen (low battery).

I hope it is charging right now (it's connected to the USB)...
If so, I hope to be able to reboot in diag mode, activate USBnet, use putty and replace the file...
Than it should be ok...

Anyway...before bricking it I had this problem: CLICK. Is it possible to plain install 5.1.0 firmware to fix it while debricking?

EDIT: I switched to a wall charger and now I have my "beloved" under the tree screen. I'm letting the kindle to charge a little more, than I'll try SSH...

Last edited by silver18; 05-29-2012 at 03:46 AM.
silver18 is online now   Reply With Quote
Old 05-29-2012, 04:13 AM   #8
silver18
THE NOOB
silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.
 
silver18's Avatar
 
Posts: 698
Karma: 1545625
Join Date: Jan 2012
Location: Italy
Device: Kindle Touch 5.3.2
Finally I managed to enter in SSH...I found that /etc/upstart was pretty empty so I added all missing files from my backup, I rebooted in main mode but no luck....I'm still under the tree....
What to try next?
silver18 is online now   Reply With Quote
Old 05-29-2012, 04:32 AM   #9
silver18
THE NOOB
silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.
 
silver18's Avatar
 
Posts: 698
Karma: 1545625
Join Date: Jan 2012
Location: Italy
Device: Kindle Touch 5.3.2
Reading and reading and reading....

I think I need to flash the main partition...it should be mmcblk0p1...If I take a 5.0.0 firmware image, it should also fix the collateral problem I talked about...Am I wrong?

But where can I find the main partition image? I can't see it in debrick post...

Than I should copy mmcblk0p1 to /mnt/us, run in SSH this command:

Code:
dd if=/mnt/us/mmcblk0p1.img of=/dev/mmcblk0p1 bs=4
If it doesn't work, I should run also this:

Code:
dd if=/dev/zero of=/dev/mmcblk0p3 bs=4K count=1K
to erase /var/local...

Finally I should run the factory_restore script, but where can I find it? And how can I run it?

Thanks to all! I promise I'll write down a noob guide for the future...including also all problems related to using Windows!
silver18 is online now   Reply With Quote
Old 05-29-2012, 05:15 AM   #10
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,640
Karma: 1915537
Join Date: Mar 2011
Location: Türkiye
Device: Kindle 5.3.7
Quote:
Originally Posted by silver18 View Post
But where can I find the main partition image? I can't see it in debrick post...
tinyurl.com/kindleimages

Quote:
Originally Posted by silver18 View Post
Code:
dd if=/mnt/us/mmcblk0p1.img of=/dev/mmcblk0p1 bs=4K
Quote:
Originally Posted by silver18 View Post
Finally I should run the factory_restore script, but where can I find it? And how can I run it?
you need to run a command like this via ssh or RUNME.sh:
Code:
#!/bin/sh
mntroot rw
/usr/sbin/factory_reset
echo "Done " > /mnt/us/result.txt
Quote:
Originally Posted by silver18 View Post
I promise I'll write down a noob guide for the future...including also all problems related to using Windows!
wow, this would be great...
thomass is online now   Reply With Quote
Old 05-29-2012, 05:24 AM   #11
silver18
THE NOOB
silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.
 
silver18's Avatar
 
Posts: 698
Karma: 1545625
Join Date: Jan 2012
Location: Italy
Device: Kindle Touch 5.3.2
Quote:
Originally Posted by thomass View Post
tinyurl.com/kindleimages
Thanks for your reply!
Anyway, I can't see any mmcblk0p1 image for Kindle Touch. I can see only kernels from 5.0.0 and 5.0.4.
Am I supposed to flash those (I would use 5.0.0)?
silver18 is online now   Reply With Quote
Old 05-29-2012, 05:46 AM   #12
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,640
Karma: 1915537
Join Date: Mar 2011
Location: Türkiye
Device: Kindle 5.3.7
Quote:
Originally Posted by silver18 View Post
Thanks for your reply!
Anyway, I can't see any mmcblk0p1 image for Kindle Touch. I can see only kernels from 5.0.0 and 5.0.4.
Am I supposed to flash those (I would use 5.0.0)?
via this link:
http://gitbrew.org/~dasmoover/kindle/touch/forensic/ > mmcblk0p1-kt-5.0.0.img
thomass is online now   Reply With Quote
Old 05-29-2012, 05:52 AM   #13
silver18
THE NOOB
silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.
 
silver18's Avatar
 
Posts: 698
Karma: 1545625
Join Date: Jan 2012
Location: Italy
Device: Kindle Touch 5.3.2
Wow, thanks!!!!
Last question before diving into debricking: do I need to flash also the kernel (as I'll use 5.0.0 main image, I'll need to use kernel-5.0.0.img)?
silver18 is online now   Reply With Quote
Old 05-29-2012, 06:13 AM   #14
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,640
Karma: 1915537
Join Date: Mar 2011
Location: Türkiye
Device: Kindle 5.3.7
Quote:
Originally Posted by silver18 View Post
Wow, thanks!!!!
Last question before diving into debricking: do I need to flash also the kernel (as I'll use 5.0.0 main image, I'll need to use kernel-5.0.0.img)?
I have limited info about this but i think its better to use mmcblk0p2 of the same version with mmcblk0p1. But I don't know about requirements and specific installation of kernels.

But just remembered that there is a good page about this whole process: tinyurl.com/touchunbrick
thomass is online now   Reply With Quote
Old 05-29-2012, 06:32 AM   #15
silver18
THE NOOB
silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.
 
silver18's Avatar
 
Posts: 698
Karma: 1545625
Join Date: Jan 2012
Location: Italy
Device: Kindle Touch 5.3.2
Right now I'm downloading the main partition image.

I think I'll act like this:
- enter in diag mode
- go in USB mode
- drop mmcblk0p1.img from 5.0.0 firmware
- exit USB mode
- go in fastboot mode
- flash 5.0.0 kernel with
Code:
fastboot flash kernel kernel-5.0.0.img
- reboot in diag mode
- enter in USBnet mode
- copy mmcblk0p1.img with
Code:
dd if=/mnt/us/mmcblk0p1.img of=/dev/mmcblk0p1 bs=4K
- if needed, erase /var/local with
Code:
dd if=/dev/zero of=/dev/mmcblk0p3 bs=4K count=1K
- start factory reset script with
Code:
/usr/sbin/factory_reset
Is it OK?
silver18 is online now   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
Hall of Shame - don't buy these ebooks! Logseman General Discussions 18 12-08-2010 09:27 AM
Hall of Shame AlexBell General Discussions 38 08-27-2010 02:55 AM
Google and Viacom put us to shame Iphinome Lounge 4 05-22-2010 09:33 AM
Such a shame. Calibre could be great DownSouth Calibre 22 05-05-2010 12:27 AM
Wow-- I feel sympathetic shame for Mobileread ardeegee Feedback 8 04-20-2010 04:50 AM


All times are GMT -4. The time now is 11:44 AM.


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