- cmrebase: Rebase a Gerrit change and push it again
- mka: Builds using SCHED_BATCH on all processors
- reposync: Parallel repo sync using ionice and SCHED_BATCH
+- installboot: Installs a boot.img to the connected device.
+- installrecovery: Installs a recovery.img to the connected device.
- repodiff: Diff 2 different branches or tags within the same repo
Environment options:
fi
}
+function installrecovery()
+{
+ if [ ! -e "$OUT/recovery/root/etc/recovery.fstab" ];
+ then
+ echo "No recovery.fstab found. Build recovery first."
+ return 1
+ fi
+ if [ ! -e "$OUT/recovery.img" ];
+ then
+ echo "No recovery.img found. Run make recoveryimage first."
+ return 1
+ fi
+ PARTITION=`grep "^\/recovery" $OUT/recovery/root/etc/recovery.fstab | awk {'print $3'}`
+ if [ -z "$PARTITION" ];
+ then
+ echo "Unable to determine recovery partition."
+ return 1
+ fi
+ adb start-server
+ adb root
+ sleep 1
+ adb wait-for-device
+ adb remount
+ adb wait-for-device
+ if (adb shell cat /system/build.prop | grep -q "ro.cm.device=$CM_BUILD");
+ then
+ adb push $OUT/recovery.img /cache/
+ adb shell dd if=/cache/recovery.img of=$PARTITION
+ echo "Installation complete."
+ else
+ echo "The connected device does not appear to be $CM_BUILD, run away!"
+ fi
+}
function makerecipe() {
if [ -z "$1" ]