diff --git a/native/src/core/bootstages.cpp b/native/src/core/bootstages.cpp index 6014831a0..c294ac278 100644 --- a/native/src/core/bootstages.cpp +++ b/native/src/core/bootstages.cpp @@ -1,7 +1,6 @@ #include #include #include -#include #include #include #include @@ -71,19 +70,7 @@ static void mount_mirrors() { LOGI("* Mounting module root\n"); if (access(SECURE_DIR, F_OK) == 0 || (SDK_INT < 24 && xmkdir(SECURE_DIR, 0700))) { if (auto dest = MAGISKTMP + "/" MODULEMNT; mount_mirror(MODULEROOT, dest)) { - // remount to clear nosuid flag - struct statvfs st{}; - statvfs(dest.data(), &st); - for (const auto &info: parse_mount_info("self")) { - if (info.target != dest) { - continue; - } - // strip rw, from fs options - if (auto pos = info.fs_option.find_first_of(','); pos != string::npos) { - xmount("", dest.data(), nullptr, MS_REMOUNT | (st.f_flag & ~MS_NOSUID), info.fs_option.data() + pos + 1); - } - break; - } + xmount(nullptr, dest.data(), nullptr, MS_REMOUNT | MS_BIND, nullptr); restorecon(); chmod(SECURE_DIR, 0700); }