#!/sbin/sh # Validate that the incoming OTA is compatible with an already-installed # 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 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 relkey=$(cat "/tmp/releasekey") OLDIFS="$IFS" IFS="" while read line; do if [ "${#line}" -gt 4094 ]; then continue fi params=${line# *