Skip to content

Commit 74a1596

Browse files
Konrad Kollnigkasnder
authored andcommitted
Initial commit
0 parents  commit 74a1596

File tree

97 files changed

+12456
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

97 files changed

+12456
-0
lines changed

.gitignore

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
app/libs/
2+
3+
app/full/
4+
app/play/
5+
6+
# Built application files
7+
*.apk
8+
*.ap_
9+
*.aab
10+
11+
# Files for the ART/Dalvik VM
12+
*.dex
13+
14+
# Java class files
15+
*.class
16+
17+
# Generated files
18+
bin/
19+
gen/
20+
out/
21+
22+
# Gradle files
23+
.gradle/
24+
build/
25+
26+
# Local configuration file (sdk path, etc)
27+
local.properties
28+
29+
# Proguard folder generated by Eclipse
30+
proguard/
31+
32+
# Log Files
33+
*.log
34+
35+
# Android Studio Navigation editor temp files
36+
.navigation/
37+
38+
# Android Studio captures folder
39+
captures/
40+
41+
# IntelliJ
42+
*.iml
43+
.idea/workspace.xml
44+
.idea/tasks.xml
45+
.idea/gradle.xml
46+
.idea/assetWizardSettings.xml
47+
.idea/dictionaries
48+
.idea/libraries
49+
.idea/caches
50+
# Android Studio 3 in .gitignore file.
51+
.idea/caches/build_file_checksums.ser
52+
.idea/modules.xml
53+
54+
# Keystore files
55+
# Uncomment the following lines if you do not want to check your keystore files in.
56+
#*.jks
57+
#*.keystore
58+
59+
# External native build folder generated in Android Studio 2.2 and later
60+
.externalNativeBuild
61+
62+
# Google Services (e.g. APIs or Firebase)
63+
google-services.json
64+
65+
# Freeline
66+
freeline.py
67+
freeline/
68+
freeline_project_description.json
69+
70+
# fastlane
71+
fastlane/report.xml
72+
fastlane/Preview.html
73+
fastlane/screenshots
74+
fastlane/test_output
75+
fastlane/readme.md
76+
77+
# Version control
78+
vcs.xml
79+
80+
# lint
81+
lint/intermediates/
82+
lint/generated/
83+
lint/outputs/
84+
lint/tmp/
85+
# lint/reports/
86+
87+
.DS_Store

LICENSE

