I'm trying to reset google Advertising ID programmatically for automation purposes.
I'm able to fetch the Advertising ID and isLimitAdTrackingEnabled. But I want to reset the ID programmatically
https://developers.google.com/android/reference/com/google/android/gms/ads/identifier/AdvertisingIdClient.Info
Manually a user can reset the google advertising id from google settings application.
HOW TO RESET YOUR ANDROID ADVERTISING DEVICE ID. To reset your Android advertising ID, Open Google Settings on your Android device by tapping on menu and then on Google Settings once all apps are displayed on the screen. Locate and tap on the Ads menu under Services. Tap on “reset advertising ID” on the new page.
You can't turn it off, but as an Android user, you have the ability to reset your ID at will. This will cause Google's system to build your profile anew, thus advertisers won't be able to link your past actions on the web to your device.
On Android On devices that have this feature enabled, you can open the Settings app and navigate to Privacy > Ads. Tap “Delete advertising ID,” then tap it again on the next page to confirm. This will prevent any app on your phone from accessing it in the future.
You can reset the Advertising ID programmatically.
Try to execute this command with root permission:
rm -f /data/data/com.google.android.gms/shared_prefs/adid_settings.xml
If you removed the XML file, it will generate a new Advertising ID and XML file automatically.
I confirmed it with Android 4.4 API device.
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