From e1e024e6771ffde959ef681577ee8571c84834fd Mon Sep 17 00:00:00 2001 From: chiteroman Date: Tue, 13 Aug 2024 23:53:48 +0200 Subject: [PATCH] Spoof ID and SECURITY_PATCH in native props --- app/src/main/cpp/main.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app/src/main/cpp/main.cpp b/app/src/main/cpp/main.cpp index 3787640..6decb85 100644 --- a/app/src/main/cpp/main.cpp +++ b/app/src/main/cpp/main.cpp @@ -208,6 +208,8 @@ private: if (!json) return; const cJSON *api_level = cJSON_GetObjectItemCaseSensitive(json, "DEVICE_INITIAL_SDK_INT"); + const cJSON *security_patch = cJSON_GetObjectItemCaseSensitive(json, "SECURITY_PATCH"); + const cJSON *build_id = cJSON_GetObjectItemCaseSensitive(json, "ID"); const cJSON *isDebug = cJSON_GetObjectItemCaseSensitive(json, "DEBUG"); if (api_level) { @@ -220,6 +222,14 @@ private: cJSON_DeleteItemFromObjectCaseSensitive(json, "DEVICE_INITIAL_SDK_INT"); } + if (security_patch && cJSON_IsString(security_patch)) { + SECURITY_PATCH = security_patch->valuestring; + } + + if (build_id && cJSON_IsString(build_id)) { + BUILD_ID = build_id->valuestring; + } + if (isDebug && cJSON_IsBool(isDebug)) { DEBUG = cJSON_IsTrue(isDebug); cJSON_DeleteItemFromObjectCaseSensitive(json, "DEBUG");