Skip to content

Commit

Permalink
v14.3
Browse files Browse the repository at this point in the history
  • Loading branch information
chiteroman committed Dec 11, 2023
1 parent a4dc168 commit 70c4c3d
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 48 deletions.
44 changes: 24 additions & 20 deletions app/src/main/cpp/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down Expand Up @@ -69,7 +72,6 @@ class PlayIntegrityFix : public zygisk::ModuleBase {
}

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
Expand All @@ -78,6 +80,8 @@ class PlayIntegrityFix : public zygisk::ModuleBase {
return;
}

bool isGms = false, isGmsUnstable = false;

auto process = env->GetStringUTFChars(args->nice_name, nullptr);

if (process) {
Expand All @@ -89,24 +93,24 @@ class PlayIntegrityFix : public zygisk::ModuleBase {

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();

read(fd, &size, sizeof(long));
if (isGmsUnstable) { // Unstable GMS process, which runs DroidGuard
uint32_t size = 0;
int fd = api->connectCompanion();

if (size > 0) {
vector.resize(size);
read(fd, vector.data(), size);
} else {
LOGD("Couldn't read classes.dex");
api->setOption(zygisk::DLCLOSE_MODULE_LIBRARY);
}
read(fd, &size, sizeof(uint32_t));

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);
Expand Down Expand Up @@ -163,7 +167,7 @@ class PlayIntegrityFix : public zygisk::ModuleBase {

static void companion(int fd) {
std::vector<uint8_t> vector;
long size = 0;
uint32_t size = 0;

FILE *dex = fopen("/data/adb/modules/playintegrityfix/classes.dex", "rb");

Expand All @@ -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);
}

Expand Down
14 changes: 7 additions & 7 deletions app/src/main/java/es/chiteroman/playintegrityfix/EntryPoint.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@ private static void spoofProvider() {
}

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) {
Expand Down
28 changes: 12 additions & 16 deletions module/customize.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions module/module.prop
Original file line number Diff line number Diff line change
@@ -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
6 changes: 3 additions & 3 deletions update.json
Original file line number Diff line number Diff line change
@@ -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"
}

0 comments on commit 70c4c3d

Please sign in to comment.