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 01-07-2012, 11:45 AM   #1
blackjack13
Member
blackjack13 began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Jan 2012
Device: kindle touch
How to method to close kindle need repair

How to method to close kindle need repair (kindle Touch) by RUNME.sh
anyone know code to close this function
blackjack13 is offline   Reply With Quote
Old 01-07-2012, 04:14 PM   #2
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
UPDATE: blackjack13 successfully debricked his kindle touch that was booting to the dreaded "Repair Needed" screen. He did NOT remove the back off his kindle, and he did NOT use the serial port to recover his kindle. He did this using only ixtab's tar root path exploit (data.tar.gz and RUNME.sh), with some coaching. Read the following series of posts for details. PMs were inserted to add continuity.

Quote:
Originally Posted by blackjack13 View Post
How to method to close kindle need repair (kindle Touch) by RUNME.shanyone know code to close this function
Even after repairing whatever damaged your kindle startup scripts, your RUNME.sh must contain the following command to reset the boot counter that causes the "Repair Needed" screen:

echo 0 > /var/local/upstart/lab126_gui.restarts

I suggest that your RUNME.sh also replace any modified scripts with original copies, and any NEW startup scripts get replaced by benign (do nothing) script files.

You can get original script copies by loop mounting a backup copy of your /dev/mmcblk0p1. If you "lost" all of your backup copies, you could ask a kindle touch owner from this forum for a copy of theirs, if you let them know which script file needs to be replaced.

Of course, to write the new RUNME.sh to your USB Drive, you need to do it during the short time window (10 to 30 seconds) after the USB Drive is exported but before the kindle halts at the "Repair Needed" screen. It help you use a script on the host PC that loops waiting for the USB Drive, then immediately copies RUNME.sh and any other needed files to the USB Drive. Depending on your method, you may be able to replace damaged scripts by putting them at the rignt location inside the data.tar.gz file and using the root path exploit to put them where they belong. For most people, I suggest just using the ixtab data.tar.gz payload and letting the RUNME.sh do the "mntroot rw" and copy backup files from the USB drive to where they belong.

If this is not enough detail for you, please read the other threads and wiki so that you can make informed requests and understand the answers.

Thanks, and good luck.

P.S. I have discovered that the touch can get "bricked" just by leaving it connect to usb networking. I can apparently severely drain the battery even while the LED stays green. Or, at a minimum, it can confuse the battery charging drivers. This is much different from earlier kindles which charged the battery.

So, the FIRST thing to do with a bricked kindle is to plug it into a 12v power adapter to charge it. Mine took about 14 hours to reach a full charge. Although I thought for sure that it was bricked, my touch recovered and rebooted itself when the battery received enough charge.

Quote:
Originally Posted by blackjack13
hello can you help me to solve the problem kindle need to repair because I install mp from Pat Hartl
to remove sponser and change screensever and then
I change screensever too big size file then kindle is show
need to repair

I think code RUNME.sh that can solve this problem but I don't know how to write code to solve it
Therefore I consult you to write code
Hope you to help me please.
I do not know anything about mp from Pat Hatl. I would need to study it. Do you know what files were changed in the /etc/startup/ folder? If you do, we can write a RUNME.sh that replaces the changed file with an original file. You also need to reset a boot counter file in /var/local/<something> -- that file is documented in my thread about touch serial port recovery.

I am too busy to spend time to do this research myself right now. If you can supply the information that I requested above perhaps I can write a RUNME.sh for you.

Or, you can PM ixtab who did the original RUNME.sh.

When at the repair needed screen, the usb drive is only visible for less than half a minute during restart before the kindles halts at the repair needed screen. It helps to have a script running on the host PC that loops waiting for the USB Drive, and writes to it as soon as it is available during the kindle restart.

Last edited by geekmaster; 01-08-2012 at 03:54 AM.
geekmaster is offline   Reply With Quote
Old 01-07-2012, 11:16 PM   #3
blackjack13
Member
blackjack13 began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Jan 2012
Device: kindle touch
Quote:
Originally Posted by geekmaster View Post
Even after repairing whatever damaged your kindle startup scripts, your RUNME.sh must contain the following command to reset the boot counter that causes the "Repair Needed" screen:

echo 0 > /var/local/upstart/lab126_gui.restarts

I suggest that your RUNME.sh also replace any modified scripts with original copies, and any NEW startup scripts get replaced by benign (do nothing) script files.

