├── settings.gradle ├── trustedintents ├── project.properties ├── AndroidManifest.xml ├── build.gradle ├── setup-ant ├── trustedintents.pom ├── src │ ├── info │ │ └── guardianproject │ │ │ ├── trustedintents │ │ │ ├── ApkSignaturePin.java │ │ │ └── TrustedIntents.java │ │ │ ├── GuardianProjectRSA1024.java │ │ │ └── GuardianProjectRSA4096.java │ └── org │ │ ├── torproject │ │ └── TorProjectRSA1024.java │ │ └── iilab │ │ └── IilabEngineeringRSA2048Pin.java └── custom_rules.xml ├── ic_launcher.png ├── test ├── res │ ├── drawable-hdpi │ │ └── ic_launcher.png │ ├── drawable-ldpi │ │ └── ic_launcher.png │ ├── drawable-mdpi │ │ └── ic_launcher.png │ ├── drawable-xhdpi │ │ └── ic_launcher.png │ └── values │ │ └── strings.xml ├── libs │ ├── android-junit-report-1.5.8.jar │ └── android-junit-report-1.5.8.README ├── .classpath ├── project.properties ├── custom_rules.xml ├── AndroidManifest.xml ├── ant.properties ├── .project └── src │ ├── info │ └── guardianproject │ │ └── trustedintents │ │ └── test │ │ ├── ThisPackagePin.java │ │ ├── ApkSignaturePinTests.java │ │ ├── ReceiverTestActivity.java │ │ ├── ReceiverTestActivityUnitTestCase.java │ │ └── TrustedIntentsTests.java │ └── com │ └── android │ ├── AndroidIncludedAppsPin.java │ └── AndroidSystemPin.java ├── app ├── src │ ├── main │ │ ├── res │ │ │ ├── mipmap-hdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-mdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxxhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── values │ │ │ │ ├── strings.xml │ │ │ │ ├── colors.xml │ │ │ │ ├── dimens.xml │ │ │ │ └── styles.xml │ │ │ ├── values-v21 │ │ │ │ └── styles.xml │ │ │ ├── menu │ │ │ │ └── menu_main.xml │ │ │ ├── values-w820dp │ │ │ │ └── dimens.xml │ │ │ └── layout │ │ │ │ ├── content_main.xml │ │ │ │ └── activity_main.xml │ │ ├── AndroidManifest.xml │ │ └── java │ │ │ └── info │ │ │ └── guardianproject │ │ │ └── trustedintents │ │ │ └── example │ │ │ └── MainActivity.java │ ├── test │ │ └── java │ │ │ └── info │ │ │ └── guardianproject │ │ │ └── trustedintents │ │ │ └── example │ │ │ └── ExampleUnitTest.java │ └── androidTest │ │ └── java │ │ └── info │ │ └── guardianproject │ │ └── trustedintents │ │ └── example │ │ └── ApplicationTest.java └── build.gradle ├── jenkins-build ├── .classpath ├── .gitignore ├── .project ├── README.md ├── make-release-build └── LICENSE.txt /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app', ':trustedintents' 2 | -------------------------------------------------------------------------------- /trustedintents/project.properties: -------------------------------------------------------------------------------- 1 | target=android-19 2 | android.library=true 3 | -------------------------------------------------------------------------------- /ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guardianproject/TrustedIntents/HEAD/ic_launcher.png -------------------------------------------------------------------------------- /test/res/drawable-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guardianproject/TrustedIntents/HEAD/test/res/drawable-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /test/res/drawable-ldpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guardianproject/TrustedIntents/HEAD/test/res/drawable-ldpi/ic_launcher.png -------------------------------------------------------------------------------- /test/res/drawable-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guardianproject/TrustedIntents/HEAD/test/res/drawable-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /test/libs/android-junit-report-1.5.8.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guardianproject/TrustedIntents/HEAD/test/libs/android-junit-report-1.5.8.jar -------------------------------------------------------------------------------- /test/res/drawable-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guardianproject/TrustedIntents/HEAD/test/res/drawable-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guardianproject/TrustedIntents/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guardianproject/TrustedIntents/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guardianproject/TrustedIntents/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guardianproject/TrustedIntents/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guardianproject/TrustedIntents/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /test/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | TrustedIntentsTests 5 | 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | TrustedIntents 3 | Settings 4 | 5 | -------------------------------------------------------------------------------- /test/libs/android-junit-report-1.5.8.README: -------------------------------------------------------------------------------- 1 | 2 | Needed for Jenkins to get JUnit reports. 3 | 4 | * https://github.com/jsankey/android-junit-report 5 | * https://github.com/downloads/jsankey/android-junit-report/android-junit-report-1.5.8.jar 6 | -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3F51B5 4 | #303F9F 5 | #FF4081 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16dp 4 | 16dp 5 | 16dp 6 | 7 | -------------------------------------------------------------------------------- /trustedintents/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /jenkins-build: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | set -x 5 | 6 | if [ -z $ANDROID_HOME ]; then 7 | if [ -e ~/.android/bashrc ]; then 8 | . ~/.android/bashrc 9 | else 10 | echo "ANDROID_HOME must be set!" 11 | exit 12 | fi 13 | fi 14 | 15 | export PATH=$PATH:$ANDROID_HOME/tools 16 | 17 | cd trustedintents 18 | ./setup-ant 19 | -------------------------------------------------------------------------------- /app/src/main/res/values-v21/styles.xml: -------------------------------------------------------------------------------- 1 | > 2 | 8 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/menu/menu_main.xml: -------------------------------------------------------------------------------- 1 | 4 | 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/values-w820dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 64dp 6 | 7 | -------------------------------------------------------------------------------- /app/src/test/java/info/guardianproject/trustedintents/example/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package info.guardianproject.trustedintents.example; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * To work on unit tests, switch the Test Artifact in the Build Variants view. 9 | */ 10 | public class ExampleUnitTest { 11 | @Test 12 | public void addition_isCorrect() throws Exception { 13 | assertEquals(4, 2 + 2); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/androidTest/java/info/guardianproject/trustedintents/example/ApplicationTest.java: -------------------------------------------------------------------------------- 1 | package info.guardianproject.trustedintents.example; 2 | 3 | import android.app.Application; 4 | import android.test.ApplicationTestCase; 5 | 6 | /** 7 | * Testing Fundamentals 8 | */ 9 | public class ApplicationTest extends ApplicationTestCase { 10 | public ApplicationTest() { 11 | super(Application.class); 12 | } 13 | } -------------------------------------------------------------------------------- /test/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 23 5 | buildToolsVersion "23.0.2" 6 | 7 | defaultConfig { 8 | applicationId "info.guardianproject.trustedintents" 9 | minSdkVersion 7 10 | targetSdkVersion 23 11 | versionCode 1 12 | versionName "1.0" 13 | } 14 | } 15 | 16 | dependencies { 17 | compile fileTree(dir: 'libs', include: ['*.jar']) 18 | compile project (':trustedintents') 19 | testCompile 'junit:junit:4.12' 20 | compile 'com.android.support:appcompat-v7:23.1.1' 21 | compile 'com.android.support:design:23.1.1' 22 | } 23 | -------------------------------------------------------------------------------- /trustedintents/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.library' 2 | 3 | android { 4 | compileSdkVersion 21 5 | buildToolsVersion "21.1.2" 6 | 7 | sourceSets.main { 8 | manifest.srcFile 'AndroidManifest.xml' 9 | java.srcDirs = ['src'] 10 | resources.srcDirs = ['src'] 11 | aidl.srcDirs = ['src'] 12 | renderscript.srcDirs = ['src'] 13 | res.srcDirs = ['res'] 14 | assets.srcDirs = ['assets'] 15 | } 16 | } 17 | 18 | dependencies { 19 | compile fileTree(dir: 'libs', include: ['*.jar']) 20 | } 21 | 22 | task jar(type: Jar) { 23 | from android.sourceSets.main.java.srcDirs 24 | } 25 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Android build products 2 | bin/ 3 | gen/ 4 | obj/ 5 | 6 | # test products 7 | junit-report.xml 8 | 9 | # only hide in library project, not test/ project 10 | /libs/ 11 | /res/ 12 | 13 | # products of "android create project" or "android update project" 14 | build.xml 15 | ant.properties 16 | default.properties 17 | local.properties 18 | proguard-project.txt 19 | proguard.cfg 20 | proguard-rules.pro 21 | 22 | # emacs detritus 23 | *~ 24 | 25 | # Eclipse detritus 26 | .settings 27 | 28 | # Mac OS X detritus 29 | .DS_Store 30 | 31 | # Windows thumbnail db 32 | Thumbs.db 33 | 34 | # Android Studio 35 | *.iml 36 | .idea/ 37 | .gradle/ 38 | build/ 39 | gradle.properties 40 | -------------------------------------------------------------------------------- /test/project.properties: -------------------------------------------------------------------------------- 1 | # This file is automatically generated by Android Tools. 2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED! 3 | # 4 | # This file must be checked in Version Control Systems. 5 | # 6 | # To customize properties used by the Ant build system edit 7 | # "ant.properties", and override values to adapt the script to your 8 | # project structure. 9 | # 10 | # To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home): 11 | #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt 12 | 13 | # Project target. 14 | target=android-19 15 | android.library.reference.1=../../TrustedIntents 16 | -------------------------------------------------------------------------------- /trustedintents/setup-ant: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | set -x 5 | 6 | if ! which android > /dev/null; then 7 | if [ -z $ANDROID_HOME ]; then 8 | if [ -e ~/.android/bashrc ]; then 9 | . ~/.android/bashrc 10 | else 11 | echo "'android' not found, ANDROID_HOME must be set!" 12 | exit 13 | fi 14 | else 15 | export PATH="${ANDROID_HOME}/tools:$PATH" 16 | fi 17 | fi 18 | 19 | # fetch target from project.properties 20 | eval `grep '^target=' project.properties` 21 | 22 | CURDIR=`pwd` 23 | 24 | android update lib-project --path ${CURDIR} --target $target 25 | android update test-project --path ${CURDIR}/../test --main ${CURDIR} 26 | -------------------------------------------------------------------------------- /test/custom_rules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 9 | Downloading XML test report (/data/data/${tested.package}/files/junit-report.xml)… 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /test/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 12 | 13 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 14 |