summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Bateman <jetison.24@gmail.com>2012-08-25 00:25:02 -0500
committerDaniel Bateman <jetison.24@gmail.com>2012-08-25 18:30:56 -0500
commit3163b23bfb9c09e81def9d027dd565d86fe5fdb4 (patch)
tree035db9a7e3fbb506829f1002667400954faaba2b
parent5b6f09deafb007ae4993e02a9252846b601ee094 (diff)
downloaddevice_samsung_aries-common-3163b23bfb9c09e81def9d027dd565d86fe5fdb4.zip
device_samsung_aries-common-3163b23bfb9c09e81def9d027dd565d86fe5fdb4.tar.gz
device_samsung_aries-common-3163b23bfb9c09e81def9d027dd565d86fe5fdb4.tar.bz2
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
-rwxr-xr-xupdater.sh6
1 files changed, 6 insertions, 0 deletions
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