From 3df110dc87cfa18f210e62da5bbc4979fda6d148 Mon Sep 17 00:00:00 2001 From: harvey186 Date: Wed, 16 Oct 2024 08:32:52 +0200 Subject: [PATCH] bionic_legacy Change-Id: Ie4225baf8eb7ad06280980c22f475defb55c7d2d --- libc/system_properties/system_properties.cpp | 33 +++++++++++++------- 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/libc/system_properties/system_properties.cpp b/libc/system_properties/system_properties.cpp index 60974e8..7d859fc 100644 --- a/libc/system_properties/system_properties.cpp +++ b/libc/system_properties/system_properties.cpp @@ -241,19 +241,28 @@ uint32_t SystemProperties::AreaSerial() { } const prop_info* SystemProperties::Find(const char* name) { - const char* newName = redirectToProp(name); - - if (!initialized_) { - return nullptr; - } + async_safe_format_log(ANDROID_LOG_WARN, "libc", "Find prop %s", name); + if(strcmp(name, "ro.arch") == 0) async_safe_format_log(ANDROID_LOG_WARN, "libc", "Find propA"); + if (!initialized_) { + return nullptr; + } + if(strcmp(name, "ro.arch") == 0) async_safe_format_log(ANDROID_LOG_WARN, "libc", "Find propB"); - prop_area* pa = contexts_->GetPropAreaForName(newName); - if (!pa) { - async_safe_format_log(ANDROID_LOG_WARN, "libc", "Access denied finding property \"%s\"", name); - return nullptr; - } - - return pa->find(newName); + const char* newName = redirectToProp(name); + if(strcmp(name, "ro.arch") == 0) async_safe_format_log(ANDROID_LOG_WARN, "libc", "Find propC"); + + prop_area* pa = contexts_->GetPropAreaForName(newName); + if(strcmp(name, "ro.arch") == 0) async_safe_format_log(ANDROID_LOG_WARN, "libc", "Find propD"); + if (!pa) { + if(strcmp(name, "ro.arch") == 0) async_safe_format_log(ANDROID_LOG_WARN, "libc", "Find propE"); + async_safe_format_log(ANDROID_LOG_WARN, "libc", "Access denied finding property \"%s\"", name); + return nullptr; + } + if(strcmp(name, "ro.arch") == 0) async_safe_format_log(ANDROID_LOG_WARN, "libc", "Find propF"); + + const prop_info* ret = pa->find(newName); + if(strcmp(name, "ro.arch") == 0) async_safe_format_log(ANDROID_LOG_WARN, "libc", "Find propG"); + return ret; } static bool is_appcompat_override(const char* name) { -- 2.34.1