Skip to content

Commit 830fc75

Browse files
vvb2060topjohnwu
authored andcommitted
init: Use apex dir to determine whether 2SI
1 parent 0f3cfef commit 830fc75

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

native/src/init/getinfo.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,9 @@ bool check_two_stage() {
236236
return true;
237237
if (access("/system/bin/init", F_OK) == 0)
238238
return true;
239+
// Use the apex folder to determine whether 2SI (Android 10+)
240+
if (access("/apex", F_OK) == 0)
241+
return true;
239242
// If we still have no indication, parse the original init and see what's up
240243
mmap_data init(backup_init());
241244
return init.contains("selinux_setup");

0 commit comments

Comments
 (0)