This explains an idea to design hacks that don't interfere with stock firmware installation.
I am not saying it would work on every hack, but it would in many cases. If you write Kindle hacks, it’s worth a read.
Some basics. Kindle has following run level.
runlevel 2 : Booting (/etc/inittab defines this as default runlevel)
/etc/rc2.d/S50battcheck launches runlevel 5
runlevel 3 : Update done in this level.
/etc/rc3.d/S50updater launches runlevel 5
runlevel 4 : Recovery?
/etc/rc4.d/S99diag_reboot this reboots Kindle
runlevel 5 : Conventional
Runs usual Kindle framework
runlevel 6 : Kernel toggle?
/etc/rc6.d/S50kernel_toggle does something but not really sure what.
When user selects "UPDATE" in runlevel 5 menu Settings, Kindle goes down to runlevel 3 and do Update and then goes back to level 5 to execute Kindle framework.
Runlevel 3 and 5 are what we are interested in. If we can clear up hacks temporarily in runlevel3(rc3.d), stock firmware can be installed without a problem.
OK, now we have an idea how Kindle runs around, let’s think about this;
When a hack is installed, it usually insets a name tag in /etc/prettyversion.txt. This is one of the reasons that stock firmware rejects hacked kindle.
So, some hack doesn’t do anything to /etc/prettyversion.txt and remains invisible. That’s fine, but if you’d like to put something in it, this can be overcome by modifying /etc/prettyversion.txt in init script, not in install script. That means /etc/prettyversion.txt must be modified in init script at runlevel5 and restored to stock state when Kindle goes into runlevel3.
To sum up, a non-intrusive hack can be made with…
1) install and uninstall script must not modify /etc/prettyversion.txt directly. Put whatever necessary into init script. (adding and removing name tag along with whatever the hack needs to do)
2) when init script is started, add name tag string to /etc/prettyversion.txt. When init script is stopped, remove name tag string.
3) install script should create two sym-links, init script as /etc/rc5.d/S###### and as /etc/rc3.d/K######
4) uninstall script should remove the init script and sym-links created in 3)
The whole credit goes to kukyakya from my local forum. (I am just doing a quick and dirty translation and don't really understand what I am translating
kukyakya has successfully released a font hack in this manner. I am using it.
It's publicly available but the site is not in English, thus not sure I should link it.
Anyway let me remind you that kukyakya has a gmail account by the same name, if you have any thing to add.
I hope this is enough for gurus out there. What I most want to see is a screen saver hack done in this way.