Skip to content

Commit

Permalink
unmount ksu tmpfs
Browse files Browse the repository at this point in the history
  • Loading branch information
5ec1cff committed Dec 31, 2023
1 parent cd71452 commit 07c2901
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions loader/src/injector/unmount.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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);
}
}
Expand Down Expand Up @@ -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)) {
Expand Down

0 comments on commit 07c2901

Please sign in to comment.