mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-07-30 07:03:39 +00:00
Check binary existence before injecting zygisk bins
This commit is contained in:
parent
898580bf90
commit
5e050d7456
@ -440,12 +440,19 @@ fn inject_zygisk_bins(system: &mut FsNode, name: &str) {
|
|||||||
#[cfg(target_pointer_width = "32")]
|
#[cfg(target_pointer_width = "32")]
|
||||||
bin_path.append_path("magisk");
|
bin_path.append_path("magisk");
|
||||||
|
|
||||||
children.insert(
|
// There are some devices that announce ABI as 64 bit only, but ship with linker64
|
||||||
name.to_string(),
|
// because they make use of a special 32 bit to 64 bit translator (such as tango).
|
||||||
FsNode::File {
|
// In this case, magisk32 does not exist, so inserting it will cause bind mount
|
||||||
src: bin_path.to_owned(),
|
// failure and affect module mount. Native bridge injection does not support these
|
||||||
},
|
// kind of translators anyway, so simply check if magisk32 exists here.
|
||||||
);
|
if bin_path.exists() {
|
||||||
|
children.insert(
|
||||||
|
name.to_string(),
|
||||||
|
FsNode::File {
|
||||||
|
src: bin_path.to_owned(),
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user