From 81aa56f60f6ef558eee00d4a6abdcb3c594e1ca5 Mon Sep 17 00:00:00 2001 From: topjohnwu Date: Mon, 27 May 2019 15:19:20 -0700 Subject: [PATCH] Support EROFS system-as-root devices Close #1381 --- native/jni/init/early_mount.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/native/jni/init/early_mount.cpp b/native/jni/init/early_mount.cpp index 12b08c312..472d2bf9e 100644 --- a/native/jni/init/early_mount.cpp +++ b/native/jni/init/early_mount.cpp @@ -116,7 +116,8 @@ void MagiskInit::early_mount() { sprintf(partname, "system%s", cmd.slot); setup_block(partname, block_dev); xmkdir("/system_root", 0755); - xmount(block_dev, "/system_root", "ext4", MS_RDONLY, nullptr); + if (xmount(block_dev, "/system_root", "ext4", MS_RDONLY, nullptr)) + xmount(block_dev, "/system_root", "erofs", MS_RDONLY, nullptr); xmkdir("/system", 0755); xmount("/system_root/system", "/system", nullptr, MS_BIND, nullptr);