mirror of
https://github.com/chiteroman/PlayIntegrityFix.git
synced 2025-01-19 03:22:39 +02:00
Remove weird code...
Forgot to remove it XD
This commit is contained in:
parent
763607e2f8
commit
41a0d6fa61
@ -3,7 +3,6 @@ package es.chiteroman.playintegrityfix;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.lang.reflect.Method;
|
||||
import java.security.Key;
|
||||
import java.security.KeyStoreException;
|
||||
import java.security.KeyStoreSpi;
|
||||
@ -24,30 +23,10 @@ public final class CustomKeyStoreSpi extends KeyStoreSpi {
|
||||
return keyStoreSpi.engineGetKey(alias, password);
|
||||
}
|
||||
|
||||
private static String getProcessName() {
|
||||
try {
|
||||
Class<?> activityThread = Class.forName("android.app.ActivityThread");
|
||||
|
||||
Method method = activityThread.getDeclaredMethod("currentProcessName");
|
||||
|
||||
method.setAccessible(true);
|
||||
|
||||
return (String) method.invoke(null);
|
||||
|
||||
} catch (Throwable t) {
|
||||
EntryPoint.LOG(t.toString());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Certificate[] engineGetCertificateChain(String alias) {
|
||||
|
||||
boolean droidGuard = Arrays.stream(Thread.currentThread().getStackTrace()).anyMatch(e -> e.getClassName().toLowerCase(Locale.US).contains("droidguard"));
|
||||
|
||||
String processName = getProcessName();
|
||||
|
||||
if (processName != null && droidGuard && processName.equals("com.google.android.gms.unstable")) {
|
||||
if (Arrays.stream(Thread.currentThread().getStackTrace()).anyMatch(e -> e.getClassName().toLowerCase(Locale.US).contains("droidguard"))) {
|
||||
EntryPoint.LOG("DroidGuard call detected. Throw exception!");
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user