Lines changed: 339 additions & 0 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
# Tracker Control (work-in-progress)
2+
3+
Tracker Control allows users to monitor and control the widespread,
4+
ongoing, hidden data collection in mobile apps about user behaviour ('tracking').
5+
6+
<p align="center">
7+
<img alt="Tracker Control Logo" src="images/app_logo.png" style="display: block; margin: 0 auto;" height="100%" width="200" >
8+
</p>
9+
10+
To visualise this tracking, work from Professor Max Van Kleek
11+
and others is used to reveal the *companies behind tracking* to users.
12+
13+
The app further aims to educate users about their *legal rights* under
14+
current EU Data Protection Law.
15+
16+
Under the hood, Tracker Control uses Android's VPN functionality,
17+
to analyse apps' network communications *locally*.
18+
This creates a local VPN server, through all network communications
19+
are passed, which allows monitoring by Tracker Control.
20+
No external VPN server is used.
21+
22+
Tracker Control was developed by Konrad Kollnig, as part of his MSc thesis
23+
in Computer Science at the University of Oxford, under the supervision
24+
of Professor Max van Kleek.
25+
26+
## Key Highlights
27+
Tracker Control provides
28+
- granular choices in tracking of app usage (visualisation and blocking),
29+
- access to privacy policies without trackers (which is often the case),
30+
- a one-click solution for GDPR requests (soon to be added).
31+
32+
<p align="center">
33+
<img alt="Screenshot of main screen" src="images/screenshot.png" style="display: block; margin: 0 auto;" height="100%" width="33%" >
34+
</p>
35+
36+
Contrary to other solutions, this application does not intercept any SSL
37+
connections, minimising privacy risks.
38+
Only the meta data about network communications is logged, and displayed
39+
to the users.
40+
41+
## Build instructions
42+
43+
This project can be built using [Android Studio](https://developer.android.com/studio).
44+
45+
It includes a modified version of the [AntMonitor
46+
Library](https://github.com/UCI-Networking-Group/AntMonitor),
47+
whose source code
48+
can be found at [https://github.com/OxfordHCC/AntMonitor](https://github.com/OxfordHCC/AntMonitor).
49+
This library can be built manually, by cloning the repository and building the
50+
project `antmonitorlib`.
51+
After successful compilcation,
52+
copy the compiled library from `AntMonitor/antmonitorlib/build/outputs/aar`
53+
to `tracker-control-android/app/libs/`.
54+
55+
## Privacy policy
56+
57+
Tracker Control allows users to monitor the network communications on their
58+
Android device.
59+
This network data qualifies as personal data, but is only processed
60+
locally on the userlibrary's device.
61+
62+
If the user consents, Tracker Control contacts the Google Play Store
63+
to retrieve further information about the users' apps.
64+
No personal data is shared with Google, other than what is strictly
65+
necessary for network communications (e.g. IP address).
66+
67+
Tracker Control saves two pieces of information on the user's device:
68+
69+
1. a database of network communications, and
70+
2. user settings.
71+
72+
This data is necessary for the functioning of Tracker Control.
73+
74+
This information is kept on the user's device until app data is
75+
removed manually by the user (e.g. by uninstalling).
76+
77+
## Credits
78+
- The underlying network analysis tool is provided by the [AntMonitor
79+
Library](https://github.com/UCI-Networking-Group/AntMonitor).
80+
81+
- Tracker Control builds upon a tracker database by Reuben Binns, Ulrik Lyngs,
82+
Max Van Kleek, Jun Zhao, Timothy Libert, and Nigel Shadbolt.
83+
This database was released as part of their 2018 paper on
84+
[Third Party Tracking in the Mobile Ecosystem](https://doi.org/10.1145/3201064.3201089).
85+
The original data can be retrieved [here](https://osf.io/4nu9e/).
86+
87+
- The app uses icons made by [bqlqn](https://www.flaticon.com/authors/bqlqn) from [www.flaticon.com](https://www.flaticon.com/).
88+
89+
## License
90+
This project is licensed under
91+
[GPLv2](https://www.gnu.org/licenses/old-licenses/gpl-2.0.html).

app/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build

app/build.gradle

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
/*
2+
* Copyright (C) 2019 Konrad Kollnig, University of Oxford
3+
*
4+
* Tracker Control is free software: you can redistribute it and/or modify
5+
* it under the terms of the GNU General Public License as published by
6+
* the Free Software Foundation, either version 2 of the License, or
7+
* (at your option) any later version.
8+
*
9+
* Tracker Control is distributed in the hope that it will be useful,
10+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
* GNU General Public License for more details.
13+
*
14+
* You should have received a copy of the GNU General Public License
15+
* along with Tracker Control. If not, see <http://www.gnu.org/licenses/>.
16+
*/
17+
18+
apply plugin: 'com.android.application'
19+
20+
android {
21+
signingConfigs {
22+
release {
23+
storeFile file('/home/konrad/Documents/Android/KK.jks')
24+
}
25+
}
26+
compileSdkVersion 28
27+
buildToolsVersion "28.0.3"
28+
29+
defaultConfig {
30+
applicationId 'net.kollnig.missioncontrol'
31+
minSdkVersion 22
32+
targetSdkVersion 26
33+
versionCode 1
34+
versionName "1.0"
35+
//multiDexEnabled true
36+
}
37+
38+
buildTypes {
39+
release {
40+
minifyEnabled true
41+
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
42+
}
43+
debug {
44+
minifyEnabled false
45+
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
46+
applicationIdSuffix ".debug"
47+
}
48+
}
49+
50+
// Play version comes without blocking
51+
flavorDimensions "version"
52+
productFlavors {
53+
play {
54+
dimension "version"
55+
applicationIdSuffix ".play"
56+
versionNameSuffix "-play"
57+
}
58+
full {
59+
dimension "version"
60+
}
61+
}
62+
63+
dexOptions {
64+
javaMaxHeapSize "2g"
65+
}
66+
67+
lintOptions {
68+
abortOnError false
69+
}
70+
compileOptions {
71+
sourceCompatibility = 1.8
72+
targetCompatibility = 1.8
73+
}
74+
}
75+
76+
allprojects {
77+
gradle.projectsEvaluated {
78+
tasks.withType(JavaCompile) {
79+
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
80+
}
81+
}
82+
}
83+
84+
repositories {
85+
flatDir {
86+
dirs 'libs'
87+
}
88+
maven { url 'https://jitpack.io' }
89+
}
90+
91+
dependencies {
92+
implementation fileTree(include: ['*.jar'], dir: 'libs')
93+
implementation(name: 'antmonitorlib', ext: 'aar')
94+
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
95+
96+
implementation 'com.android.support:appcompat-v7:28.0.0'
97+
implementation 'com.android.support:design:28.0.0'
98+
implementation 'com.android.support:support-v4:28.0.0'
99+
implementation 'com.android.support:cardview-v7:28.0.0'
100+
implementation 'com.android.support:recyclerview-v7:28.0.0'
101+
102+
implementation 'com.google.guava:guava:28.0-android'
103+
implementation 'com.github.PhilJay:MPAndroidChart:v3.1.0'
104+
implementation 'net.dankito.readability4j:readability4j:1.0.3'
105+
implementation 'com.opencsv:opencsv:4.6'
106+
}

app/proguard-rules.pro

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Add project specific ProGuard rules here.
2+
# By default, the flags in this file are appended to flags specified
3+
# in C:\Program Files\adt-bundle-windows-x86_64-20140702\sdk/tools/proguard/proguard-android.txt
4+
# You can edit the include path and order by changing the proguardFiles
5+
# directive in build.gradle.
6+
#
7+
# For more details, see
8+
# http://developer.android.com/guide/developing/tools/proguard.html
9+
10+
# Add any project specific keep options here:
11+
12+
# If your project uses WebView with JS, uncomment the following
13+
# and specify the fully qualified class name to the JavaScript interface
14+
# class:
15+
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16+
# public *;
17+
#}

app/src/main/AndroidManifest.xml

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
~ Copyright (C) 2019 Konrad Kollnig, University of Oxford
4+
~
5+
~ Tracker Control is free software: you can redistribute it and/or modify
6+
~ it under the terms of the GNU General Public License as published by
7+
~ the Free Software Foundation, either version 2 of the License, or
8+
~ (at your option) any later version.
9+
~
10+
~ Tracker Control is distributed in the hope that it will be useful,
11+
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
~ GNU General Public License for more details.
14+
~
15+
~ You should have received a copy of the GNU General Public License
16+
~ along with Tracker Control. If not, see <http://www.gnu.org/licenses/>.
17+
-->
18+
19+
<manifest package="net.kollnig.missioncontrol"
20+
xmlns:android="http://schemas.android.com/apk/res/android">
21+
22+
<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/><!--VPN Service-->
23+
<uses-permission android:name="android.permission.INTERNET"/>
24+
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/> <!--CSV export-->
25+
26+
<application
27+
android:icon="@mipmap/ic_launcher"
28+
android:label="@string/app_name"
29+
android:supportsRtl="true"
30+
android:theme="@style/AppTheme">
31+
32+
<activity android:name=".MainActivity"
33+
android:launchMode="singleTop"
34+
android:theme="@style/AppTheme.NoActionBar">
35+
<intent-filter>
36+
<action android:name="android.intent.action.MAIN"/>
37+
38+
<category android:name="android.intent.category.LAUNCHER"/>
39+
</intent-filter>
40+
<intent-filter>
41+
<action android:name="edu.uci.calit2.anteater.ACTION.NOTIFICATION"/>
42+
43+
<category android:name="android.intent.category.DEFAULT"/>
44+
</intent-filter>
45+
<intent-filter>
46+
<action android:name="android.intent.action.VIEW"/>
47+
</intent-filter>
48+
</activity>
49+
50+
<activity
51+
android:name=".DetailsActivity"
52+
android:label="@string/title_activity_detail"
53+
android:parentActivityName=".MainActivity"
54+
android:theme="@style/AppTheme.NoActionBar">
55+
<meta-data
56+
android:name="android.support.PARENT_ACTIVITY"
57+
android:value="net.kollnig.missioncontrol.MainActivity"/>
58+
</activity>
59+
60+
<!--
61+
No UI activity that requests VPN rights.
62+
If VPN rights can be obtained, the activity initiates a connection attempt
63+
-->
64+
<activity
65+
android:name=".vpn.VpnStarterActivity"
66+
android:excludeFromRecents="true"
67+
android:launchMode="singleTask"
68+
android:theme="@android:style/Theme.NoDisplay"/>
69+
70+
<receiver android:name=".vpn.DeviceBootListener">
71+
72+
<!-- Attempts to reestablish VPN on reboot -->
73+
<intent-filter>
74+
<action android:name="android.intent.action.BOOT_COMPLETED"/>
75+
</intent-filter>
76+
</receiver>
77+
78+
<provider
79+
android:name="android.support.v4.content.FileProvider"
80+
android:authorities="${applicationId}.fileprovider"
81+
android:exported="false"
82+
android:grantUriPermissions="true">
83+
<meta-data
84+
android:name="android.support.FILE_PROVIDER_PATHS"
85+
android:resource="@xml/provider_paths"/>
86+
</provider>
87+
</application>
88+
89+
</manifest>

0 commit comments

Comments
 (0)