Compare commits

..

1 Commits
cpio ... sony

Author SHA1 Message Date
LoveSy
c29a709025 support sony's init.real 2026-01-21 14:34:43 +08:00
2 changed files with 3 additions and 3 deletions

View File

@@ -137,10 +137,10 @@ struct Add {
#[derive(FromArgs)]
#[argh(subcommand, name = "ls")]
struct List {
#[argh(switch, short = 'r')]
recursive: bool,
#[argh(positional, default = r#"String::from("/")"#)]
path: String,
#[argh(switch, short = 'r')]
recursive: bool,
}
pub(crate) fn print_cpio_usage() {

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)
}