Sync native and Java implementation

This commit is contained in:
topjohnwu 2024-07-19 23:22:08 -07:00
parent bbb8efe92c
commit 4c38af994d
2 changed files with 4 additions and 6 deletions

View File

@ -128,7 +128,7 @@ object Config : PreferenceConfig, DBConfig {
LocaleSetting.instance.setLocale(value)
}
var zygisk by dbSettings(Key.ZYGISK, false)
var zygisk by dbSettings(Key.ZYGISK, Info.isEmulator)
var suManager by dbStrings(Key.SU_MANAGER, "", true)
var keyStoreRaw by dbStrings(Key.KEYSTORE, "", true)

View File

@ -99,11 +99,9 @@ impl MagiskD {
}
pub fn daemon_entry() {
let mut qemu = get_prop(cstr!("ro.kernel.qemu"), false);
if qemu.is_empty() {
qemu = get_prop(cstr!("ro.boot.qemu"), false);
}
let is_emulator = qemu == "1";
let is_emulator = get_prop(cstr!("ro.kernel.qemu"), false) == "1"
|| get_prop(cstr!("ro.boot.qemu"), false) == "1"
|| get_prop(cstr!("ro.product.device"), false).contains("vsoc");
// Load config status
let mut buf = Utf8CStrBufArr::<64>::new();