diff --git a/META-INF/com/google/android/update-binary b/META-INF/com/google/android/update-binary index 080c32b..e58858f 100755 --- a/META-INF/com/google/android/update-binary +++ b/META-INF/com/google/android/update-binary @@ -54,9 +54,11 @@ setup_mountpoint() { is_mounted() { mount | grep -q " $1 "; } mount_apex() { [ -d /system_root/system/apex ] || return 1; - local apex dest loop minorx num var; + local apex dest loop minorx num shcon var; setup_mountpoint /apex; mount -t tmpfs tmpfs /apex -o mode=755 && touch /apex/apextmp; + shcon=$(cat /proc/self/attr/current); + echo "u:r:su:s0" > /proc/self/attr/current; # work around LOS Recovery not allowing loop mounts in recovery context minorx=1; [ -e /dev/block/loop1 ] && minorx=$(ls -l /dev/block/loop1 | awk '{ print $6 }'); num=0; @@ -92,6 +94,7 @@ mount_apex() { *) mount -o bind $apex $dest && echo "$dest (bind)" >&2;; esac; done; + echo "$shcon" > /proc/self/attr/current; for var in $(grep -o 'export .* /.*' /system_root/init.environ.rc | awk '{ print $2 }'); do eval OLD_${var}=\$$var; done; diff --git a/META-INF/com/google/android/updater-script b/META-INF/com/google/android/updater-script index 4e4449b..2ae84f0 100644 --- a/META-INF/com/google/android/updater-script +++ b/META-INF/com/google/android/updater-script @@ -3,4 +3,4 @@ # Dummy file; update-binary is a shell script (DO NOT CHANGE) # # -# AK_BASE_VERSION=20230525 +# AK_BASE_VERSION=20230526