summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVishal Bhoj <vishal.bhoj@linaro.org>2012-05-17 05:49:52 +0000
committerVishal Bhoj <vishal.bhoj@linaro.org>2012-05-17 17:13:25 +0000
commit5354f31770ce020f97befa91f78b43faa83aca1c (patch)
tree1dc2c689ccc2a24a95c21c921ab4ad636dbbf623
parent971d86c17789efb24767410edf0199e8076cae87 (diff)
common: Add disablesuspend scriptlinaro_android_4.0.3
It is derived from liuyq's version but can run locally on the device. It needs to be run once boot to homescreen. Change-Id: Ie769def79b66fd800d1b65fe891a5ff740230e6c Signed-off-by: Vishal Bhoj <vishal.bhoj@linaro.org>
-rw-r--r--common.mk1
-rwxr-xr-xdisablesuspend.sh26
2 files changed, 27 insertions, 0 deletions
diff --git a/common.mk b/common.mk
index dc60160..2027e5e 100644
--- a/common.mk
+++ b/common.mk
@@ -61,6 +61,7 @@ V8BENCHMARKS := $(foreach js,$(wildcard $(TOP)/external/v8/benchmarks/*.js),\
PRODUCT_COPY_FILES := \
device/linaro/common/wallpaper_info.xml:data/system/wallpaper_info.xml \
+ device/linaro/common/disablesuspend.sh:system/bin/disablesuspend.sh \
$(V8BENCHMARKS)
$(call inherit-product, $(SRC_TARGET_DIR)/product/core.mk)
diff --git a/disablesuspend.sh b/disablesuspend.sh
new file mode 100755
index 0000000..35ccfad
--- /dev/null
+++ b/disablesuspend.sh
@@ -0,0 +1,26 @@
+#!/system/bin/sh
+# Copyright (C) 2012 Linaro Limited
+
+# Author: Linaro Validation Team <linaro-dev@lists.linaro.org>
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+ stay_awake="delete from system where name='stay_on_while_plugged_in'; insert into system (name, value) values ('stay_on_while_plugged_in','3');"
+ screen_sleep="delete from system where name='screen_off_timeout'; insert into system (name, value) values ('screen_off_timeout','-1');"
+ lockscreen="delete from secure where name='lockscreen.disabled'; insert into secure (name, value) values ('lockscreen.disabled','1');"
+ sqlite3 /data/data/com.android.providers.settings/databases/settings.db "${stay_awake}" ## set stay awake
+ sqlite3 /data/data/com.android.providers.settings/databases/settings.db "${screen_sleep}" # set sleep to none
+ sqlite3 /data/data/com.android.providers.settings/databases/settings.db "${lockscreen}" ##set lock screen to none
+ input keyevent 82 ##unlock the home screen
+ service call power 1 i32 26 ##acquireWakeLock FULL_WAKE_LOCK