Skip svc for ro properties

ro properties' triggers should only be triggered once, otherwise it
may undefined behaviour.
This patch avoids triggering ro properties' actions again when using
resetprop to modify them.

Co-authored-by: 5ec1cff <ewtqyqyewtqyqy@gmail.com>
This commit is contained in:
LoveSy
2023-12-17 03:12:08 +08:00
committed by topjohnwu
parent a003336497
commit f41994cb52
3 changed files with 16 additions and 12 deletions

View File

@@ -313,12 +313,12 @@ void load_modules() {
native_bridge_orig = "0";
}
native_bridge = native_bridge_orig != "0" ? ZYGISKLDR + native_bridge_orig : ZYGISKLDR;
set_prop(NBPROP, native_bridge.data(), true);
set_prop(NBPROP, native_bridge.data());
// Weather Huawei's Maple compiler is enabled.
// If so, system server will be created by a special Zygote which ignores the native bridge
// and make system server out of our control. Avoid it by disabling.
if (get_prop("ro.maple.enable") == "1") {
set_prop("ro.maple.enable", "0", true);
set_prop("ro.maple.enable", "0");
}
inject_zygisk_libs(system);
}