You can get original script copies by loop mounting a backup copy of your /dev/mmcblk0p1. If you "lost" all of your backup copies, you could ask a kindle touch owner from this forum for a copy of theirs, if you let them know which script file needs to be replaced.

Of course, to write the new RUNME.sh to your USB Drive, you need to do it during the short time window (10 to 30 seconds) after the USB Drive is exported but before the kindle halts at the "Repair Needed" screen. It help you use a script on the host PC that loops waiting for the USB Drive, then immediately copies RUNME.sh and any other needed files to the USB Drive. Depending on your method, you may be able to replace damaged scripts by putting them at the rignt location inside the data.tar.gz file and using the root path exploit to put them where they belong. For most people, I suggest just using the ixtar data.tar.gz payload and letting the RUNME.sh do the "mntroot rw" and copy backup files from the USB drive to where they belong.

If this is not enough detail for you, please read the other threads and wiki so that you can make informed requests and understand the answers.

Thanks, and good luck.

P.S. I have discovered that the touch can get "bricked" just by leaving it connect to usb networking. I can apparently severely drain the battery even while the LED stays green. Or, at a minimum, it can confuse the battery charging drivers. This is much different from earlier kindles which charged the battery.

So, the FIRST thing to do with a bricked kindle is to plug it into a 12v power adapter to charge it. Mine took about 14 hours to reach a full charge. Although I thought for sure that it was bricked, my touch recovered and rebooted itself when the battery received enough charge.
Thank you for reply question
I can reset the boot counter by replace lab126_gui.restarts in data.tar.gz at the rignt location ???
blackjack13 is offline   Reply With Quote
Old 01-07-2012, 11:51 PM   #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
Quote:
Originally Posted by blackjack13 View Post
Thank you for reply question
I can reset the boot counter by replace lab126_gui.restarts in data.tar.gz at the rignt location ???
Yes. But it may be easier to use the data.tar.gz provided by ixtab, and do the echo statement shown in my previous post from the RUNME.sh, than it would be to create a new data.tar.gz with correct root path (path to file starting with "/").

