support sony's init.real

This commit is contained in:
LoveSy
2026-01-21 14:34:43 +08:00
parent 0919db6b11
commit c29a709025

View File

@@ -43,7 +43,7 @@ impl MagiskInit {
// Use the apex folder to determine whether 2SI (Android 10+)
cstr!("/apex").exists() ||
// If we still have no indication, parse the original init and see what's up
MappedFile::open(backup_init())
MappedFile::open(Some(cstr!("/init.real")).take_if(|p| p.exists()).unwrap_or(backup_init()))
.map(|data| data.contains(b"selinux_setup"))
.unwrap_or(false)
}