mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-12-24 18:57:37 +00:00
No need to mount ROOTMIR if tmp_dir != /sbin
This commit is contained in:
parent
24ba4ab95b
commit
aa7846c1c0
@ -233,14 +233,14 @@ void MagiskInit::patch_ro_root() {
|
||||
setup_tmp(tmp_dir.data());
|
||||
chdir(tmp_dir.data());
|
||||
|
||||
// Recreate original sbin structure if necessary
|
||||
if (tmp_dir == "/sbin") {
|
||||
// Mount system_root mirror
|
||||
xmkdir(ROOTMIR, 0755);
|
||||
xmount("/", ROOTMIR, nullptr, MS_BIND, nullptr);
|
||||
mount_list.emplace_back(tmp_dir + "/" ROOTMIR);
|
||||
|
||||
// Recreate original sbin structure if necessary
|
||||
if (tmp_dir == "/sbin")
|
||||
recreate_sbin(ROOTMIR "/sbin", true);
|
||||
xumount2(ROOTMIR, MNT_DETACH);
|
||||
}
|
||||
|
||||
xrename("overlay.d", ROOTOVL);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user