mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-12-12 10:46:07 +00:00
Use /metadata/watchdog as preinit dir if exists
Since Android 15, all domains are allowed to search /metadata so preinit dir will be exposed. Use /metadata/watchdog when /metadata is chosen as preinit device, and the dir is available (since Android 11).
This commit is contained in:
@@ -144,6 +144,8 @@ string resolve_preinit_dir(const char *base_dir) {
|
||||
dir += "/unencrypted/magisk";
|
||||
} else if (access((dir + "/adb").data(), F_OK) == 0) {
|
||||
dir += "/adb/modules";
|
||||
} else if (access((dir + "/watchdog").data(), F_OK) == 0) {
|
||||
dir += "/watchdog/magisk";
|
||||
} else {
|
||||
dir += "/magisk";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user