Nice work on the script! :good:
Though I found that running 'pm disable' on all apps even when the tracking components don't exist in them is very inefficient, so I ended up rewriting the script myself.
You can download the script here
It is highly recommended that you backup your apps using something like Titanium Backup first. In case some apps crash after running the script, you can still restore the backup.
To use it, copy 'aapt' to a directory in $PATH, such as /sbin. Give it execution permission, e.g. 'chmod +x /sbin/aapt'
Then run the script as su with a terminal emulator.
My script will dump a list of components (service/broadcast receiver/activity/content provider) of all installed apps, compare it against the list of trackers in the script, and disable those components if they match.
It will save a list of already processed apps to a text file in the current working directory, so they will not be processed twice when you run the script again (like maybe you've installed a new app and you want to disable its trackers by running the script).
I've also added a lot more trackers in the script.
One drawback of my script is that you need an extra binary, aapt. It is not native in android or included in busybox, but you can download it using the Termux app. You can also download aapt from the link above (it was also downloaded from Termux)
If some apps crash after running the script, you can use something like
MyAndroidTools to re-enable the services.
I hope this will help you guys as well.