mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-12-03 10:32:09 +00:00
Adjust class structures
This commit is contained in:
@@ -40,14 +40,6 @@ constexpr const char wrapper[] =
|
||||
;
|
||||
|
||||
void RootFSInit::setup_rootfs() {
|
||||
if (cmd->system_as_root) {
|
||||
// Clone rootfs
|
||||
LOGD("Clone root dir from system to rootfs\n");
|
||||
int system_root = xopen("/system_root", O_RDONLY | O_CLOEXEC);
|
||||
clone_dir(system_root, root, false);
|
||||
close(system_root);
|
||||
}
|
||||
|
||||
if (patch_sepolicy()) {
|
||||
constexpr char SYSTEM_INIT[] = "/system/bin/init";
|
||||
// If init is symlink, copy it to rootfs so we can patch
|
||||
@@ -131,6 +123,16 @@ void RootFSInit::setup_rootfs() {
|
||||
close(fd);
|
||||
}
|
||||
|
||||
void SARCompatInit::setup_rootfs() {
|
||||
// Clone rootfs
|
||||
LOGD("Clone root dir from system to rootfs\n");
|
||||
int system_root = xopen("/system_root", O_RDONLY | O_CLOEXEC);
|
||||
clone_dir(system_root, root, false);
|
||||
close(system_root);
|
||||
|
||||
RootFSInit::setup_rootfs();
|
||||
}
|
||||
|
||||
bool MagiskInit::patch_sepolicy() {
|
||||
bool patch_init = false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user