Shell script to reset advertising ID

phaedrus

New member
I've written a little script that replaces advertising ID in android. This is a way to prevent companies from tracking your activities across apps, and kind of replicates the results of Apple's recent changes to IOS that has allowed people to opt out of Facebook etc tracking them. Here's the script:

Code:
NEWADID=$(cat /proc/sys/kernel/random/uuid)
sed -ri "s/[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}/$NEWADID" </data/data/com.google.android.gms/shared_prefs/adid_settings.xml

It's really simple, it creates a new ID then edits the relevant line in the file that stores the ID. It works great from the command line in Termux. But it doesn't do anything when I run it as a shell script in Macrodroid.

Any ideas?
 
Top