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 06-21-2012, 03:38 PM   #1
rusHack
Member
rusHack ought to be getting tired of karma fortunes by now.rusHack ought to be getting tired of karma fortunes by now.rusHack ought to be getting tired of karma fortunes by now.rusHack ought to be getting tired of karma fortunes by now.rusHack ought to be getting tired of karma fortunes by now.rusHack ought to be getting tired of karma fortunes by now.rusHack ought to be getting tired of karma fortunes by now.rusHack ought to be getting tired of karma fortunes by now.rusHack ought to be getting tired of karma fortunes by now.rusHack ought to be getting tired of karma fortunes by now.rusHack ought to be getting tired of karma fortunes by now.
 
Posts: 14
Karma: 212044
Join Date: Jun 2012
Location: Betelgeuse
Device: Kindle B008
Update script does not work

I was using this program to make a custom update. I run this command:
Code:
kindletool create ota -d k3w test.sh update_custom_script.bin
I have a script named test.sh
Code:
#!/bin/sh
echo 'Hello test!'
mkdir `date +%d_%m_%Y`
and I successful created the update_custom_script.bin, but after putting it on my kindle, I game me u007 unsuccessful update. What did I do wrong?
rusHack is offline   Reply With Quote
Old 06-21-2012, 04:55 PM   #2
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: 5,104
Karma: 4987077
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW & PW2
Your Kindle is not JailBroken, or if it is using my jailbreak, you'll need to whitelist your package name (in linkjail/etc/whitelist)

Keep in mind that unless you have a serial console plugged in, you won't actually see the echo anywhere, and the directory will be created in a temporary folder, that the updater will probably delete at the end of the update process .

If you want to actually print something on screen, look into eips. You can check bin/libkh in any of my hacks to check how I usually use it, but basically, to print something on the bottom of the screen (on a K2/K3/K4, at least, might be slightly different on the Touch):

Code:
# Pull some helper functions for logging
_FUNCTIONS=/etc/rc.d/functions
[ -f ${_FUNCTIONS} ] && . ${_FUNCTIONS}

# Print a <= 48 characters message on the bottom of the screen (NOTE: Redirect to /dev/null to kill unavailable character & pixel not in range warning messages)
eips 1 $((${SCREEN_Y_RES} / ${EIPS_Y_RES} - 2)) "Hello world!" >/dev/null
(The 48 chars comment applies to a 10" screen in portrait mode)

Last edited by NiLuJe; 06-21-2012 at 05:10 PM.
NiLuJe is offline   Reply With Quote
 
Advertisement
Old 06-21-2012, 05:37 PM   #3
rusHack
Member
rusHack ought to be getting tired of karma fortunes by now.rusHack ought to be getting tired of karma fortunes by now.rusHack ought to be getting tired of karma fortunes by now.rusHack ought to be getting tired of karma fortunes by now.rusHack ought to be getting tired of karma fortunes by now.rusHack ought to be getting tired of karma fortunes by now.rusHack ought to be getting tired of karma fortunes by now.rusHack ought to be getting tired of karma fortunes by now.rusHack ought to be getting tired of karma fortunes by now.rusHack ought to be getting tired of karma fortunes by now.rusHack ought to be getting tired of karma fortunes by now.
 
Posts: 14
Karma: 212044
Join Date: Jun 2012
Location: Betelgeuse
Device: Kindle B008
You seem to be everywhere! I was the guy who could not compile Kindle Tools! And yes, I was using your jailbreak, not knowing it was you.
So now I have:
The update was not successful.

Please record the error code shown below and call Customer Service at 1-866-3 bla bla bla.
To resume using your Kindle, press R key on your keyboard
UPDATE ERROR: 3.

Edit: I found another of your posts that says error 3 is common:
Quote:
The Error 3 on restart is completely normal, on the other hand .
But your function still did not print anything to the screen.

Edit2: I tried putting my folder in /mnt/us but it is still not there. So how wold I do it? Will unpacking a separate executable and using system("mkdir bla bla bla") in C work, or is there another way?

Last edited by rusHack; 06-21-2012 at 05:45 PM. Reason: EDIT
rusHack is offline   Reply With Quote
Old 06-21-2012, 05:41 PM   #4
knc1
Helpdesk Junkie
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: 6,823
Karma: 6314522
Join Date: Feb 2012
Device: Too many.
Quote:
Originally Posted by rusHack View Post
So now I have:
The update was not successful.

Please record the error code shown below and call Customer Service at 1-866-3 bla bla bla.
To resume using your Kindle, press R key on your keyboard
UPDATE ERROR: 3.

Edit: I found another of your posts that says error 3 is common:
Interesting.
And what did customer service have to say about your script?
Would they debug it for you?
knc1 is offline   Reply With Quote
Old 06-21-2012, 05:49 PM   #5
rusHack
Member
rusHack ought to be getting tired of karma fortunes by now.rusHack ought to be getting tired of karma fortunes by now.rusHack ought to be getting tired of karma fortunes by now.rusHack ought to be getting tired of karma fortunes by now.rusHack ought to be getting tired of karma fortunes by now.rusHack ought to be getting tired of karma fortunes by now.rusHack ought to be getting tired of karma fortunes by now.rusHack ought to be getting tired of karma fortunes by now.rusHack ought to be getting tired of karma fortunes by now.rusHack ought to be getting tired of karma fortunes by now.rusHack ought to be getting tired of karma fortunes by now.
 
Posts: 14
Karma: 212044
Join Date: Jun 2012
Location: Betelgeuse
Device: Kindle B008
Quote:
And what did customer service have to say about your script?
Would they debug it for you?
I don't think they even know what debugging is. Maybe they would send me a free Kindle? They are pretty good at sending free Kindles, especially when to the once who buy a lot of books from them.

Last edited by rusHack; 06-21-2012 at 06:12 PM.
rusHack is offline   Reply With Quote
Old 06-21-2012, 06:03 PM   #6
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: 5,104
Karma: 4987077
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW & PW2
Ha, I was just wondering if you weren't the same guy ;D.

Don't reboot your Kindle with a custom update package still on the root of the USB drive, always use the 'Update your Kindle' link in the Settings menu. (That's an error from the updater running at boot, not the ota updater).

