summaryrefslogtreecommitdiffstats
path: root/prebuilt/common/bin
diff options
context:
space:
mode:
authorBrint E. Kriebel <bekit@cyngn.com>2014-11-28 17:39:21 -0800
committerBrint E. Kriebel <bekit@cyngn.com>2015-03-04 01:18:26 +0000
commit1d055a3fbcb3967d7d05bb0a5c19c7ec99e02fb7 (patch)
tree92a4bc2dc56f1923dddb352fea42262593c26507 /prebuilt/common/bin
parent3428311ad8ea67499200d2b679f59e5275a5ed97 (diff)
downloadvendor_replicant-1d055a3fbcb3967d7d05bb0a5c19c7ec99e02fb7.zip
vendor_replicant-1d055a3fbcb3967d7d05bb0a5c19c7ec99e02fb7.tar.gz
vendor_replicant-1d055a3fbcb3967d7d05bb0a5c19c7ec99e02fb7.tar.bz2
otasigcheck: skip otasigcheck in headless mode
We should assume that headless mode is going to handle data wipe as needed. Change-Id: Iea01a061458f5b5ecc881e41ec8ac2200722eeed
Diffstat (limited to 'prebuilt/common/bin')
-rw-r--r--prebuilt/common/bin/otasigcheck.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/prebuilt/common/bin/otasigcheck.sh b/prebuilt/common/bin/otasigcheck.sh
index 7bf1228..ad7f3a3 100644
--- a/prebuilt/common/bin/otasigcheck.sh
+++ b/prebuilt/common/bin/otasigcheck.sh
@@ -9,6 +9,12 @@ if [ $? -eq 0 ]; then
exit 0
fi
+grep -q "Command:.*\"--headless\"" /tmp/recovery.log
+if [ $? -eq 0 ]; then
+ echo "Headless mode install; skipping signature check..."
+ exit 0
+fi
+
if [ -f /data/system/packages.xml -a -f /tmp/releasekey ]; then
relCert=$(grep -A3 'package name="com.android.htmlviewer"' /data/system/packages.xml | grep "cert index" | head -n 1 | sed -e 's|.*"\([[:digit:]][[:digit:]]*\)".*|\1|g')