From 711a3e98d09e0e1e29a90c7e46f06fb2d256444f Mon Sep 17 00:00:00 2001 From: 5ec1cff Date: Tue, 2 Jan 2024 23:49:19 +0800 Subject: [PATCH] no need to unshare --- build.gradle.kts | 2 +- loader/src/ptracer/monitor.cpp | 16 ---------------- module/src/post-fs-data.sh | 2 +- 3 files changed, 2 insertions(+), 18 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 1d66768..15d64bd 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -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) diff --git a/loader/src/ptracer/monitor.cpp b/loader/src/ptracer/monitor.cpp index 4308d9e..57b7016 100644 --- a/loader/src/ptracer/monitor.cpp +++ b/loader/src/ptracer/monitor.cpp @@ -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; } diff --git a/module/src/post-fs-data.sh b/module/src/post-fs-data.sh index 6948ef8..c6e9d4d 100644 --- a/module/src/post-fs-data.sh +++ b/module/src/post-fs-data.sh @@ -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 &