no need to unshare

This commit is contained in:
5ec1cff
2024-01-02 23:49:19 +08:00
parent cbd0f0f0c3
commit 711a3e98d0
3 changed files with 2 additions and 18 deletions

View File

@@ -26,7 +26,7 @@ val commitHash by extra(gitCommitHash)
val minKsuVersion by extra(10940)
val minKsudVersion by extra(11412)
val maxKsuVersion by extra(20000)
val minMagiskVersion by extra(26300)
val minMagiskVersion by extra(26402)
val androidMinSdkVersion by extra(26)
val androidTargetSdkVersion by extra(34)

View File

@@ -566,22 +566,6 @@ static bool prepare_environment() {
}
return true;
});
int old_ns;
char wd[128];
if (getcwd(wd, sizeof(wd)) == nullptr) {
PLOGE("get cwd");
return false;
}
if (!switch_mnt_ns(1, &old_ns)) return false;
if (chdir(wd) == -1) {
PLOGE("chdir %s", wd);
return false;
}
if (!switch_mnt_ns(0, &old_ns)) return false;
if (chdir(wd) == -1) {
PLOGE("chdir %s", wd);
return false;
}
updateStatus();
return true;
}

View File

@@ -43,4 +43,4 @@ if [ -f $MODDIR/lib/libzygisk.so ];then
fi
[ "$DEBUG" = true ] && export RUST_BACKTRACE=1
unshare -m sh -c "./bin/zygisk-ptrace64 monitor &"
./bin/zygisk-ptrace64 monitor &