You've already forked PlayIntegrityFork
mirror of
https://github.com/osm0sis/PlayIntegrityFork.git
synced 2025-09-06 06:37:06 +00:00
fix xiaomi.eu
This commit is contained in:
@@ -51,5 +51,4 @@ Their devs are already working on it: [click me](https://xiaomi.eu/community/thr
|
|||||||
If Xiaomi.eu devs drop support for your device and this module doesn't work you must change the ROM if you want to pass DEVICE verdict.
|
If Xiaomi.eu devs drop support for your device and this module doesn't work you must change the ROM if you want to pass DEVICE verdict.
|
||||||
|
|
||||||
## Thanks to
|
## Thanks to
|
||||||
- [libcxx-prefab](https://github.com/RikkaW/libcxx-prefab)
|
|
||||||
- [Dobby](https://github.com/jmpews/Dobby)
|
- [Dobby](https://github.com/jmpews/Dobby)
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ android {
|
|||||||
externalNativeBuild {
|
externalNativeBuild {
|
||||||
cmake {
|
cmake {
|
||||||
arguments += "-DANDROID_STL=none"
|
arguments += "-DANDROID_STL=none"
|
||||||
arguments += "-DCMAKE_BUILD_TYPE=Release"
|
arguments += "-DCMAKE_BUILD_TYPE=MinSizeRel"
|
||||||
|
|
||||||
cFlags += "-fvisibility=hidden"
|
cFlags += "-fvisibility=hidden"
|
||||||
cFlags += "-fvisibility-inlines-hidden"
|
cFlags += "-fvisibility-inlines-hidden"
|
||||||
|
|||||||
@@ -45,6 +45,11 @@ my_system_property_read_callback(const prop_info *pi,
|
|||||||
|
|
||||||
static void doHook() {
|
static void doHook() {
|
||||||
void *handle = DobbySymbolResolver("libc.so", "__system_property_read_callback");
|
void *handle = DobbySymbolResolver("libc.so", "__system_property_read_callback");
|
||||||
|
if (handle == nullptr) {
|
||||||
|
LOGD("Couldn't find '__system_property_read_callback' handle. Report to @chiteroman");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
LOGD("Found '__system_property_read_callback' handle at %p", handle);
|
||||||
DobbyHook(handle, (void *) my_system_property_read_callback,
|
DobbyHook(handle, (void *) my_system_property_read_callback,
|
||||||
(void **) &o_system_property_read_callback);
|
(void **) &o_system_property_read_callback);
|
||||||
}
|
}
|
||||||
@@ -92,18 +97,17 @@ public:
|
|||||||
long size = 0;
|
long size = 0;
|
||||||
read(fd, &size, sizeof(size));
|
read(fd, &size, sizeof(size));
|
||||||
|
|
||||||
if (size > 0) {
|
if (size < 1) {
|
||||||
|
|
||||||
char buffer[size];
|
|
||||||
read(fd, buffer, size);
|
|
||||||
|
|
||||||
close(fd);
|
close(fd);
|
||||||
|
LOGD("Couldn't load classes.dex, does the file exist?");
|
||||||
moduleDex.insert(moduleDex.end(), buffer, buffer + size);
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
char buffer[size];
|
||||||
|
read(fd, buffer, size);
|
||||||
|
|
||||||
|
moduleDex.insert(moduleDex.end(), buffer, buffer + size);
|
||||||
|
|
||||||
close(fd);
|
close(fd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user