Page MenuHomeSealhub

reset_adid.sh
No OneTemporary

reset_adid.sh

#!/bin/bash
set -xe
# 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
sleep 0.1
# 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"])' - > /adid

File Metadata

Mime Type
text/x-shellscript
Expires
Sat, Nov 8, 11:18 (16 h, 4 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1034516
Default Alt Text
reset_adid.sh (517 B)

Event Timeline