[core] Quick fix for bootloop in some devices (#107)

This commit is contained in:
LoveSy 2021-02-09 15:57:18 +08:00 committed by GitHub
parent 3e11c276c6
commit a4e69792d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -112,7 +112,7 @@ namespace lspd {
LOGE("Failed to get symbol of __system_property_get"); LOGE("Failed to get symbol of __system_property_get");
return; return;
} }
hook_func(sym, reinterpret_cast<void *>(decltype(__system_property_get)::replace), HookFunction(hook_func, sym, reinterpret_cast<void *>(decltype(__system_property_get)::replace),
reinterpret_cast<void **>(&decltype(__system_property_get)::backup)); reinterpret_cast<void **>(&decltype(__system_property_get)::backup));
if (GetAndroidApiLevel() >= __ANDROID_API_P__) { if (GetAndroidApiLevel() >= __ANDROID_API_P__) {
@ -122,7 +122,7 @@ namespace lspd {
LOGE("Failed to get symbol of _ZN7android4base11GetPropertyERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES9_"); LOGE("Failed to get symbol of _ZN7android4base11GetPropertyERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES9_");
return; return;
} }
hook_func(sym, reinterpret_cast<void *>(decltype(GetProperty)::replace), HookFunction(hook_func, sym, reinterpret_cast<void *>(decltype(GetProperty)::replace),
reinterpret_cast<void **>(&decltype(GetProperty)::backup)); reinterpret_cast<void **>(&decltype(GetProperty)::backup));
} }