And you're not seeing anything from the script because in this case, the script hasn't even been able to run, the updater just rejected the package because it's signed by us, not Amazon (and the only way to patch this updater is via a kernel patch).

Last edited by NiLuJe; 06-21-2012 at 06:18 PM.
NiLuJe is offline   Reply With Quote
Old 06-21-2012, 08:43 PM   #7
rusHack
Member
rusHack ought to be getting tired of karma fortunes by now.rusHack ought to be getting tired of karma fortunes by now.rusHack ought to be getting tired of karma fortunes by now.rusHack ought to be getting tired of karma fortunes by now.rusHack ought to be getting tired of karma fortunes by now.rusHack ought to be getting tired of karma fortunes by now.rusHack ought to be getting tired of karma fortunes by now.rusHack ought to be getting tired of karma fortunes by now.rusHack ought to be getting tired of karma fortunes by now.rusHack ought to be getting tired of karma fortunes by now.rusHack ought to be getting tired of karma fortunes by now.
 
Posts: 14
Karma: 212044
Join Date: Jun 2012
Location: Betelgeuse
Device: Kindle B008
Quote:
kernel patch
?
rusHack is offline   Reply With Quote
Old 06-21-2012, 08:59 PM   #8
knc1
Helpdesk Junkie
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: 6,823
Karma: 6314522
Join Date: Feb 2012
Device: Too many.
Quote:
Originally Posted by rusHack View Post
?
The kernel has an "auto-pilot" mode (en_LAB126) that is called while it is still running as a memory resident system.
(See that "Damn shell reboot" thread for details)

If it finds an update_*.bin file on what, under normal operation is the USB Storage area, it will run it.
These packages must be signed.

The kernel only ships with Amazon's public key, they do not include a MR_dev public key - so we get to add that to the kernel ourselves.

Common term: "Patch"
But in fact, will probably just be added to the source and the kernel rebuilt rather than done as a binary patch.

Since we also need this feature for the K3 "rescue kernel" ...
Since I own a K3 ...
Since I have done such things in the past ...
I may do it unless someone beats me to it.
Since I am nearly at the end of my three score and ten ...
Time is short here, so don't hold your breath for me to get it done.
knc1 is offline   Reply With Quote
Old 06-21-2012, 09:12 PM   #9
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: 5,104
Karma: 4987077
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW & PW2
@rusHack: Hence my "Don't reboot with a custom update" warning . The jailbreak only affects the OTA updater (that's the one from the 'Update Your Kindle' link).

@knc1: http://yifan.lu/2011/06/25/one-more-...-for-kindle-3/
I seem to remember seaniko7 also building another one... .

Actually, I don't even remember if that's the same updater from the initramfs recovery shell that's run at boot, or a third (?) one :?.

Last edited by NiLuJe; 06-21-2012 at 09:16 PM.
NiLuJe is offline   Reply With Quote
Old 06-21-2012, 09:55 PM   #10
knc1
Helpdesk Junkie
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: 6,823
Karma: 6314522
Join Date: Feb 2012
Device: Too many.
Quote:
Originally Posted by NiLuJe View Post
@rusHack: Hence my "Don't reboot with a custom update" warning . The jailbreak only affects the OTA updater (that's the one from the 'Update Your Kindle' link).

@knc1: http://yifan.lu/2011/06/25/one-more-...-for-kindle-3/
I seem to remember seaniko7 also building another one... .

Actually, I don't even remember if that's the same updater from the initramfs recovery shell that's run at boot, or a third (?) one :?.
I can not say for certain either.

The only thing I am sure of, is this system isn't put together in any obvious way. Almost as if it was done in a hurry, out of the "spare (firmare) parts" that where laying on the shelf.

Plenty of room for research into the details.

That "auto-pilot" updater that runs from the recovery shell, before the usual runtime file systems are mounted would give us the most opportunity to fix-up the system.

And there are what? Three K3s with active threads at the moment that could make use of this sort of "K3 Rescue" system?

- - - -

Another thing to check while researching the details -
Can the "network console' be enabled? (No end user serial port connection required to interact with the "K3 Rescue" system).
knc1 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
Script to update to latest version squigish Calibre 11 09-29-2013 11:37 PM
Can't get the firmware update to work lynnh Ectaco jetBook 2 02-21-2010 08:05 AM
2.3 Update for the DX, K2 and K2i - will the hacks still work? edge777 Kindle Developer's Corner 1 11-24-2009 03:05 PM
script, versions, bbconfig, update 2.0.2 wz2b Kindle Developer's Corner 4 03-20-2009 01:13 PM
How to make Igor's script work sunshine6855 Kindle Developer's Corner 160 03-12-2009 10:54 AM


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


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