diff options
author | osm0sis <osm0sis@outlook.com> | 2020-01-24 14:54:39 -0400 |
---|---|---|
committer | osm0sis <osm0sis@outlook.com> | 2020-01-24 14:54:39 -0400 |
commit | 062b44c75a967a9d2a603459e1092f09e380e825 (patch) | |
tree | 9fc6046961cb4d07ab228d9805bbc5d7fb43dfd0 /META-INF/com/google/android | |
parent | be5c08b520fb90bad2f81eb9dca86c041623c0f8 (diff) |
Backend: work around ongoing TWRP SAR support fragmentation
TWRP now has 3(!) different competing implementations of SAR currently in use by maintainers:
1) /system as mountpoint in ramdisk/fstab and ANDROID_ROOT=/system, and possible symlink from /system_root to /system
2) /system_root as mountpoint in ramdisk/fstab, ANDROID_ROOT=/system_root, and possible symlink from /system to /system_root/system
3) /system_root as mountpoint in ramdisk/fstab, ANDROID_ROOT=/system, and possible symlink from /system to /system_root/system
Attempt to continue to accommodate this bullshit.
Diffstat (limited to 'META-INF/com/google/android')
-rwxr-xr-x | META-INF/com/google/android/update-binary | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/META-INF/com/google/android/update-binary b/META-INF/com/google/android/update-binary index 4e9b5cb..34dfc6c 100755 --- a/META-INF/com/google/android/update-binary +++ b/META-INF/com/google/android/update-binary @@ -86,12 +86,15 @@ umount_apex() { mount_all() { setup_mountpoint $ANDROID_ROOT; if ! is_mounted $ANDROID_ROOT; then - $BB mount -o ro -t auto $ANDROID_ROOT; + $BB mount -o ro -t auto $ANDROID_ROOT 2>/dev/null; fi; case $ANDROID_ROOT in /system_root) setup_mountpoint /system;; /system) - if [ -f /system/system/build.prop ]; then + if ! is_mounted /system && ! is_mounted /system_root; then + setup_mountpoint /system_root; + $BB mount -o ro -t auto /system_root; + elif [ -f /system/system/build.prop ]; then setup_mountpoint /system_root; $BB mount --move /system /system_root; if [ $? != 0 ]; then |