Mount persist partition mirror pre-init

This commit is contained in:
topjohnwu
2019-12-09 02:44:49 -05:00
parent d22b9c26b6
commit 08177c3dd8
3 changed files with 38 additions and 14 deletions
+2 -5
View File
@@ -192,8 +192,7 @@ constexpr const char wrapper[] =
;
static void sbin_overlay(const raw_data &self, const raw_data &config) {
LOGD("Mount /sbin tmpfs overlay\n");
xmount("tmpfs", "/sbin", "tmpfs", 0, "mode=755");
mount_sbin();
// Dump binaries
xmkdir(MAGISKTMP, 0755);
@@ -302,9 +301,7 @@ void SARBase::patch_rootdir() {
sbin_overlay(self, config);
// Mount system_root mirror
xmkdir(MIRRDIR, 0);
xmkdir(ROOTMIR, 0);
xmkdir(BLOCKDIR, 0);
xmkdir(ROOTMIR, 0755);
mknod(ROOTBLK, S_IFBLK | 0600, system_dev);
if (xmount(ROOTBLK, ROOTMIR, "ext4", MS_RDONLY, nullptr))
xmount(ROOTBLK, ROOTMIR, "erofs", MS_RDONLY, nullptr);