From d8d79ec060727394515adaec93a764ab938968b5 Mon Sep 17 00:00:00 2001 From: Dobrica Pavlinusic Date: Sun, 4 Nov 2012 12:20:51 +0100 Subject: [PATCH] hands-free update to latest build --- adb-install-update.sh | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100755 adb-install-update.sh diff --git a/adb-install-update.sh b/adb-install-update.sh new file mode 100755 index 0000000..978490c --- /dev/null +++ b/adb-install-update.sh @@ -0,0 +1,28 @@ +#!/bin/sh -x + +# The recovery tool communicates with the main system through /cache files. +# /cache/recovery/command - INPUT - command line for tool, one arg per line +# /cache/recovery/log - OUTPUT - combined log file from recovery run(s) +# /cache/recovery/intent - OUTPUT - intent that was passed in +# +# The arguments which may be supplied in the recovery.command file: +# --send_intent=anystring - write the text out to recovery.intent +# --update_package=root:path - verify install an OTA package file +# --wipe_data - erase user data (and cache), then reboot +# --wipe_cache - wipe cache (but not user data), then reboot +# +# After completing, we remove /cache/recovery/command and reboot. + +if [ ! -e "$1" ] ; then + echo "Usage: $0 update.zip" + exit 1 +fi + +#adb push $1 /sdcard/update.zip + +adb remount +adb shell "echo 'boot-recovery ' > /cache/recovery/command" +adb shell "echo '--update_package=/sdcard/update.zip' >> /cache/recovery/command" +#adb shell "echo '--wipe_cache' >> /cache/recovery/command" +adb shell "echo 'reboot' >> /cache/recovery/command" +adb shell "reboot recovery" -- 2.20.1