Unverified Commit 33f51542 authored by 残页's avatar 残页 Committed by GitHub

Inject binaries into /system if sbin not accessible

Some Android 11+ devices have the /sbin partition but not accessible by the global shell (`PATH` doesn't contain `/sbin`). Not only custom ROMs but also some stock ROMs have the same behavior so I believe it is something we need to deal with.
Fix #6427, fix #4309, fix #5728, fix #3593
parent ed37ddd5
......@@ -614,7 +614,7 @@ void magic_mount() {
system->collect_files(module, fd);
close(fd);
}
if (MAGISKTMP != "/sbin") {
if (MAGISKTMP != "/sbin" || !str_contains(getenv("PATH") ?: "", "/sbin")) {
// Need to inject our binaries into /system/bin
inject_magisk_bins(system);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment