From 4ee7cbdddee73048e0475ede53fbd0136b0e0a24 Mon Sep 17 00:00:00 2001 From: Chaosmaster Date: Fri, 5 Jun 2020 17:38:08 +0200 Subject: [PATCH] Remove /system -> /system_root/system symlink in ZIP-install when unmounting system /system_root/system is symlinked to /system on devices built with BOARD_BUILD_SYSTEM_ROOT_IMAGE Some ZIPs don't play well with a symlink when trying to mount to /system. Change-Id: Ifb0a105ddc0337353a7e1ac234c9f1e5b387e992 (cherry picked from commit 589daae9ccd2951263bd183125c0ad6de454e277) --- twinstall.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/twinstall.cpp b/twinstall.cpp index f31e55c8..7b1ca0c7 100755 --- a/twinstall.cpp +++ b/twinstall.cpp @@ -421,6 +421,8 @@ int TWinstall_zip(const char* path, int* wipe_cache) { gui_err("unmount_system_err=Failed unmounting System"); return -1; } + unlink("/system"); + mkdir("/system", 0755); } time_t start, stop;