Each tracker has its own code signatures. A code signature is basically a Java package name e.g. com.google.android.apps.analytics. and com.google.android.gms.analytics. are the 2 code signatures of Google Analytics.
To check if a tracker is embedded into an application, εxodus executes the following steps:
- download the APK from Google Play
- unzip the APK
- list Java classes which are embedded in the application (
dexdump classes*.dex) - save list of embedded Java classes into a file
- check if any embedded Java class matches a tracker code signature
Finding a tracker signature into an application does not prove that the tracker is effectively used by the application.
For all the next points, activate the εxodus virtual venv,
cdinto the same directory asmanage.pyfile before executing the given command.
python manage.py importtrackers --settings=exodus.settings.devNow, browse your tracker list.
When you add a new tracker into the εxodus database, reports are not automatically recomputed. εxodus comes with few administrator commands defined here.
The refreshstaticanalysis command has the following options:
--allwill take all reports in consideration. You can pass a list of report ID instead.--trackerswill recompute the list of embedded trackers--clistwill recompute the list of embedded Java classes
The --clist option is useful if you change the way you extract Java classes from an APK.
python manage.py refreshstaticanalysis --all --trackers --settings=exodus.settings.devpython manage.py refreshstaticanalysis 2 4 --trackers --settings=exodus.settings.devpython manage.py dumpdata --exclude=auth --exclude=contenttypes --exclude=authtoken --exclude=analysis_query --exclude=sessions --exclude=admin --settings=exodus.settings.production > /tmp/dump.json(venv) python manage.py dumpdata trackers --settings=exodus.settings.production > /tmp/trackers.json(venv) ~/exodus$ cd exodus/
(venv) ~/exodus/exodus$ python manage.py shell --settings=exodus.settings.production
Python 3.5.3 (default, Jan 19 2017, 14:11:04)
Type 'copyright', 'credits' or 'license' for more information
IPython 6.2.1 -- An enhanced Interactive Python. Type '?' for help.
In [1]: from reports.models import *
In [2]: Application.objects.values('handle').distinct().count()
Out[2]: 34844
In [3]: Report.objects.all().count()
Out[3]: 38394