diff --git a/prebuilt/common/bin/otasigcheck.sh b/prebuilt/common/bin/otasigcheck.sh index ad7f3a3e..99fdaec2 100644 --- a/prebuilt/common/bin/otasigcheck.sh +++ b/prebuilt/common/bin/otasigcheck.sh @@ -15,14 +15,71 @@ if [ $? -eq 0 ]; then 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') +if [ -f "/data/system/packages.xml" -a -f "/tmp/releasekey" ]; then + relkey=$(cat "/tmp/releasekey") + OLDIFS="$IFS" + IFS="" + while read line; do + params=${line# *