From 278f060c2a7852eef93fcf855e6181b3b57abb12 Mon Sep 17 00:00:00 2001 From: NiLuJe Date: Mon, 29 Feb 2016 17:09:44 +0100 Subject: [PATCH] Disable the Kindle passcode while we're running Because we cannot deal with it properly... We'd need to be able to stop eating all input, and have a lot of luck with refresh timings to actually have the popup visible at the right time. TL;DR: it's a mess, kill it with fire. Fix #1811 --- platform/kindle/koreader.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/platform/kindle/koreader.sh b/platform/kindle/koreader.sh index 4f451e093..ce2329f75 100755 --- a/platform/kindle/koreader.sh +++ b/platform/kindle/koreader.sh @@ -44,6 +44,7 @@ fi export AWESOME_STOPPED="no" PILLOW_HARD_DISABLED="no" PILLOW_SOFT_DISABLED="no" +PASSCODE_DISABLED="no" # Keep track of if we were started through KUAL FROM_KUAL="no" @@ -166,6 +167,14 @@ if [ -d /mnt/us/linkfonts/fonts ] ; then fi fi +# check if we need to disable the system passcode, because it messes with us in fun and interesting (and, more to the point, intractable) ways... +# NOTE: The most egregious one being that it inhibits the power button event on wakeup until the passcode is validated, which we can't do, since we capture all input... +if [ -f "/var/local/system/userpasswdenabled" ] ; then + logmsg "Disabling system passcode . . ." + rm -f "/var/local/system/userpasswdenabled" + PASSCODE_DISABLED="yes" +fi + # check if we are supposed to shut down the Amazon framework if [ "${STOP_FRAMEWORK}" == "yes" ] ; then logmsg "Stopping the framework . . ." @@ -315,3 +324,8 @@ if [ "${INIT_TYPE}" == "upstart" -o "$(uname -r)" == "2.6.31-rt11-lab126" ] ; th iptables -D INPUT -i wlan0 -p tcp --dport 49152:49162 -j ACCEPT fi +if [ "${PASSCODE_DISABLED}" == "yes" ] ; then + logmsg "Restoring system passcode . . ." + touch "/var/local/system/userpasswdenabled" +fi +