Move worker mount to magiskinit

This commit is contained in:
LoveSy
2024-08-14 21:36:15 +08:00
committed by John Wu
parent 838e1e254d
commit 1db80228e8
4 changed files with 26 additions and 22 deletions

View File

@@ -236,6 +236,7 @@ void MagiskInit::setup_tmp(const char *path) {
xmkdir(INTLROOT, 0711);
xmkdir(DEVICEDIR, 0711);
xmkdir(WORKERDIR, 0);
mount_preinit_dir(preinit_dev);
@@ -251,6 +252,9 @@ void MagiskInit::setup_tmp(const char *path) {
chdir(path);
// Prepare worker
xmount(WORKERDIR, WORKERDIR, nullptr, MS_BIND, nullptr);
// Use isolated devpts if kernel support
if (access("/dev/pts/ptmx", F_OK) == 0) {
xmkdirs(SHELLPTS, 0755);