[Miscellaneous Android Development] steveglowplunk:
Instructions

Prerequisites:

Root permission is required.

You also need these extra binaries installed in a directory of $PATH (such as /system/xbin):

-aapt

-jq

You can download these binaries from the Termux app ( https://play.google.com/store/apps/details?id=com.termux )

You will also need busybox installed. Search for how to install it.

Method 1 (automatic) (experimental):

Run InstallReq.sh in Termux *as a normal user* (not as root)

i.e. run this command: bash /path/to/script/InstallReq.sh

It will check if aapt, jq, curl or sqlite3 are missing and automatically download them, then copy them to /system/xbin.

Method 2 (manual):

Run these commands in Termux:

pkg install aapt

pkg install jq

Copy them from /data/data/com.termux/files/usr/bin to a directory of $PATH

Then give them execution permission, e.g. "chmod +x /system/xbin/aapt"

To see what directories are in $PATH, run this command: "echo $PATH"

Note: if you've placed the binaries in /sbin, or you have installed Magisk,

the binaries will be deleted every reboot. You'll have to copy them again.

Note: aapt and jq must be downloaded from Termux and the Termux app must remain installed,

since the dependencies are stored in Termux's data folder.

------------------------------------------------------------

Usage:

-All scripts and txt files must be in the same directory as DisableTrackers.sh

You need a terminal emulator to run these scripts.

Personally I use "Terminal Emulator for Android" ( https://play.google.com/store/apps/details?id=jackpal.androidterm )

This terminal emulator lets you add launcher shortcuts. Quite convenient in my opinion.

Termux may also work, but I haven't tested it.

For first time usage, run UpdateExodus.sh first.

i.e. run this command: su -c sh /path/to/script/UpdateExodus.sh

If the script runs successfully, a MergedTrackers.txt will be created.

Then you can run DisableTrackers.sh AS SU to start disabling trackers. (root permission is required)

i.e. run this command: su -c sh /path/to/script/DisableTrackers.sh

By default, only third party apps are checked.

If you want to check for trackers in system apps as well, add 'sys' as the parameter.

i.e. run this command: su -c sh /path/to/script/DisableTrackers.sh sys

Not really recommended since it could theoretically mess up Google Play Services, though I can't confirm since I don't have it installed on my phone.

Note: if you've used version 1.4 or below and don't want the script to process all apps again, run CreateAppDB.sh.

It will create a ProcessedApps.db with records of all currently installed apps.

------------------------------------------------------------

Explanations:

UpdateExodus.sh will download a tracker list from Exodus Privacy, and merge it with CustomTrackers.txt (if it exists)

You can add your own trackers to CustomTrackers.txt. You may also write comments in this format: #(comment here)

DisableTracking.sh will dump a list of components (service/broadcast receiver/activity/content provider) of all installed apps,

compare it against the list of trackers in MergedTrackers.txt, and disable those components if they match.

It will save a list of already processed apps to a database file in the script's 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).

Apps with trackers will be logged to AppsWithTrackers.txt.

exodustrackers.json is the raw list downloaded from Exodus Privacy.

MergedTrackers.txt contains the merged results of exodustrackers_extracted.txt and CustomTrackers.txt.

ProcessedApps.db contains a list of already processed apps. They will be skipped in the next run of DisableTrackers.sh.

whitelist.txt is a list of apps that will be skipped.