mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-12-04 23:45:23 +00:00
init: Use apex dir to determine whether 2SI
This commit is contained in:
parent
0f3cfef278
commit
830fc758b9
@ -236,6 +236,9 @@ bool check_two_stage() {
|
|||||||
return true;
|
return true;
|
||||||
if (access("/system/bin/init", F_OK) == 0)
|
if (access("/system/bin/init", F_OK) == 0)
|
||||||
return true;
|
return true;
|
||||||
|
// Use the apex folder to determine whether 2SI (Android 10+)
|
||||||
|
if (access("/apex", F_OK) == 0)
|
||||||
|
return true;
|
||||||
// If we still have no indication, parse the original init and see what's up
|
// If we still have no indication, parse the original init and see what's up
|
||||||
mmap_data init(backup_init());
|
mmap_data init(backup_init());
|
||||||
return init.contains("selinux_setup");
|
return init.contains("selinux_setup");
|
||||||
|
Loading…
Reference in New Issue
Block a user