From 3163b23bfb9c09e81def9d027dd565d86fe5fdb4 Mon Sep 17 00:00:00 2001 From: Daniel Bateman Date: Sat, 25 Aug 2012 00:25:02 -0500 Subject: aries-common: support older/non-cwm recoveries when installing Lack of UPDATE_PACKAGE being set when updater.sh is run from stock was causing a loss of IMEI when installing. Thanks to festis74 from XDA for sending me a debug analysis of the IMEI not being restored. Change-Id: Ic00a95025f1069692878bbf4da1a0e3bbb538e58 --- updater.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/updater.sh b/updater.sh index d092235..5baad86 100755 --- a/updater.sh +++ b/updater.sh @@ -39,6 +39,12 @@ else DATA_SIZE='442499072' fi +# check for old/non-cwm recovery. +if ! /tmp/busybox test -n "$UPDATE_PACKAGE" ; then + # scrape package location from /tmp/recovery.log + UPDATE_PACKAGE=`/tmp/busybox cat /tmp/recovery.log | /tmp/busybox grep 'Update location:' | /tmp/busybox tail -n 1 | /tmp/busybox cut -d ' ' -f 3-` +fi + # check if we're running on a bml, mtd (old) or mtd (current) device if /tmp/busybox test -e /dev/block/bml7 ; then # we're running on a bml device -- cgit v1.1