View Single Post
Old 02-13-2013, 07:33 AM   #2
knc1
Going Viral
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: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by dsmid View Post
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.

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

It was tested on Kindle 4 but should work on any Kindle.

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 .
Does this also prevent the updater in the initramfs from running when the update file is present during a full reboot (cold start)?

If unknown, please test for that and report back.
knc1 is offline   Reply With Quote