rentgendroid/android/conf/reset_adid.sh
Andrii Dokhniak f458b38ffd upd
2025-07-08 10:13:24 +02:00

16 lines
549 B
Bash

#!/bin/bash
set -x
# Change the file slightly
echo | adb shell su root "tee /data/data/com.google.android.gms/shared_prefs/adid_settings.xml"
# Ask android for the ADID. Android detects the changed file (somewhere), and regenerates it
adb shell su root am start -W -n com.example.adidreader/com.example.adidreader.MainActivity
(exit 1)
while [ $? -ne 0 ]; do
# Get the new ADID
adb shell su root cat /data/data/com.google.android.gms/shared_prefs/adid_settings.xml | xmllint --xpath 'string(//map/string[@name="adid_key"])' - > /dev/null
done