diff --git a/app/src/main/cpp/main.cpp b/app/src/main/cpp/main.cpp index e982ad5..365c71b 100644 --- a/app/src/main/cpp/main.cpp +++ b/app/src/main/cpp/main.cpp @@ -235,32 +235,27 @@ static void companion(int fd) { fclose(dex); } + FILE *json; + if (std::filesystem::exists(JSON_FILE_PATH)) { - FILE *json = fopen(JSON_FILE_PATH, "rb"); - if (json) { - fseek(json, 0, SEEK_END); - jsonSize = ftell(json); - fseek(json, 0, SEEK_SET); + json = fopen(JSON_FILE_PATH, "rb"); - jsonVector.resize(jsonSize); - fread(jsonVector.data(), 1, jsonSize, json); + } else { + std::filesystem::remove(JSON_TEMP_FILE); + system("/data/adb/modules/playintegrityfix/curl -o /data/adb/modules/playintegrityfix/temp https://raw.githubusercontent.com/chiteroman/PlayIntegrityFix/main/pif.json"); + json = fopen(JSON_TEMP_FILE, "rb"); + } - fclose(json); - } - } else if (std::filesystem::exists(JSON_TEMP_FILE)) { - FILE *json = fopen(JSON_TEMP_FILE, "rb"); + if (json) { + fseek(json, 0, SEEK_END); + jsonSize = ftell(json); + fseek(json, 0, SEEK_SET); - if (json) { - fseek(json, 0, SEEK_END); - jsonSize = ftell(json); - fseek(json, 0, SEEK_SET); + jsonVector.resize(jsonSize); + fread(jsonVector.data(), 1, jsonSize, json); - jsonVector.resize(jsonSize); - fread(jsonVector.data(), 1, jsonSize, json); - - fclose(json); - } + fclose(json); } write(fd, &dexSize, sizeof(long)); diff --git a/changelog.md b/changelog.md index 8636dbc..052f4e2 100644 --- a/changelog.md +++ b/changelog.md @@ -2,10 +2,18 @@ We have a Telegram channel! If you want to share your knowledge join: https://t.me/playintegrityfix -# v14.0 +# v14.1 -Google banned v13.9 fingerprint. +If you don't want to use your custom props to spoof, remove the file. -Now you must search a valid fingerprint, you must modify /data/adb/pif.json file to spoof a valid certified device. +On terminal as root: rm -f /data/adb/pif.json -Good luck. \ No newline at end of file +I will try to update the fingerprint when Google bans it. + +Instead reinstalling the module you only need to kill GMS unstable process. + +On terminal as root: killall com.google.android.gms.unstable + +When installing this version you must reboot the device. + +Any problem report on GitHub :) \ No newline at end of file diff --git a/module/bin/arm64-v8a/curl b/module/bin/arm64-v8a/curl new file mode 100644 index 0000000..6305598 Binary files /dev/null and b/module/bin/arm64-v8a/curl differ diff --git a/module/bin/armeabi-v7a/curl b/module/bin/armeabi-v7a/curl new file mode 100644 index 0000000..70ad236 Binary files /dev/null and b/module/bin/armeabi-v7a/curl differ diff --git a/module/bin/x86/curl b/module/bin/x86/curl new file mode 100644 index 0000000..549c933 Binary files /dev/null and b/module/bin/x86/curl differ diff --git a/module/bin/x86_64/curl b/module/bin/x86_64/curl new file mode 100644 index 0000000..f4415ca Binary files /dev/null and b/module/bin/x86_64/curl differ diff --git a/module/customize.sh b/module/customize.sh index 43ed0ef..4aa69fb 100644 --- a/module/customize.sh +++ b/module/customize.sh @@ -3,6 +3,13 @@ if [ "$API" -lt 26 ]; then abort "!!! You can't use this module on Android < 8.0" fi +# Check custom pif.json +if [ -e /data/adb/pif.json ]; then + ui_print "!!! WARNING, You are using a custom pif.json. Module will use it." + ui_print "!!! If you want to use recommended one, remove this file." + ui_print "!!! To remove it, execute as root: rm -f /data/adb/pif.json" +fi + # SafetyNet-Fix module is obsolete and it's incompatible with PIF. if [ -d /data/adb/modules/safetynet-fix ]; then touch /data/adb/modules/safetynet-fix/remove @@ -13,3 +20,8 @@ fi if [ -d /data/adb/modules/MagiskHidePropsConf ]; then ui_print "!!! WARNING, 'MagiskHidePropsConf' module may cause issues with PIF" fi + +# curl +mv -f $MODPATH/bin/$ABI/curl $MODPATH +rm -rf $MODPATH/bin +set_perm $MODPATH/curl root root 777 diff --git a/module/module.prop b/module/module.prop index 9a840ec..3d13d96 100644 --- a/module/module.prop +++ b/module/module.prop @@ -1,7 +1,7 @@ id=playintegrityfix name=Play Integrity Fix -version=v14.0 -versionCode=14000 +version=v14.1 +versionCode=14100 author=chiteroman description=Fix CTS profile (SafetyNet) and DEVICE verdict (Play Integrity). updateJson=https://raw.githubusercontent.com/chiteroman/PlayIntegrityFix/main/update.json diff --git a/module/pif.json b/module/pif.json index 57ca789..3177165 100644 --- a/module/pif.json +++ b/module/pif.json @@ -1,3 +1,6 @@ +// THIS IS A TEMPLATE, IF YOU WANT TO USE YOUR CUSTOM PROPS +// MOVE THIS FILE TO /data/adb/pif.json AND MODIFY IT +// REMOVE THIS LINES { "PRODUCT": "", "DEVICE": "", diff --git a/module_resetprop/bin/arm64-v8a/curl b/module_resetprop/bin/arm64-v8a/curl new file mode 100644 index 0000000..6305598 Binary files /dev/null and b/module_resetprop/bin/arm64-v8a/curl differ diff --git a/module_resetprop/bin/armeabi-v7a/curl b/module_resetprop/bin/armeabi-v7a/curl new file mode 100644 index 0000000..70ad236 Binary files /dev/null and b/module_resetprop/bin/armeabi-v7a/curl differ diff --git a/module_resetprop/bin/x86/curl b/module_resetprop/bin/x86/curl new file mode 100644 index 0000000..549c933 Binary files /dev/null and b/module_resetprop/bin/x86/curl differ diff --git a/module_resetprop/bin/x86_64/curl b/module_resetprop/bin/x86_64/curl new file mode 100644 index 0000000..f4415ca Binary files /dev/null and b/module_resetprop/bin/x86_64/curl differ diff --git a/module_resetprop/customize.sh b/module_resetprop/customize.sh index 1a56b3e..d16f04b 100644 --- a/module_resetprop/customize.sh +++ b/module_resetprop/customize.sh @@ -3,6 +3,13 @@ if [ "$API" -lt 26 ]; then abort "!!! You can't use this module on Android < 8.0" fi +# Check custom pif.json +if [ -e /data/adb/pif.json ]; then + ui_print "!!! WARNING, You are using a custom pif.json. Module will use it." + ui_print "!!! If you want to use recommended one, remove this file." + ui_print "!!! To remove it, execute as root: rm -f /data/adb/pif.json" +fi + # SafetyNet-Fix module is obsolete and it's incompatible with PIF. if [ -d /data/adb/modules/safetynet-fix ]; then touch /data/adb/modules/safetynet-fix/remove @@ -14,7 +21,11 @@ if [ -d /data/adb/modules/MagiskHidePropsConf ]; then ui_print "!!! WARNING, MagiskHidePropsConf module may cause issues with PIF" fi -# use our resetprop +# curl & resetprop +mv -f $MODPATH/bin/$ABI/curl $MODPATH mv -f $MODPATH/bin/$ABI/resetprop $MODPATH + rm -rf $MODPATH/bin -set_perm $MODPATH/resetprop root root 755 + +set_perm $MODPATH/curl root root 777 +set_perm $MODPATH/resetprop root root 777 diff --git a/module_resetprop/module.prop b/module_resetprop/module.prop index 5bb2a77..bb791e8 100644 --- a/module_resetprop/module.prop +++ b/module_resetprop/module.prop @@ -1,7 +1,7 @@ id=playintegrityfix name=Play Integrity Fix (resetprop) -version=v14.0-resetprop -versionCode=14000 +version=v14.1-resetprop +versionCode=14100 author=chiteroman description=Fix CTS profile (SafetyNet) and DEVICE verdict (Play Integrity). updateJson=https://raw.githubusercontent.com/chiteroman/PlayIntegrityFix/main/update.json diff --git a/module_resetprop/pif.json b/module_resetprop/pif.json index 57ca789..3177165 100644 --- a/module_resetprop/pif.json +++ b/module_resetprop/pif.json @@ -1,3 +1,6 @@ +// THIS IS A TEMPLATE, IF YOU WANT TO USE YOUR CUSTOM PROPS +// MOVE THIS FILE TO /data/adb/pif.json AND MODIFY IT +// REMOVE THIS LINES { "PRODUCT": "", "DEVICE": "", diff --git a/update.json b/update.json index bb4dede..52c45ea 100644 --- a/update.json +++ b/update.json @@ -1,6 +1,6 @@ { - "version": "v14.0", - "versionCode": 14000, - "zipUrl": "https://github.com/chiteroman/PlayIntegrityFix/releases/download/v14.0/PlayIntegrityFix_v14.0.zip", + "version": "v14.1", + "versionCode": 14100, + "zipUrl": "https://github.com/chiteroman/PlayIntegrityFix/releases/download/v14.1/PlayIntegrityFix_v14.1.zip", "changelog": "https://raw.githubusercontent.com/chiteroman/PlayIntegrityFix/main/changelog.md" } \ No newline at end of file