Rename dir name

This commit is contained in:
vvb2060
2024-01-05 01:47:15 +08:00
committed by John Wu
parent 92b305a389
commit 10069215f4
7 changed files with 19 additions and 25 deletions

View File

@@ -13,7 +13,6 @@ using namespace std;
static vector<string> rc_list;
#define ROOTMIR MIRRDIR "/system_root"
#define NEW_INITRC_DIR "/system/etc/init/hw"
#define INIT_RC "init.rc"
@@ -250,10 +249,10 @@ void MagiskInit::patch_ro_root() {
if (tmp_dir == "/sbin") {
// Recreate original sbin structure
xmkdir(ROOTMIR, 0755);
xmount("/", ROOTMIR, nullptr, MS_BIND, nullptr);
recreate_sbin(ROOTMIR "/sbin", true);
xumount2(ROOTMIR, MNT_DETACH);
xmkdir(MIRRDIR, 0755);
xmount("/", MIRRDIR, nullptr, MS_BIND, nullptr);
recreate_sbin(MIRRDIR "/sbin", true);
xumount2(MIRRDIR, MNT_DETACH);
} else {
// Restore debug_ramdisk
xmount("/data/debug_ramdisk", "/debug_ramdisk", nullptr, MS_MOVE, nullptr);