mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-08-15 00:27:25 +00:00
Proper 2SI detection
This commit is contained in:
@@ -182,6 +182,9 @@ void load_kernel_info(cmdline *cmd) {
|
||||
bool check_two_stage() {
|
||||
if (access("/apex", F_OK) == 0)
|
||||
return true;
|
||||
auto init = raw_data::mmap_ro("/init");
|
||||
if (access("/system/bin/init", F_OK) == 0)
|
||||
return true;
|
||||
// If we still have no indication, parse the original init and see what's up
|
||||
auto init = raw_data::mmap_ro("/.backup/init");
|
||||
return init.find("selinux_setup");
|
||||
}
|
||||
|
Reference in New Issue
Block a user