3 Commits
v2.1.4 ... main

Author SHA1 Message Date
snake-4
8832d695ac Improved unmount logic (#93) 2025-08-01 19:18:35 +02:00
VisionR1
3ef02e5d28 Update README.md (#92)
Proper info, in the section about KernelSU & APatch.
2025-08-01 19:12:21 +02:00
snake-4
847d7fb255 Updated update_metadata 2025-02-23 01:19:45 +01:00
4 changed files with 31 additions and 26 deletions

View File

@@ -20,7 +20,7 @@ Using the **release** build is recommended over the debug build. Only use debug
### KernelSU & APatch users:
1. Install ZygiskNext.
1. Make sure the unmount setting is enabled for the target app in the KernelSU/APatch Manager.
1. Make sure the option `Umount modules/Exclude modifications` is enabled for the target app in the KernelSU/APatch Manager.
1. Disable `Enforce DenyList` in ZygiskNext settings if there is one.
### Magisk users:
@@ -48,4 +48,4 @@ Don't forget to give the project a star! Thanks again!
<!-- LICENSE -->
## License
Distributed under the MIT License. See `LICENSE` for more information.
Distributed under the MIT License. See `LICENSE` for more information.

View File

@@ -22,6 +22,7 @@
using namespace Parsers;
static const std::set<std::string> mountdir_list = {"/data/adb", "/debug_ramdisk"};
static const std::set<std::string> fsname_list = {"KSU", "APatch", "magisk", "worker"};
static const std::unordered_map<std::string, int> mount_flags_procfs = {
{"nosuid", MS_NOSUID},
@@ -38,33 +39,32 @@ static bool shouldUnmount(const mountinfo_entry &mount, const mountinfo_root_res
const auto &mount_point = mount.getMountPoint();
const auto &type = mount.getFilesystemType();
// Mount is from /data/adb
if (true_root.starts_with("/data/adb"))
return true;
// Unmount all mounts from and to directories in mountdir_list
for (const auto &mountdir : mountdir_list)
{
if (true_root.starts_with(mountdir) || mount_point.starts_with(mountdir))
return true;
// Mount is to /data/adb
if (mount_point.starts_with("/data/adb"))
return true;
// Unmount all overlayfs with lowerdir/upperdir/workdir in mountdir_list
if (type == "overlay")
{
const auto &options = mount.getSuperOptions();
if (options.contains("lowerdir") && options.at("lowerdir").starts_with(mountdir))
return true;
if (options.contains("upperdir") && options.at("upperdir").starts_with(mountdir))
return true;
if (options.contains("workdir") && options.at("workdir").starts_with(mountdir))
return true;
}
}
// Unmount all module overlayfs and tmpfs
if ((type == "overlay" || type == "tmpfs") && fsname_list.contains(mount.getMountSource()))
return true;
// Unmount all overlayfs with lowerdir/upperdir/workdir starting with /data/adb
if (type == "overlay")
{
const auto &options = mount.getSuperOptions();
if (options.contains("lowerdir") && options.at("lowerdir").starts_with("/data/adb"))
return true;
if (options.contains("upperdir") && options.at("upperdir").starts_with("/data/adb"))
return true;
if (options.contains("workdir") && options.at("workdir").starts_with("/data/adb"))
return true;
}
return false;
}

View File

@@ -1,3 +1,8 @@
## 2.1.4
* Fixed a problem causing Zygisk Assistant to be detectable.
* Updated prop scripts.
* Compiled with a newer compiler.
## 2.1.3
* Restored Shamiko v1.1.1 compatibility.
* Fixed bootloop on some Xiaomi devices.

View File

@@ -1,6 +1,6 @@
{
"version": "v2.1.3",
"versionCode": 213,
"zipUrl": "https://github.com/snake-4/Zygisk-Assistant/releases/download/v2.1.3/Zygisk-Assistant-v2.1.3-7b35d36-release.zip",
"version": "v2.1.4",
"versionCode": 214,
"zipUrl": "https://github.com/snake-4/Zygisk-Assistant/releases/download/v2.1.4/Zygisk-Assistant-v2.1.4-1013f8a-release.zip",
"changelog": "https://raw.githubusercontent.com/snake-4/Zygisk-Assistant/main/update_metadata/CHANGELOG.md"
}