From: Skarafaz Date: Mon, 21 Jul 2014 21:16:17 +0000 (+0200) Subject: init X-Git-Url: https://git.ralfj.de/noFUDroid.git/commitdiff_plain/c8843d66ae54ffd382ece2d8249edba50f443f40?ds=inline init --- c8843d66ae54ffd382ece2d8249edba50f443f40 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..100eeb0 --- /dev/null +++ b/.gitignore @@ -0,0 +1,25 @@ +#built application files +*.apk +*.ap_ + +# files for the dex VM +*.dex + +# Java class files +*.class + +# generated files +bin/ +gen/ + +# Local configuration file (sdk path, etc) +local.properties + +# Windows thumbnail db +Thumbs.db + +# Android Studio +.idea +*.iml +.gradle +build/ diff --git a/app/.gitignore b/app/.gitignore new file mode 100644 index 0000000..796b96d --- /dev/null +++ b/app/.gitignore @@ -0,0 +1 @@ +/build diff --git a/app/build.gradle b/app/build.gradle new file mode 100644 index 0000000..de12cd8 --- /dev/null +++ b/app/build.gradle @@ -0,0 +1,24 @@ +apply plugin: 'com.android.application' + +android { + compileSdkVersion 19 + buildToolsVersion '20.0.0' + + defaultConfig { + applicationId "it.skarafaz.xposed.nwmonblocker" + minSdkVersion 19 + targetSdkVersion 19 + versionCode 1 + versionName "1.0.0" + } + buildTypes { + release { + runProguard false + proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' + } + } +} + +dependencies { + provided files('libs/XposedBridgeApi-54.jar') +} diff --git a/app/libs/.gitignore b/app/libs/.gitignore new file mode 100644 index 0000000..a5baada --- /dev/null +++ b/app/libs/.gitignore @@ -0,0 +1,3 @@ +* +!.gitignore + diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro new file mode 100644 index 0000000..eb07fae --- /dev/null +++ b/app/proguard-rules.pro @@ -0,0 +1,17 @@ +# Add project specific ProGuard rules here. +# By default, the flags in this file are appended to flags specified +# in C:\Program Files (x86)\Android\android-studio\sdk/tools/proguard/proguard-android.txt +# You can edit the include path and order by changing the proguardFiles +# directive in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# Add any project specific keep options here: + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} diff --git a/app/src/androidTest/java/it/skarafaz/xposed/kitkat/nwmonblocker/ApplicationTest.java b/app/src/androidTest/java/it/skarafaz/xposed/kitkat/nwmonblocker/ApplicationTest.java new file mode 100644 index 0000000..9c7eee1 --- /dev/null +++ b/app/src/androidTest/java/it/skarafaz/xposed/kitkat/nwmonblocker/ApplicationTest.java @@ -0,0 +1,13 @@ +package it.skarafaz.xposed.kitkat.nwmonblocker; + +import android.app.Application; +import android.test.ApplicationTestCase; + +/** + * Testing Fundamentals + */ +public class ApplicationTest extends ApplicationTestCase { + public ApplicationTest() { + super(Application.class); + } +} \ No newline at end of file diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000..71d7152 --- /dev/null +++ b/app/src/main/AndroidManifest.xml @@ -0,0 +1,14 @@ + + + + + + + + + + diff --git a/app/src/main/assets/xposed_init b/app/src/main/assets/xposed_init new file mode 100644 index 0000000..dc5beb8 --- /dev/null +++ b/app/src/main/assets/xposed_init @@ -0,0 +1 @@ +it.skarafaz.xposed.nwmonblocker.Mod \ No newline at end of file diff --git a/app/src/main/java/it/skarafaz/xposed/nwmonblocker/Mod.java b/app/src/main/java/it/skarafaz/xposed/nwmonblocker/Mod.java new file mode 100644 index 0000000..b0769b7 --- /dev/null +++ b/app/src/main/java/it/skarafaz/xposed/nwmonblocker/Mod.java @@ -0,0 +1,21 @@ +package it.skarafaz.xposed.nwmonblocker; + +import de.robv.android.xposed.IXposedHookZygoteInit; +import de.robv.android.xposed.XC_MethodReplacement; +import de.robv.android.xposed.XposedHelpers; + +public class Mod implements IXposedHookZygoteInit { + private static final String CLASS_DEVICE_POLICY_MANAGER = "android.app.admin.DevicePolicyManager"; + + @Override + public void initZygote(StartupParam startupParam) throws Throwable { + final Class devicePolicyManager = XposedHelpers.findClass(CLASS_DEVICE_POLICY_MANAGER, null); + + XposedHelpers.findAndHookMethod(devicePolicyManager, "hasAnyCaCertsInstalled", new XC_MethodReplacement() { + @Override + protected Object replaceHookedMethod(MethodHookParam methodHookParam) throws Throwable { + return false; + } + }); + } +} diff --git a/app/src/main/res/drawable-hdpi/ic_launcher.png b/app/src/main/res/drawable-hdpi/ic_launcher.png new file mode 100644 index 0000000..24281b0 Binary files /dev/null and b/app/src/main/res/drawable-hdpi/ic_launcher.png differ diff --git a/app/src/main/res/drawable-mdpi/ic_launcher.png b/app/src/main/res/drawable-mdpi/ic_launcher.png new file mode 100644 index 0000000..6bfaf3e Binary files /dev/null and b/app/src/main/res/drawable-mdpi/ic_launcher.png differ diff --git a/app/src/main/res/drawable-xhdpi/ic_launcher.png b/app/src/main/res/drawable-xhdpi/ic_launcher.png new file mode 100644 index 0000000..243612a Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/ic_launcher.png differ diff --git a/app/src/main/res/drawable-xxhdpi/ic_launcher.png b/app/src/main/res/drawable-xxhdpi/ic_launcher.png new file mode 100644 index 0000000..dd4e6f0 Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/ic_launcher.png differ diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml new file mode 100644 index 0000000..2032584 --- /dev/null +++ b/app/src/main/res/values/strings.xml @@ -0,0 +1,3 @@ + + Network Monitored Blocker + diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml new file mode 100644 index 0000000..f30c8bd --- /dev/null +++ b/app/src/main/res/values/styles.xml @@ -0,0 +1,3 @@ + +