summaryrefslogtreecommitdiff
path: root/META-INF
diff options
context:
space:
mode:
authorosm0sis <osm0sis@outlook.com>2020-01-21 06:16:45 -0400
committerosm0sis <osm0sis@outlook.com>2020-01-21 06:16:45 -0400
commit7fb9efdb63b5249a6408fcaacf74c776e0b86f37 (patch)
treeccb35299c589bbbe33deb5617e661d0b3ab863db /META-INF
parent29210bc49236117478ee220aa4cc6e649db19421 (diff)
Backend: fix link restoration post-install
Diffstat (limited to 'META-INF')
-rwxr-xr-xMETA-INF/com/google/android/update-binary10
1 files changed, 7 insertions, 3 deletions
diff --git a/META-INF/com/google/android/update-binary b/META-INF/com/google/android/update-binary
index e8d240d..7beb19f 100755
--- a/META-INF/com/google/android/update-binary
+++ b/META-INF/com/google/android/update-binary
@@ -123,12 +123,16 @@ umount_apex() {
unset ANDROID_RUNTIME_ROOT ANDROID_TZDATA_ROOT BOOTCLASSPATH;
}
restore_env() {
+ local dir;
test "$savedpath" && export LD_LIBRARY_PATH="$savedpath";
test "$savedpre" && export LD_PRELOAD="$savedpre";
umount_all;
- ($bb mv -f /apex_link /apex;
- $bb mv -f /system_link /system;
- $bb mv -f /system_root_link /system_root;
+ (for dir in /apex /system /system_root; do
+ if [ -f "${dir}_link" ]; then
+ rmdir $dir;
+ $bb mv -f ${dir}_link $dir;
+ fi;
+ done;
$bb umount -l /dev/random) 2>/dev/null;
}
abort() {