Spoof ID and SECURITY_PATCH in native props

This commit is contained in:
chiteroman 2024-08-13 23:53:48 +02:00
parent a1bdcb0995
commit e1e024e677
No known key found for this signature in database

View File

@ -208,6 +208,8 @@ private:
if (!json) return; if (!json) return;
const cJSON *api_level = cJSON_GetObjectItemCaseSensitive(json, "DEVICE_INITIAL_SDK_INT"); 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"); const cJSON *isDebug = cJSON_GetObjectItemCaseSensitive(json, "DEBUG");
if (api_level) { if (api_level) {
@ -220,6 +222,14 @@ private:
cJSON_DeleteItemFromObjectCaseSensitive(json, "DEVICE_INITIAL_SDK_INT"); 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)) { if (isDebug && cJSON_IsBool(isDebug)) {
DEBUG = cJSON_IsTrue(isDebug); DEBUG = cJSON_IsTrue(isDebug);
cJSON_DeleteItemFromObjectCaseSensitive(json, "DEBUG"); cJSON_DeleteItemFromObjectCaseSensitive(json, "DEBUG");