-Hidden Shutdown Options using keys (credit to Pete):
To Remove These Options Delete /system/bin/shutdown
*Shutdown: hold power & half pressed camera button
*Reboot: hold power & volume down button
*Reboot Recovery: hold power & volume up button
I was intrigued when the way to disable this new feature was to erase /system/bin/shutdown, so I looked at the contents of that script:
Looks pretty straightforward to me. That must not be what actually checks the keys, though. I looked at a diff between the V01 and V02 update files - and that shutdown script is the only change!Code:#!/system/bin/sh stop; stop dhcpcd; sleep 1; for i in `cat /proc/mounts | cut -f 2 -d " "`; do busybox mount -o remount,ro $i 2>&1 > /dev/null; done sync; if [ "$1" = "-r" ]; then toolbox reboot; fi if [ "$1" = "-rr" ]; then toolbox reboot recovery; else reboot -p; fi
Does this mean that the hidden recovery options were there all along and the shutdown script was just missing? Did you have to do something else to enable this feature, Pete?
I'm tempted to go one step further and map those keys to OTHER things by editing this script. It'll be a little (a lot) kludgy to have a shutdown script that does other stuff that isn't shutting down, but remapping hardware keys to custom linux scripts can't be a bad thing...