Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to reset Google Advertising ID in Android Programmatically?

Tags:

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.

like image 266
Siva Avatar asked Nov 03 '16 19:11

Siva


People also ask

How do I reset my Google Ad ID on Android?

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.

What will happen if I reset my advertising ID?

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.

How can I remove mobile ad ID?

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.


1 Answers

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.

like image 74
buch0 Avatar answered Oct 17 '22 02:10

buch0