unmount ksu tmpfs

This commit is contained in:
5ec1cff
2024-01-01 00:12:54 +08:00
parent cd714527e9
commit 07c29016a5

View File

@@ -11,7 +11,6 @@ using namespace std::string_view_literals;
namespace {
constexpr auto MODULE_DIR = "/data/adb/modules";
constexpr auto KSU_OVERLAY_SOURCE = "KSU";
constexpr auto ZYGISK_FUSE_SOURCE = "zygisk";
const std::vector<std::string> KSU_PARTITIONS{"/system", "/vendor", "/product", "/system_ext", "/odm", "/oem"};
void lazy_unmount(const char* mountpoint) {
@@ -47,8 +46,8 @@ void revert_unmount_ksu() {
&& std::find(KSU_PARTITIONS.begin(), KSU_PARTITIONS.end(), info.target) != KSU_PARTITIONS.end()) {
targets.emplace_back(info.target);
}
// Unmount fuse
if (info.type == "fuse" && info.source == ZYGISK_FUSE_SOURCE) {
// Unmount /debug_ramdisk
if (info.type == "tmpfs" && info.source == KSU_OVERLAY_SOURCE) {
targets.emplace_back(info.target);
}
}
@@ -79,10 +78,6 @@ void revert_unmount_magisk() {
if (info.target.starts_with("/data/adb")) {
targets.emplace_back(info.target);
}
// Unmount fuse
if (info.type == "fuse" && info.source == ZYGISK_FUSE_SOURCE) {
targets.emplace_back(info.target);
}
}
for (auto& s: reversed(targets)) {