From c35c7ce35813d2c6c76c582bed016ad3aeeb5cf7 Mon Sep 17 00:00:00 2001 From: osm0sis Date: Mon, 27 Jan 2020 16:25:21 -0400 Subject: AK3+Backend: /postinstall and opposite slot awareness for FlashAfterUpdate addon.d-v2 support - for A/B OTAs my FlashAfterUpdate addon.d script requires the zip to know about addon.d-v2 and act accordingly - signify support with #FLASHAFTERUPDATEV2 tag in updater-script to pass whitelist check since the majority of zips will not work correctly --- META-INF/com/google/android/update-binary | 5 +++-- META-INF/com/google/android/updater-script | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'META-INF') diff --git a/META-INF/com/google/android/update-binary b/META-INF/com/google/android/update-binary index 4fff323..252ff0a 100755 --- a/META-INF/com/google/android/update-binary +++ b/META-INF/com/google/android/update-binary @@ -10,8 +10,9 @@ $BOOTMODE || ps -A 2>/dev/null | grep zygote | grep -v grep >/dev/null && BOOTMO $BOOTMODE && DIR=/sdcard || DIR=$(dirname "$ZIPFILE"); +test -d /postinstall/tmp && POSTINSTALL=/postinstall; +test "$AKHOME" || AKHOME=$POSTINSTALL/tmp/anykernel; test "$ANDROID_ROOT" || ANDROID_ROOT=/system; -test "$AKHOME" || AKHOME=/tmp/anykernel; ui_print() { until [ ! "$1" ]; do @@ -318,7 +319,7 @@ do_modules() { $BB mount -o rw,remount -t auto /system; $BB mount -o rw,remount -t auto /vendor 2>/dev/null; for module in $(find . -name '*.ko'); do - modtarget=$(echo $module | $BB cut -c2-); + modtarget=$POSTINSTALL$(echo $module | $BB cut -c2-); if [ ! -e $modtarget ]; then case $module in */vendor/*) modcon=vendor;; diff --git a/META-INF/com/google/android/updater-script b/META-INF/com/google/android/updater-script index 8582673..f927e87 100644 --- a/META-INF/com/google/android/updater-script +++ b/META-INF/com/google/android/updater-script @@ -1 +1,2 @@ +#FLASHAFTERUPDATEV2 # Dummy file; update-binary is a shell script. -- cgit v1.2.3