View Single Post
Old 02-13-2013, 04:06 AM   #1
dsmid
Linux devotee
dsmid ought to be getting tired of karma fortunes by now.dsmid ought to be getting tired of karma fortunes by now.dsmid ought to be getting tired of karma fortunes by now.dsmid ought to be getting tired of karma fortunes by now.dsmid ought to be getting tired of karma fortunes by now.dsmid ought to be getting tired of karma fortunes by now.dsmid ought to be getting tired of karma fortunes by now.dsmid ought to be getting tired of karma fortunes by now.dsmid ought to be getting tired of karma fortunes by now.dsmid ought to be getting tired of karma fortunes by now.dsmid ought to be getting tired of karma fortunes by now.
 
dsmid's Avatar
 
Posts: 546
Karma: 2030353
Join Date: Feb 2011
Device: Kindle 3, Kindle 4B, Kindle PW2
Arrow BackDoorLock hack - prevents silent updates

This simple hack has only one purpose: stop Amazon from updating your Kindle silently without your explicit consent.
It is intended for users who believe in "My device - my rules" principle.

It doesn't stop Kindle from downloading the update file but once it is downloaded, any silent installation attempt
fails instantly in an early stage without depleting the battery and intercepting the GUI.
The update file is preserved after such failed attempt and thus it is not downloaded again and again.
Full updates are recognized during the attempt and a countermeasure is deployed
(dummy update file update__this-file-prevents-installing-on-reboot.bin is created to confuse the boot-time updater)

Manual update triggered by user is still possible (i.e. selecting "Update Your Kindle" in the menu).

When an update attempt is detected and subfolder /documents/backdoorlock exists in your Kindle,
you will find a new document named "Silent update attempt detected" containing the details on your home screen.

You shouldn't ever need to disable/uninstall this hack as it doesn't stop you from installing anything manually.
The only exception is when an incremental update needs to patch the file /etc/updater.conf - such update would fail
with an error. Only then you would need to uninstall the hack or deactivate it with KUAL.
You would also need to reinstall/reactivate the hack after installing a full update (the huge one).

It was tested on Kindle 3 and Kindle 4 but should work on any Kindle, PW2 included.
Silent update detection does not work on Kindle Touch and Kindle Paperwhite as the hack uses a different method
to stop silent updates on these devices.

You can install the hack as a classic update bundle or a KUAL extension. Please do not install both.


Installing using update bundle

Make sure you have already jailbroken your Kindle.

Extract backdoorlock_*version*.zip and choose an appropriate update_backdoorlock_*_install.bin file for your Kindle model:

- If you have Kindle Keyboard 3G, choose update_backdoorlock_*version*_k3g_install.bin [serial number starts with B006]
or update_backdoorlock_*version*_k3gb_install.bin [serial number starts with B00A]

- If you have Kindle Keyboard WiFi, choose update_backdoorlock_*version*_k3w_install.bin

- For all other models choose update_backdoorlock_*version*_install.bin

Then copy the chosen update_*.bin file to root of your Kindle storage, safely eject your Kindle
and on Kindle go to *[HOME] -> [MENU] > Settings -> [MENU] > Update Your Kindle*.

Use the same steps to uninstall the hack, just use an appropriate update_backdoorlock_*_uninstall.bin file instead.


Installing using KUAL (Kindle Unified Application Launcher)

Make sure you have KUAL installed properly.

Extract backdoorlock_kual_*version*.zip and copy the contents (the backdoorlock folder) to folder /extensions on your Kindle.
Safely eject your Kindle and find five new menu items in KUAL.

If you want to fully uninstall the extension, remember to unlock the back door before deleting the extension folder.

If you want to read the lock state report as a document, create a subfolder /documents/backdoorlock in your Kindle.
Then the report will be created in this folder everytime you select the "Lock state" menu item.
On the other hand, if you don't like the onscreen reports and prefer to read the document only, create an empty file named noeips
in folder /extensions/backdoorlock/ .

Spoiler:

Here is how it works:

It replaces the line
Code:
_UPDATE_WAIT="/usr/sbin/updatewait"
in /etc/updater.conf with this one:
Code:
_UPDATE_WAIT="$(if [ -x /mnt/us/backdoorlock/updatewait ]; then echo /mnt/us/backdoorlock/updatewait; else echo /usr/sbin/updatewait; fi)"
Wrapper script /mnt/us/backdoorlock/updatewait passes any calls to /usr/sbin/updatewait but only if called with parameter -i (immediate/interactive) - that's how "Update Your Kindle" calls it.
OTOH silent updates call updatewait without any parameters and such attempts are intercepted and logged to /mnt/us/backdoorlock/update.log or /mnt/us/extensions/backdoorlock/update.log .

On KT and KPW lines
Code:
legacy.GET.FWUO=com.lab126.ota
legacy.GET.FWUP=com.lab126.ota
are commented out in file /etc/todo/handler_registry.conf
Attached Files
File Type: zip backdoorlock_10.zip (31.2 KB, 567 views)
File Type: gz backdoorlock_10_src.tar.gz (213.2 KB, 107 views)
File Type: zip backdoorlock_kual_10.zip (6.1 KB, 825 views)

Last edited by dsmid; 01-31-2014 at 01:59 AM. Reason: removed extraneous comma in menu.json
dsmid is offline   Reply With Quote