@ -3,6 +3,12 @@
# Validate that the incoming OTA is compatible with an already-installed
# Validate that the incoming OTA is compatible with an already-installed
# system
# system
grep -q "Command:.*\"--wipe\_data\"" /tmp/recovery.log
if [ $? -eq 0 ] ; then
echo "Data will be wiped after install; skipping signature check..."
exit 0
fi
if [ -f /data/system/packages.xml -a -f /tmp/releasekey ] ; then
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' )
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' )