We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a849ce9 commit 198479cCopy full SHA for 198479c
1 file changed
native/src/init/rootdir.rs
@@ -47,6 +47,7 @@ on property:init.svc.zygote=stopped
47
pub fn inject_custom_rc(mut rc_list: Vec<String>, fd: RawFd, tmp_dir: &Utf8CStr) {
48
let mut file = unsafe { File::from_raw_fd(fd) };
49
rc_list.iter().for_each(|rc| {
50
+ // Replace template arguments of rc scripts with dynamic paths
51
let rc = rc.replace("${MAGISKTMP}", tmp_dir.as_str());
52
write!(file, "\n{}\n", rc).ok();
53
});
@@ -76,6 +77,7 @@ impl MagiskInit {
76
77
.join(overlay)
78
.join("init.rc");
79
if init_rc.exists() {
80
+ // Do not allow overwrite init.rc
81
init_rc.remove().log_ok();
82
}
83
loop {
0 commit comments