From b92e80fbc6ff56081dccaa0e88098a1e7795d5aa Mon Sep 17 00:00:00 2001 From: osm0sis Date: Sat, 30 Aug 2025 22:21:27 -0300 Subject: [PATCH] Fix errant Windows line endings --- .../playintegrityfix/EntryPointVending.java | 124 +++++++++--------- 1 file changed, 62 insertions(+), 62 deletions(-) diff --git a/app/src/main/java/es/chiteroman/playintegrityfix/EntryPointVending.java b/app/src/main/java/es/chiteroman/playintegrityfix/EntryPointVending.java index 2b9c7d3..8cae6dd 100644 --- a/app/src/main/java/es/chiteroman/playintegrityfix/EntryPointVending.java +++ b/app/src/main/java/es/chiteroman/playintegrityfix/EntryPointVending.java @@ -1,62 +1,62 @@ -package es.chiteroman.playintegrityfix; - -import android.annotation.SuppressLint; -import android.os.Build; -import java.lang.reflect.Field; -import android.util.Log; - -public final class EntryPointVending { - - private static void LOG(String msg) { - Log.d("PIF/Java:PS", msg); - } - - @SuppressLint("DefaultLocale") - public static void init(int verboseLogs, int spoofVendingFinger, int spoofVendingSdk, String vendingFingerprintValue) { - // Only spoof FINGERPRINT to Play Store if not forcing Android <13 Play Integrity verdict - if (spoofVendingSdk < 1) { - if (spoofVendingFinger < 1) return; - String oldValue; - try { - Field field = Build.class.getDeclaredField("FINGERPRINT"); - field.setAccessible(true); - oldValue = String.valueOf(field.get(null)); - if (oldValue.equals(vendingFingerprintValue)) { - if (verboseLogs > 2) LOG(String.format("[FINGERPRINT]: %s (unchanged)", oldValue)); - field.setAccessible(false); - return; - } - field.set(null, vendingFingerprintValue); - field.setAccessible(false); - LOG(String.format("[FINGERPRINT]: %s -> %s", oldValue, vendingFingerprintValue)); - } catch (NoSuchFieldException e) { - LOG("FINGERPRINT field not found: " + e); - } catch (SecurityException | IllegalAccessException | IllegalArgumentException | - NullPointerException | ExceptionInInitializerError e) { - LOG("FINGERPRINT field not accessible: " + e); - } - } else { - int requestSdk = spoofVendingSdk == 1 ? 32 : spoofVendingSdk; - int targetSdk = Math.min(Build.VERSION.SDK_INT, requestSdk); - int oldValue; - try { - Field field = Build.VERSION.class.getDeclaredField("SDK_INT"); - field.setAccessible(true); - oldValue = field.getInt(null); - if (oldValue == targetSdk) { - if (verboseLogs > 2) LOG(String.format("[SDK_INT]: %d (unchanged)", oldValue)); - field.setAccessible(false); - return; - } - field.set(null, targetSdk); - field.setAccessible(false); - LOG(String.format("[SDK_INT]: %d -> %d", oldValue, targetSdk)); - } catch (NoSuchFieldException e) { - LOG("SDK_INT field not found: " + e); - } catch (SecurityException | IllegalAccessException | IllegalArgumentException | - NullPointerException | ExceptionInInitializerError e) { - LOG("SDK_INT field not accessible: " + e); - } - } - } -} +package es.chiteroman.playintegrityfix; + +import android.annotation.SuppressLint; +import android.os.Build; +import java.lang.reflect.Field; +import android.util.Log; + +public final class EntryPointVending { + + private static void LOG(String msg) { + Log.d("PIF/Java:PS", msg); + } + + @SuppressLint("DefaultLocale") + public static void init(int verboseLogs, int spoofVendingFinger, int spoofVendingSdk, String vendingFingerprintValue) { + // Only spoof FINGERPRINT to Play Store if not forcing Android <13 Play Integrity verdict + if (spoofVendingSdk < 1) { + if (spoofVendingFinger < 1) return; + String oldValue; + try { + Field field = Build.class.getDeclaredField("FINGERPRINT"); + field.setAccessible(true); + oldValue = String.valueOf(field.get(null)); + if (oldValue.equals(vendingFingerprintValue)) { + if (verboseLogs > 2) LOG(String.format("[FINGERPRINT]: %s (unchanged)", oldValue)); + field.setAccessible(false); + return; + } + field.set(null, vendingFingerprintValue); + field.setAccessible(false); + LOG(String.format("[FINGERPRINT]: %s -> %s", oldValue, vendingFingerprintValue)); + } catch (NoSuchFieldException e) { + LOG("FINGERPRINT field not found: " + e); + } catch (SecurityException | IllegalAccessException | IllegalArgumentException | + NullPointerException | ExceptionInInitializerError e) { + LOG("FINGERPRINT field not accessible: " + e); + } + } else { + int requestSdk = spoofVendingSdk == 1 ? 32 : spoofVendingSdk; + int targetSdk = Math.min(Build.VERSION.SDK_INT, requestSdk); + int oldValue; + try { + Field field = Build.VERSION.class.getDeclaredField("SDK_INT"); + field.setAccessible(true); + oldValue = field.getInt(null); + if (oldValue == targetSdk) { + if (verboseLogs > 2) LOG(String.format("[SDK_INT]: %d (unchanged)", oldValue)); + field.setAccessible(false); + return; + } + field.set(null, targetSdk); + field.setAccessible(false); + LOG(String.format("[SDK_INT]: %d -> %d", oldValue, targetSdk)); + } catch (NoSuchFieldException e) { + LOG("SDK_INT field not found: " + e); + } catch (SecurityException | IllegalAccessException | IllegalArgumentException | + NullPointerException | ExceptionInInitializerError e) { + LOG("SDK_INT field not accessible: " + e); + } + } + } +}