diff --git a/res/values/scoop_strings.xml b/res/values/scoop_strings.xml
index 7f4ce56..5f3a537 100644
--- a/res/values/scoop_strings.xml
+++ b/res/values/scoop_strings.xml
@@ -113,5 +113,10 @@
Spoof Snapchat as a Pixel XL to fix possible chat issues
Select PIF JSON File
Pick PIF JSON file to be used for spoofing play integrity
+ Successfully downloaded pif.json. Spoofing as %1$s for play integrity.
+ Failed to spoof properties.
+ Play Integrity Fix properties
+ Show all currently set PIF properties
+ Error loading PIF properties
diff --git a/res/xml/spoofing.xml b/res/xml/spoofing.xml
index c92e1bc..963c6d2 100644
--- a/res/xml/spoofing.xml
+++ b/res/xml/spoofing.xml
@@ -25,6 +25,11 @@
android:title="@string/pif_spoofing_title"
android:summary="@string/pif_spoofing_summary"/>
+
+
{
+ showPropertiesDialog();
+ return true;
+ });
+ }
}
@Override
@@ -100,6 +112,40 @@ public class Spoofing extends SettingsPreferenceFragment implements
}
}
+ private void showPropertiesDialog() {
+ StringBuilder properties = new StringBuilder();
+ try {
+ JSONObject jsonObject = new JSONObject();
+ String[] keys = {
+ "persist.sys.pihooks_ID",
+ "persist.sys.pihooks_BRAND",
+ "persist.sys.pihooks_DEVICE",
+ "persist.sys.pihooks_FINGERPRINT",
+ "persist.sys.pihooks_MANUFACTURER",
+ "persist.sys.pihooks_MODEL",
+ "persist.sys.pihooks_PRODUCT",
+ "persist.sys.pihooks_SECURITY_PATCH",
+ "persist.sys.pihooks_DEVICE_INITIAL_SDK_INT"
+ };
+ for (String key : keys) {
+ String value = SystemProperties.get(key, null);
+ if (value != null) {
+ String buildKey = key.replace("persist.sys.pihooks_", "");
+ jsonObject.put(buildKey, value);
+ }
+ }
+ properties.append(jsonObject.toString(4));
+ } catch (JSONException e) {
+ Log.e(TAG, "Error creating JSON from properties", e);
+ properties.append(getString(R.string.error_loading_properties));
+ }
+ new AlertDialog.Builder(getContext())
+ .setTitle(R.string.show_pif_properties_title)
+ .setMessage(properties.toString())
+ .setPositiveButton(android.R.string.ok, null)
+ .show();
+ }
+
@Override
public boolean onPreferenceChange(Preference preference, Object newValue) {
return false;