diff --git a/app/src/main/cpp/main.cpp b/app/src/main/cpp/main.cpp index ce6461c..87a7d0b 100644 --- a/app/src/main/cpp/main.cpp +++ b/app/src/main/cpp/main.cpp @@ -25,13 +25,16 @@ static void modify_callback(void *cookie, const char *name, const char *value, u std::string_view prop(name); if (prop.ends_with("api_level")) { - value = "21"; + value = "23"; LOGD("[%s]: %s", name, value); } else if (prop.ends_with("security_patch")) { - value = "2020-05-05"; + value = "2018-01-05"; + LOGD("[%s]: %s", name, value); + } else if (prop.ends_with("vndk.version")) { + value = "23"; LOGD("[%s]: %s", name, value); } else if (prop == "ro.build.id") { - value = "QQ2A.200501.001.B3"; + value = "NRD90M"; LOGD("[%s]: %s", name, value); } @@ -69,7 +72,6 @@ public: } void preAppSpecialize(zygisk::AppSpecializeArgs *args) override { - bool isGms = false, isGmsUnstable = false; if (to_app_id(args->uid) < 10000 || to_app_id(args->uid) > 19999 || // not app process (args->is_child_zygote && *(args->is_child_zygote))) { // app_zygote @@ -78,6 +80,8 @@ public: return; } + bool isGms = false, isGmsUnstable = false; + auto process = env->GetStringUTFChars(args->nice_name, nullptr); if (process) { @@ -89,24 +93,24 @@ public: if (isGms) { // GMS processes api->setOption(zygisk::FORCE_DENYLIST_UNMOUNT); + } - if (isGmsUnstable) { // Unstable GMS process, which runs DroidGuard - long size = 0; - int fd = api->connectCompanion(); + if (isGmsUnstable) { // Unstable GMS process, which runs DroidGuard + uint32_t size = 0; + int fd = api->connectCompanion(); - read(fd, &size, sizeof(long)); + read(fd, &size, sizeof(uint32_t)); - if (size > 0) { - vector.resize(size); - read(fd, vector.data(), size); - } else { - LOGD("Couldn't read classes.dex"); - api->setOption(zygisk::DLCLOSE_MODULE_LIBRARY); - } - - close(fd); - return; + if (size > 0) { + vector.resize(size); + read(fd, vector.data(), size); + } else { + LOGD("Couldn't read classes.dex"); + api->setOption(zygisk::DLCLOSE_MODULE_LIBRARY); } + + close(fd); + return; } api->setOption(zygisk::DLCLOSE_MODULE_LIBRARY); @@ -163,7 +167,7 @@ private: static void companion(int fd) { std::vector vector; - long size = 0; + uint32_t size = 0; FILE *dex = fopen("/data/adb/modules/playintegrityfix/classes.dex", "rb"); @@ -178,7 +182,7 @@ static void companion(int fd) { fclose(dex); } - write(fd, &size, sizeof(long)); + write(fd, &size, sizeof(uint32_t)); write(fd, vector.data(), size); } diff --git a/app/src/main/java/es/chiteroman/playintegrityfix/EntryPoint.java b/app/src/main/java/es/chiteroman/playintegrityfix/EntryPoint.java index b23b5fc..bdf10be 100644 --- a/app/src/main/java/es/chiteroman/playintegrityfix/EntryPoint.java +++ b/app/src/main/java/es/chiteroman/playintegrityfix/EntryPoint.java @@ -45,13 +45,13 @@ public final class EntryPoint { } static void spoofDevice() { - setProp("PRODUCT", "taimen"); - setProp("DEVICE", "taimen"); - setProp("MANUFACTURER", "Google"); - setProp("BRAND", "google"); - setProp("MODEL", "Pixel 2 XL"); - setProp("FINGERPRINT", "google/taimen/taimen:10/QQ2A.200501.001.B3/6396602:user/release-keys"); - setVersionProp("SECURITY_PATCH", "2020-05-05"); + setProp("PRODUCT", "foster_e_hdd"); + setProp("DEVICE", "foster"); + setProp("MANUFACTURER", "NVIDIA"); + setProp("BRAND", "NVIDIA"); + setProp("MODEL", "SHIELD Android TV"); + setProp("FINGERPRINT", "NVIDIA/foster_e_hdd/foster:7.0/NRD90M/2427173_1038.2788:user/release-keys"); + setVersionProp("SECURITY_PATCH", "2018-01-05"); } private static void setProp(String name, String value) { diff --git a/module/customize.sh b/module/customize.sh index 1e4ac75..da32c28 100644 --- a/module/customize.sh +++ b/module/customize.sh @@ -13,30 +13,26 @@ if [ -d /data/adb/modules/MagiskHidePropsConf ]; then ui_print "- ! WARNING, MagiskHidePropsConf module may cause issues with PIF" fi -# Check if ROM is xiaomi.eu -if [ "$(resetprop ro.build.host)" = "xiaomi.eu" ] || [ "$(resetprop ro.build.host)" = "EliteDevelopment" ]; then +# Remove xiaomi.eu apps - ui_print "- ! Detected Xiaomi.eu custom ROM." - - if [ -d "/product/app/XiaomiEUInject" ]; then +if [ -d "/product/app/XiaomiEUInject" ]; then - directory="$MODPATH/product/app/XiaomiEUInject" + directory="$MODPATH/product/app/XiaomiEUInject" - [ -d "$directory" ] || mkdir -p "$directory" + [ -d "$directory" ] || mkdir -p "$directory" - touch "$directory/.replace" + touch "$directory/.replace" - ui_print "- XiaomiEUInject app removed." - fi + ui_print "- XiaomiEUInject app removed." +fi - if [ -d "/system/app/XInjectModule" ]; then +if [ -d "/system/app/XInjectModule" ]; then - directory="$MODPATH/system/app/XInjectModule" + directory="$MODPATH/system/app/XInjectModule" - [ -d "$directory" ] || mkdir -p "$directory" + [ -d "$directory" ] || mkdir -p "$directory" - touch "$directory/.replace" + touch "$directory/.replace" - ui_print "- XInjectModule app removed." - fi + ui_print "- XInjectModule app removed." fi \ No newline at end of file diff --git a/module/module.prop b/module/module.prop index 563e8f6..be7f126 100644 --- a/module/module.prop +++ b/module/module.prop @@ -1,7 +1,7 @@ id=playintegrityfix name=Play Integrity Fix -version=v14.2.1 -versionCode=14210 +version=v14.3 +versionCode=14300 author=chiteroman description=Fuck Play Integrity API. updateJson=https://raw.githubusercontent.com/chiteroman/PlayIntegrityFix/main/update.json \ No newline at end of file diff --git a/update.json b/update.json index 0a38793..c87b358 100644 --- a/update.json +++ b/update.json @@ -1,6 +1,6 @@ { - "version": "v14.2.1", - "versionCode": 14210, - "zipUrl": "https://github.com/chiteroman/PlayIntegrityFix/releases/download/v14.2.1/PlayIntegrityFix_v14.2.1.zip", + "version": "v14.3", + "versionCode": 14300, + "zipUrl": "https://github.com/chiteroman/PlayIntegrityFix/releases/download/v14.3/PlayIntegrityFix_v14.3.zip", "changelog": "https://raw.githubusercontent.com/chiteroman/PlayIntegrityFix/main/changelog.md" } \ No newline at end of file