You've already forked PlayIntegrityFork
mirror of
https://github.com/osm0sis/PlayIntegrityFork.git
synced 2025-09-06 06:37:06 +00:00
v13.7
This commit is contained in:
@@ -1,54 +1,29 @@
|
||||
package es.chiteroman.playintegrityfix;
|
||||
|
||||
import android.os.Build;
|
||||
import android.util.JsonReader;
|
||||
import android.util.Log;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileReader;
|
||||
import java.io.IOException;
|
||||
import java.lang.reflect.Field;
|
||||
import java.security.KeyStore;
|
||||
import java.security.KeyStoreException;
|
||||
import java.security.KeyStoreSpi;
|
||||
import java.security.Provider;
|
||||
import java.security.Security;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public final class EntryPoint {
|
||||
private static final Map<String, String> map = new HashMap<>();
|
||||
|
||||
private static void defaultProps() {
|
||||
map.putIfAbsent("PRODUCT", "bullhead");
|
||||
map.putIfAbsent("DEVICE", "bullhead");
|
||||
map.putIfAbsent("MANUFACTURER", "LGE");
|
||||
map.putIfAbsent("BRAND", "google");
|
||||
map.putIfAbsent("MODEL", "Nexus 5X");
|
||||
map.putIfAbsent("FINGERPRINT", "google/bullhead/bullhead:8.0.0/OPR6.170623.013/4283548:user/release-keys");
|
||||
map.putIfAbsent("SECURITY_PATCH", "2017-08-05");
|
||||
}
|
||||
private static final String PRODUCT = "sailfish";
|
||||
private static final String DEVICE = "sailfish";
|
||||
private static final String MANUFACTURER = "Google";
|
||||
private static final String BRAND = "google";
|
||||
private static final String MODEL = "Pixel";
|
||||
private static final String FINGERPRINT = "google/sailfish/sailfish:7.1.2/NZH54D/4146044:user/release-keys";
|
||||
private static final String SECURITY_PATCH = "2017-08-05";
|
||||
|
||||
public static void init() {
|
||||
spoofProvider();
|
||||
spoofDevice();
|
||||
}
|
||||
|
||||
public static void readProps(String path) {
|
||||
LOG("Read from Zygisk lib path: " + path);
|
||||
File file = new File(path);
|
||||
try (JsonReader reader = new JsonReader(new FileReader(file))) {
|
||||
reader.beginObject();
|
||||
while (reader.hasNext()) {
|
||||
map.put(reader.nextName(), reader.nextString());
|
||||
}
|
||||
reader.endObject();
|
||||
} catch (IOException e) {
|
||||
LOG("Couldn't read pif.prop file: " + e);
|
||||
defaultProps();
|
||||
}
|
||||
}
|
||||
|
||||
private static void spoofProvider() {
|
||||
final String KEYSTORE = "AndroidKeyStore";
|
||||
|
||||
@@ -76,14 +51,14 @@ public final class EntryPoint {
|
||||
}
|
||||
}
|
||||
|
||||
public static void spoofDevice() {
|
||||
setProp("PRODUCT", map.get("PRODUCT"));
|
||||
setProp("DEVICE", map.get("DEVICE"));
|
||||
setProp("MANUFACTURER", map.get("MANUFACTURER"));
|
||||
setProp("BRAND", map.get("BRAND"));
|
||||
setProp("MODEL", map.get("MODEL"));
|
||||
setProp("FINGERPRINT", map.get("FINGERPRINT"));
|
||||
setVersionProp("SECURITY_PATCH", map.get("SECURITY_PATCH"));
|
||||
static void spoofDevice() {
|
||||
setProp("PRODUCT", PRODUCT);
|
||||
setProp("DEVICE", DEVICE);
|
||||
setProp("MANUFACTURER", MANUFACTURER);
|
||||
setProp("BRAND", BRAND);
|
||||
setProp("MODEL", MODEL);
|
||||
setProp("FINGERPRINT", FINGERPRINT);
|
||||
setVersionProp("SECURITY_PATCH", SECURITY_PATCH);
|
||||
}
|
||||
|
||||
private static void setProp(String name, String value) {
|
||||
@@ -120,7 +95,7 @@ public final class EntryPoint {
|
||||
}
|
||||
}
|
||||
|
||||
public static void LOG(String msg) {
|
||||
static void LOG(String msg) {
|
||||
Log.d("PIF/Java", msg);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user