Quote:
Originally Posted by blackjack13
mkdir /mnt/base-us/ad_backup
cp -f /usr/share/blanket/ad_screensaver/* /mnt/base-us/ad_backup/
m -f /usr/share/blanket/ad_screensaver/screens*.png
rm -f /usr/share/blanket/ad_screensaver/banner*.gif
cp -f /mnt/base-us/screensaver.png /usr/share/blanket/ad_screensaver/screensaver-unregistered.png
cp -f /mnt/base-us/screensaver.png /usr/share/blanket/ad_screensaver/screensvr.png
shutdown -r now

I want to remove old screensever that enough file (25mb) and I think it cause of problem
in usr/share/blanket/ad_screensaver and then bring back up screen sever to original location but I don't know how to write code to RUNME.sh to make it
That is a very big file. It is best to convert screensavers to greyscale (no color) and to resize to match the screen (600x800).

I was going to test the statements above, but while helping somebody else with a problem, my kindle touch now appears to be bricked with no usb drive (the drive mounts with capacity of 0 bytes). I will give it a full charge now. Perhaps I need to debrick it with the serial port again. I did not CHANGE anything. All I did is inspect the value in a proc port. I removed the battery and reinstalled it. No good. I did not do anything that should have bricked it. I am not happy. ;-(

Last edited by geekmaster; 01-08-2012 at 02:52 AM.
geekmaster is offline   Reply With Quote
Old 01-08-2012, 12:17 AM   #5
blackjack13
Member
blackjack13 began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Jan 2012
Device: kindle touch
Quote:
Originally Posted by geekmaster View Post
Yes. But it may be easier to use the data.tar.gz provided by ixtab, and do the echo statement shown in my previous post from the RUNME.sh, than it would be to create a new data.tar.gz with correct root path (path to file starting with "/").
I must to have data.tar.gz provided by ixtab and replace lab126_gui.restarts to it ,Original RUNME.sh with insert command echo 0 > /var/local/upstart/lab126_gui.restarts ???
blackjack13 is offline   Reply With Quote
Old 01-08-2012, 01:01 AM   #6
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 blackjack13 View Post
I must to have data.tar.gz provided by ixtab and replace lab126_gui.restarts to it ,Original RUNME.sh with insert command echo 0 > /var/local/upstart/lab126_gui.restarts ???
Do not make any changes to data.tar.gz. It already runs RUNME.sh.

Just do the echo in RUNME.sh, but also fix whatever caused startup to fail.

Resetting the boot counter will just allow it to fail because of whatever was damaged in the first place.

Quote:
Originally Posted by blackjack13
May I ask for original lab126_gui.restarts and RUNME.sh because I doesn't backup copy of /dev/mmcblk0p1

Thank you very much for previous helping
There is no original. The boot process begins by creating or incrementing the number in that file, and when successfully booted up it deletes that file.

I fixed mine as shown in the thread. It MIGHT be safe to just delete that file, but I KNOW that it is safe to replace the value in it. As I said in the thread (go read it), just add that echo statement that I provided to the RUNME.sh file.

Quote:
Originally Posted by blackjack13
I don't clearly understand that RUNME.sh and lab126_gui.restarts have no original file
I just type /var/local/upstart/lab126_gui.restarts in RUNME.sh but my RUNME.sh hasn't anything command
Just put this statement in your RUNME.sh and store it on the USB drive:

echo 0 > /var/local/upstart/lab126_gui.restarts

Quote:
Originally Posted by blackjack13
It same to show kindle need repair before type /var/local/upstart/lab126_gui.restarts to RUNME.sh
Create that file on the host PC (not on the kindle).

You need to repeat a command in a loop, repeating until it works, that saves your RUNME.sh onto the kindle USB Drive as soon as it appears during the boot. Then restart the kindle. That will just make it boot farther but whatever made it fail before will make it fail again. You need to add more commands in RUNME.sh that also repair the problem before resetting the boot counter.

Last edited by geekmaster; 01-08-2012 at 02:54 AM.
geekmaster is offline   Reply With Quote
Old 01-08-2012, 01:18 AM   #7
blackjack13
Member
blackjack13 began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Jan 2012
Device: kindle touch
Thank you very much , kindle can normal load cause of your code
blackjack13 is offline   Reply With Quote
Old 01-08-2012, 03:21 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
Quote:
Originally Posted by blackjack13 View Post
Thank you very much , kindle can normal load cause of your code
You are welcome.

Because this problem was solved by posts to this thread AND additional exchanged PMs, I inserted the PMs that I sent into this thread, so that others may use this information to help them solve similar problems.

I hope that is okay with you.
geekmaster is offline   Reply With Quote
Old 01-09-2012, 03:46 AM   #9
rastik
Connoisseur
rastik is fluent in JavaScript as well as Klingon.rastik is fluent in JavaScript as well as Klingon.rastik is fluent in JavaScript as well as Klingon.rastik is fluent in JavaScript as well as Klingon.rastik is fluent in JavaScript as well as Klingon.rastik is fluent in JavaScript as well as Klingon.rastik is fluent in JavaScript as well as Klingon.rastik is fluent in JavaScript as well as Klingon.rastik is fluent in JavaScript as well as Klingon.rastik is fluent in JavaScript as well as Klingon.rastik is fluent in JavaScript as well as Klingon.
 
Posts: 65
Karma: 4662
Join Date: Feb 2011
Location: CZ
Device: Kindle Touch 3G, Kindle Keyboard
Quote:
Originally Posted by geekmaster View Post
I was going to test the statements above, but while helping somebody else with a problem, my kindle touch now appears to be bricked with no usb drive (the drive mounts with capacity of 0 bytes). I will give it a full charge now. Perhaps I need to debrick it with the serial port again. I did not CHANGE anything. All I did is inspect the value in a proc port. I removed the battery and reinstalled it. No good. I did not do anything that should have bricked it. I am not happy. ;-(
Sorry to hear that. How did you solve it? Was serial cable needed?
rastik is offline   Reply With Quote
Old 01-09-2012, 03:56 AM   #10
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 rastik View Post
Sorry to hear that. How did you solve it? Was serial cable needed?
It fixed itself after charging for several hours. It took 14 hours to reach full charge.

Apparently the kindle touch keeps the green "fully charged" LED on even though it is discharging while connected to usb networking (even while apparently asleep).

In fact, it appears to have OVER-discharged the battery (stone dead, LED would not even blink when pressing the power button).

But like I said, it "fixed" itself while plugged into a USB power adapter.

I have not had that problem with earlier kindles, several of which stay plugged into the host PC and remain accessible over usbnet for weeks at a time (or more). [Of course, it helps that I uninstalled the Ubuntu Network Manager, but now I have to do everything at the command line.]

What I learned is that in some cases, you just cannot trust the color of the kindle touch power LED.

Last edited by geekmaster; 01-09-2012 at 03:58 AM.
geekmaster is offline   Reply With Quote
Old 01-09-2012, 01:47 PM   #11
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,477
Karma: 26012492
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
Huh, that sucks :/.

Both the K2 and K3 are actually *charging* while connected through usbnet, even when connected in full-speed instead of high-speed (I have a crappy K3, apparently, it's a minor miracle when it actually manages to hold an high-speed connection, instead of resetting a bunch of times before falling back to full-speed).
NiLuJe is offline   Reply With Quote
Old 02-16-2012, 03:11 PM   #12
mcp1999
Member
mcp1999 began at the beginning.
 
Posts: 14
Karma: 10
Join Date: Feb 2012
Device: Kindle Touch
Hi All,

I have a Kindle Touch that one day freaked out for no reason and left me at the "Your Kindle Needs Repair" screen.

I copied data.tar.gz and RUNME.sh to the device (with echo 0 > /var/local/upstart/lab126_gui.restarts added to the RUNME.sh) and this gets rid of the "Your Kindle Needs Repair" screen and puts it into a boot loop.

I extracted the log.txt from the device, but now don't really have any idea of what to do and what commands I could try adding to the RUNME.sh to try to fix the problem.

Searches for "error" in the log.txt file gives many instances of this line:
111225:120006 lipc-get-prop[12965]: E lipc:dbuserr:name=org.freedesktop.DBus.Error.Servi ceUnknown:Receive Dbus error message (DBUS_MESSAGE_TYPE_ERROR): The name com.lab126.wan was not provided by any .service files

If anybody has any suggestions I would be extremely grateful.

Many thanks.
mcp1999 is offline   Reply With Quote
Old 02-16-2012, 04:34 PM   #13
JustAMan
Groupie
JustAMan doesn't litterJustAMan doesn't litter
 
JustAMan's Avatar
 
Posts: 153
Karma: 113
Join Date: Jan 2012
Location: Russia
Device: Kindle Touch
If it stuck for no reason maybe your /var/local filled up? It's only 30 MB on KTouch and seems like extremely easy to fill up if you have a lot of books & collections...

That error you're quoting is normal though, at least I got a lot of them and my Kindle works just fine. I suppose this just means firmware is identical for both 3G-enabled and WiFi-only versions, and if you have WiFi-only while firmware tries to go 3G it sends this into logs.
JustAMan is offline   Reply With Quote
Old 02-16-2012, 05:51 PM   #14
mcp1999
Member
mcp1999 began at the beginning.
 
Posts: 14
Karma: 10
Join Date: Feb 2012
Device: Kindle Touch
Thanks for your quick response.

I added the line "du -h /var/local > /mnt/us/temp1.txt" to RUNME.sh, which returned "4.4M /var/local". So I guess this is not the problem.

I only had a few books on it anyway as I only had it three weeks before it died.

Any more suggestions?
mcp1999 is offline   Reply With Quote
Old 02-16-2012, 07:49 PM   #15
ixtab
(offline)
ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.
 
ixtab's Avatar
 
Posts: 2,907
Karma: 6736092
Join Date: Dec 2011
Device: K3, K4, K5, KPW, KPW2
As a last resort, try a full factory reset. This has helped for me and at least two other people, where the Kindle was stuck for (seemingly) no particular reason.

This will wipe all configuration and documents, so make sure you back up your documents first!

Code:
#!/bin/sh
mntroot rw || exit 1
test -e /mnt/us/RUNME.done && exit 0
touch /mnt/us/RUNME.done
sync
/usr/sbin/shipping_mode
For reasons unknown to me, sometimes the Kindle performs a reboot after having run this, sometimes it doesn't. If it just hangs for, say more than 2 minutes, just hard-reset it (power button for ~20 seconds).

Hope this helps.
ixtab 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
Troubleshooting Kindle Need Repair Shaitan Amazon Kindle 4 08-31-2011 12:19 AM
Kindle 3 up close Ben Thornton Amazon Kindle 4 09-01-2010 06:19 PM
Troubleshooting your kindle needs repair. dsram Amazon Kindle 8 08-31-2010 01:37 AM


All times are GMT -4. The time now is 01:32 PM.


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