Currently, the only way I know to get Google Advertising Id (by hand) is to open settings and go to Accounts -> Google -> Ads. It is displayed under "Your advertising id"
However, I'd like to get Google Advertising Id via command line using adb. I want to automate this for testing.
For example, this is how I get android id:
android-sdks/platform-tools/adb shell settings get secure android_id
Is there an equivalent command for retrieving Advertising Id?
Thanks for your help in advance.
Is there an equivalent command for retrieving Advertising Id?
There is no equivalent command but it is possible if you use grep
. The following command works on rooted devices
adb shell grep adid_key /data/data/com.google.android.gms/shared_prefs/adid_settings.xml
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With