View Single Post
Old 02-28-2011, 08:17 PM   #209
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
UPDATE

Thanks to NiLuJe for teaching me kindle runlevels and showing me how updates run on a different runlevel then the framework. I have implemented his bind method, but different.

0.4 of my jailbreak now removes the need for a "ENABLE_HACK_UPDATES" files. (There is no need for a whitelist either). If you want a cleaner filesystem or a easier method (no need to change update provider and restart), you can safely install 0.4 over 0.3 (it will uninstall 0.3 automatically). If you are using NiLuJe's jailbreak and would like to switch (no advantages), uninstall his first.

If you want to compare my jailbreak with NiLuJe's:
-In my script, installing an update or hack will take up to 30 second longer (since my script reads the signature, and Amazon's update reads it again)
-In his script, you need to put the hack into a whitelist. If you are installing a new hack, it will take a few seconds to copy the hack name into the whitelist.

Technical details
No need to read this if you don't care about how it works or if you just want to read the source. Basically, whenever the Kindle updates, it changes from runlevel 5 to runlevel 3. In this window, my script does the following:
1) Look for the first "update.bin" file on /mnt/us (if you have multiple, Amazon updater only reads the first one, so it works out)
2) For copyright reasons, I cannot include Amazon's updater. However, I used sed to read out the signature check function from amazon's updater and imports it.
3) I check the signature, and if it fails, I will bind mount (thanks NiLuJe) the hack keys. If it passes, nothing happens.
4) The update runs and restarts the framework or system. On startup, the script removes the bind mount, restoring Amazon's keys.

Last edited by yifanlu; 02-28-2011 at 08:20 PM.
yifanlu is offline   Reply With Quote