Later check persistent_properties

`daemon_entry` calls `getprop` which initializes sysprop impl and checks whether we need to load persistent property file. On FDE devices, magiskd starts before /data is actually decrypted, and the check always fails. Thus `persist_getprop("persist.sys.safemode")` will always fail.
This commit is contained in:
canyie
2022-07-20 15:37:01 +08:00
committed by John Wu
parent 6077c989a7
commit 8423dc8d63
3 changed files with 13 additions and 8 deletions

View File

@@ -238,7 +238,6 @@ struct resetprop : public sysprop {
static sysprop_stub *get_impl() {
static sysprop_stub *impl = nullptr;
if (impl == nullptr) {
use_pb = access(PERSISTENT_PROPERTY_DIR "/persistent_properties", R_OK) == 0;
#ifdef APPLET_STUB_MAIN
if (__system_properties_init()) {
LOGE("resetprop: __system_properties_init error\n");