├── .gitignore ├── AndroidDexLoader.iml ├── Host ├── .gitignore ├── Host.iml ├── assets │ ├── classes.dex │ ├── classes.jar │ ├── dexed.jar │ └── plugin.apk ├── build.gradle ├── jni │ ├── main.c │ └── test.c ├── local.properties ├── proguard-rules.pro └── src │ ├── androidTest │ └── java │ │ └── allinone │ │ └── android │ │ └── test │ │ └── ApplicationTest.java │ └── main │ ├── AndroidManifest.xml │ ├── java │ └── witness │ │ └── host │ │ └── MainActivity.java │ └── res │ ├── layout │ └── activity_main.xml │ ├── values-w820dp │ └── dimens.xml │ └── values │ ├── dimens.xml │ ├── strings.xml │ └── styles.xml ├── Plugin ├── .gitignore ├── Plugin.iml ├── build.gradle ├── libs │ └── plugin_interface.jar ├── manifest-merger-release-report.txt ├── proguard-rules.pro └── src │ ├── androidTest │ └── java │ │ └── allinone │ │ └── android │ │ └── test │ │ └── ApplicationTest.java │ └── main │ ├── AndroidManifest.xml │ ├── java │ ├── allinone │ │ └── android │ │ │ └── apis │ │ │ └── IpApi.java │ └── plugin │ │ └── apis │ │ └── PluginApi.java │ └── res │ ├── values-w820dp │ └── dimens.xml │ └── values │ ├── dimens.xml │ ├── strings.xml │ └── styles.xml ├── PluginInterface ├── .gitignore ├── PluginInterface.iml ├── build.gradle ├── manifest-merger-release-report.txt ├── proguard-rules.pro └── src │ ├── androidTest │ └── java │ │ └── allinone │ │ └── android │ │ └── test │ │ └── ApplicationTest.java │ └── main │ ├── AndroidManifest.xml │ ├── java │ └── plugin │ │ └── apis │ │ └── IPlugin.java │ └── res │ ├── values-w820dp │ └── dimens.xml │ └── values │ ├── dimens.xml │ ├── strings.xml │ └── styles.xml ├── README.md ├── build.gradle ├── gradle.properties └── settings.gradle /.gitignore: -------------------------------------------------------------------------------- 1 | .gradle 2 | /local.properties 3 | /.idea 4 | /.idea/libraries 5 | .DS_Store 6 | /build 7 | /gradle 8 | gradlew.bat 9 | gradlew 10 | .iml -------------------------------------------------------------------------------- /AndroidDexLoader.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /Host/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /Host/Host.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 8 | 9 | 10 | 11 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /Host/assets/classes.dex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/degjeg/AndroidDexLoader/9c8ff470dac785d19e9129d45534e375d15c198c/Host/assets/classes.dex -------------------------------------------------------------------------------- /Host/assets/classes.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/degjeg/AndroidDexLoader/9c8ff470dac785d19e9129d45534e375d15c198c/Host/assets/classes.jar -------------------------------------------------------------------------------- /Host/assets/dexed.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/degjeg/AndroidDexLoader/9c8ff470dac785d19e9129d45534e375d15c198c/Host/assets/dexed.jar -------------------------------------------------------------------------------- /Host/assets/plugin.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/degjeg/AndroidDexLoader/9c8ff470dac785d19e9129d45534e375d15c198c/Host/assets/plugin.apk -------------------------------------------------------------------------------- /Host/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | android { 3 | compileSdkVersion 21 4 | buildToolsVersion "20.0.0" 5 | 6 | sourceSets { 7 | main { 8 | assets.srcDirs = ['assets'] 9 | jniLibs.srcDir 'libs' // <-- 你的.so库的实际路径 10 | jni.srcDirs 'jni' 11 | } 12 | } 13 | defaultConfig { 14 | ndk { 15 | moduleName "hello-jni" 16 | // cFlags cFlags + " -mtune=atom -mssse3 -mfpmath=sse" 17 | abiFilter "armeabi" 18 | ldLibs "log"// "EGL", "GLESv3", "dl", 19 | } 20 | } 21 | 22 | buildTypes { 23 | release { 24 | minifyEnabled true 25 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 26 | } 27 | } 28 | } 29 | 30 | dependencies { 31 | compile project(':PluginInterface') 32 | } -------------------------------------------------------------------------------- /Host/jni/main.c: -------------------------------------------------------------------------------- 1 | 2 | #include "stdio.h" 3 | 4 | int main(int argc, char** argv){ 5 | printf("%d", argc); 6 | } 7 | 8 | -------------------------------------------------------------------------------- /Host/jni/test.c: -------------------------------------------------------------------------------- 1 | 2 | #include "stdio.h" 3 | 4 | int main1(int argc, char** argv){ 5 | printf("%d", argc); 6 | } 7 | 8 | -------------------------------------------------------------------------------- /Host/local.properties: -------------------------------------------------------------------------------- 1 | ## This file is automatically generated by Android Studio. 2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED! 3 | # 4 | # This file must *NOT* be checked into Version Control Systems, 5 | # as it contains information specific to your local configuration. 6 | # 7 | # Location of the SDK. This is only used by Gradle. 8 | # For customization when using a Version Control System, please read the 9 | # header note. 10 | #Tue Jan 13 21:21:52 CST 2015 11 | 12 | ndk.dir=D\:\\android\\android-ndk-r10d 13 | sdk.dir=D\:\\android\\sdk1 14 | 15 | -------------------------------------------------------------------------------- /Host/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in D:\android\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 | #} 18 | 19 | #-keep class plugin.** {*;} 20 | -keep class plugin.apis.**{*;} -------------------------------------------------------------------------------- /Host/src/androidTest/java/allinone/android/test/ApplicationTest.java: -------------------------------------------------------------------------------- 1 | package allinone.android.test; 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 | } -------------------------------------------------------------------------------- /Host/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 9 | 10 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /Host/src/main/java/witness/host/MainActivity.java: -------------------------------------------------------------------------------- 1 | package witness.host; 2 | 3 | import android.app.Activity; 4 | import android.os.Bundle; 5 | import android.util.Log; 6 | import android.view.View; 7 | import android.widget.TextView; 8 | 9 | import java.io.File; 10 | import java.io.FileOutputStream; 11 | import java.io.IOException; 12 | import java.io.InputStream; 13 | import java.lang.reflect.Constructor; 14 | 15 | import dalvik.system.DexClassLoader; 16 | import plugin.apis.IPlugin; 17 | import witness.ho1st.R; 18 | 19 | /** 20 | * Created by Administrator on 2015/3/26. 21 | */ 22 | public class MainActivity extends Activity { 23 | 24 | private static final String TAG = "host"; 25 | TextView ip, get; 26 | 27 | @Override 28 | protected void onCreate(Bundle savedInstanceState) { 29 | super.onCreate(savedInstanceState); 30 | 31 | setContentView(R.layout.activity_main); 32 | 33 | ip = (TextView) findViewById(R.id.ip); 34 | get = (TextView) findViewById(R.id.get); 35 | 36 | get.setOnClickListener(onClickGet); 37 | 38 | } 39 | 40 | View.OnClickListener onClickGet = new View.OnClickListener() { 41 | @Override 42 | public void onClick(View v) { 43 | String fn = "dexed.jar"; 44 | String executeFile = getFilesDir() + "/aa" + fn; 45 | if (!writeAssetToFile(fn, executeFile)) { 46 | Log.e(TAG, "write file fail:" + executeFile); 47 | return; 48 | } 49 | 50 | LoadAPK(executeFile, getFilesDir().getAbsolutePath()); 51 | 52 | } 53 | }; 54 | 55 | 56 | void showToast(String str) { 57 | // Toast.makeText() 58 | } 59 | 60 | private boolean writeAssetToFile(String assetFile, String extFile) { 61 | // 读取assets文件 62 | InputStream is = null; 63 | FileOutputStream fos = null; 64 | boolean success = false; 65 | try { 66 | is = getResources().getAssets().open(assetFile); 67 | int len = is.available(); 68 | byte[] buffer = new byte[10 * 1024]; 69 | // 70 | 71 | File outFile = new File(extFile); 72 | if (outFile.exists() && outFile.length() != len) { 73 | outFile.delete(); 74 | } 75 | 76 | fos = new FileOutputStream(new File(extFile)); 77 | 78 | int readBytes = 0; 79 | do { 80 | readBytes = is.read(buffer); 81 | if (readBytes > 0) { 82 | fos.write(buffer, 0, readBytes); 83 | } 84 | } while (readBytes > 0); 85 | success = true; 86 | } catch (Exception e) { 87 | e.printStackTrace(); 88 | } finally { 89 | if (is != null) { 90 | try { 91 | is.close(); 92 | } catch (IOException e) { 93 | // e.printStackTrace(); 94 | //should not happen 95 | } 96 | } 97 | 98 | if (fos != null) { 99 | try { 100 | fos.close(); 101 | } catch (IOException e) { 102 | // e.printStackTrace(); 103 | //should not happen 104 | } 105 | } 106 | } 107 | 108 | return success; 109 | } 110 | 111 | public void LoadAPK(String dexpath, String dexoutputpath) { 112 | // ClassLoader localClassLoader = ClassLoader.getSystemClassLoader(); 113 | ClassLoader localClassLoader = this.getClassLoader(); 114 | // VMStack.getCallingClassLoader(); 115 | 116 | 117 | DexClassLoader localDexClassLoader = new DexClassLoader(dexpath, dexoutputpath, null, localClassLoader); 118 | try { 119 | // PackageInfo plocalObject = getPackageManager().getPackageArchiveInfo(dexpath, 1); 120 | 121 | String clsName = "plugin.apis.PluginApi"; 122 | Log.d("sys", "activityname = " + clsName); 123 | 124 | Class localClass = localDexClassLoader.loadClass(clsName);//结果:"com.example.fragmentproject.FristActivity" 125 | Constructor localConstructor = localClass.getConstructor(new Class[]{}); 126 | 127 | Object instance = localConstructor.newInstance(new Object[]{}); 128 | Log.d("sys", "instance = " + instance); 129 | 130 | IPlugin plugin = (IPlugin) instance; 131 | String ip = plugin.parseIP("aask223.3.5fjaspfj1.02.3.4kjkl69.0.54.35jlkjn"); 132 | Log.d("sys", "ip = " + ip); 133 | 134 | Log.d("sys", "isValidIp = " + plugin.isValidIp("195.5.5.5")); 135 | Log.d("sys", "isValidIp = " + plugin.isValidIp("1915.5.5.5")); 136 | Log.d("sys", "isValidIp = " + plugin.isValidIp("195.05.5.5")); 137 | Log.d("sys", "isValidIp = " + plugin.isValidIp("195.5.5.-5")); 138 | 139 | 140 | // Class[] cArg = new Class[1]; 141 | // cArg[0] = String.class; 142 | // 143 | // Method des = localClass.getMethod("parseIP", cArg); 144 | // String ip = (String) des.invoke(instance, "aask223.3.5fjaspfj1.02.3.4kjkl69.0.54.35jlkjn"); 145 | // 146 | // Log.d("sys", "ip = " + ip); 147 | } catch (Exception e) { 148 | e.printStackTrace(); 149 | } 150 | } 151 | } -------------------------------------------------------------------------------- /Host/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 12 | 13 | 14 | 22 | 23 | -------------------------------------------------------------------------------- /Host/src/main/res/values-w820dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 64dp 6 | 7 | -------------------------------------------------------------------------------- /Host/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16dp 4 | 16dp 5 | 6 | -------------------------------------------------------------------------------- /Host/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Host/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Plugin/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /Plugin/Plugin.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 8 | 9 | 10 | 11 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /Plugin/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | android { 3 | compileSdkVersion 21 4 | buildToolsVersion "20.0.0" 5 | 6 | 7 | buildTypes { 8 | release { 9 | minifyEnabled true 10 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 11 | } 12 | } 13 | } 14 | 15 | dependencies { 16 | provided files('libs/plugin_interface.jar') 17 | } -------------------------------------------------------------------------------- /Plugin/libs/plugin_interface.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/degjeg/AndroidDexLoader/9c8ff470dac785d19e9129d45534e375d15c198c/Plugin/libs/plugin_interface.jar -------------------------------------------------------------------------------- /Plugin/manifest-merger-release-report.txt: -------------------------------------------------------------------------------- 1 | -- Merging decision tree log --- 2 | manifest 3 | ADDED from AndroidManifest.xml:2:1 4 | xmlns:android 5 | ADDED from AndroidManifest.xml:4:5 6 | package 7 | ADDED from AndroidManifest.xml:3:5 8 | uses-sdk 9 | ADDED from AndroidManifest.xml:6:5 10 | android:targetSdkVersion 11 | ADDED from AndroidManifest.xml:8:9 12 | android:minSdkVersion 13 | ADDED from AndroidManifest.xml:7:9 14 | application 15 | ADDED from AndroidManifest.xml:10:5 16 | android:versionName 17 | ADDED from AndroidManifest.xml:12:9 18 | android:versionCode 19 | ADDED from AndroidManifest.xml:11:9 20 | -------------------------------------------------------------------------------- /Plugin/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in D:\android\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 | #} 18 | 19 | #-keep class plugin.** {*;} 20 | -keep class plugin.apis.**{*;} -------------------------------------------------------------------------------- /Plugin/src/androidTest/java/allinone/android/test/ApplicationTest.java: -------------------------------------------------------------------------------- 1 | package allinone.android.test; 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 | } -------------------------------------------------------------------------------- /Plugin/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 9 | 10 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /Plugin/src/main/java/allinone/android/apis/IpApi.java: -------------------------------------------------------------------------------- 1 | package allinone.android.apis; 2 | 3 | import android.text.TextUtils; 4 | import android.util.Log; 5 | 6 | import java.util.regex.Matcher; 7 | import java.util.regex.Pattern; 8 | 9 | /** 10 | * Created by Administrator on 2015/3/26. 11 | */ 12 | public class IpApi { 13 | public String parseIP(String str) { 14 | if (str == null || str.length() == 0) { 15 | return null; 16 | } 17 | Pattern pattern = Pattern.compile("\\d+\\.\\d+\\.\\d+\\.\\d+"); 18 | Matcher matcher = pattern.matcher(str); 19 | int i = 0; 20 | while (matcher.find()) { 21 | String ip = matcher.group(0); 22 | 23 | Log.d("IpApi", "ip[" + i++ + "]" + ip); 24 | 25 | if (isValidIP(ip)) { 26 | return ip; 27 | } 28 | } 29 | 30 | return null; 31 | } 32 | 33 | public boolean isValidIP(String ip) { 34 | String ips[] = TextUtils.split(ip, "\\."); 35 | if (ips == null || ips.length != 4) { 36 | return false; 37 | } 38 | for (String s : ips) { 39 | if (!isValidIPNumber(s)) { 40 | return false; 41 | } 42 | } 43 | 44 | return true; 45 | } 46 | 47 | private boolean isValidIPNumber(String number) { 48 | if (number.length() > 3) { 49 | return false; 50 | } 51 | 52 | if (number.charAt(0) == '0' && number.length() != 1) { 53 | return false; 54 | } 55 | 56 | int n = Integer.valueOf(number); 57 | if (n >= 255 || n < 0) { 58 | return false; 59 | } 60 | 61 | return true; 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /Plugin/src/main/java/plugin/apis/PluginApi.java: -------------------------------------------------------------------------------- 1 | package plugin.apis; 2 | 3 | import allinone.android.apis.IpApi; 4 | 5 | public class PluginApi implements IPlugin{ 6 | public String parseIP(String str) { 7 | return new IpApi().parseIP(str); 8 | } 9 | 10 | public boolean isValidIp(String str) { 11 | return new IpApi().isValidIP(str); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Plugin/src/main/res/values-w820dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 64dp 6 | 7 | -------------------------------------------------------------------------------- /Plugin/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16dp 4 | 16dp 5 | 6 | -------------------------------------------------------------------------------- /Plugin/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Plugin/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /PluginInterface/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /PluginInterface/PluginInterface.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 8 | 9 | 10 | 11 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /PluginInterface/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'android-library' 2 | 3 | android { 4 | compileSdkVersion 21 5 | buildToolsVersion "20.0.0" 6 | 7 | 8 | buildTypes { 9 | release { 10 | minifyEnabled true 11 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 12 | } 13 | } 14 | } 15 | 16 | 17 | -------------------------------------------------------------------------------- /PluginInterface/manifest-merger-release-report.txt: -------------------------------------------------------------------------------- 1 | -- Merging decision tree log --- 2 | manifest 3 | ADDED from AndroidManifest.xml:2:1 4 | xmlns:android 5 | ADDED from AndroidManifest.xml:4:5 6 | package 7 | ADDED from AndroidManifest.xml:3:5 8 | uses-sdk 9 | ADDED from AndroidManifest.xml:6:5 10 | android:targetSdkVersion 11 | ADDED from AndroidManifest.xml:8:9 12 | android:minSdkVersion 13 | ADDED from AndroidManifest.xml:7:9 14 | application 15 | ADDED from AndroidManifest.xml:10:5 16 | android:versionName 17 | ADDED from AndroidManifest.xml:12:9 18 | android:versionCode 19 | ADDED from AndroidManifest.xml:11:9 20 | -------------------------------------------------------------------------------- /PluginInterface/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in D:\android\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 | #} 18 | 19 | #-keep class plugin.** {*;} 20 | -keep class plugin.apis.**{*;} -------------------------------------------------------------------------------- /PluginInterface/src/androidTest/java/allinone/android/test/ApplicationTest.java: -------------------------------------------------------------------------------- 1 | package allinone.android.test; 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 | } -------------------------------------------------------------------------------- /PluginInterface/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 9 | 10 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /PluginInterface/src/main/java/plugin/apis/IPlugin.java: -------------------------------------------------------------------------------- 1 | package plugin.apis; 2 | 3 | /** 4 | * Created by Administrator on 2015/3/26. 5 | */ 6 | public interface IPlugin { 7 | public String parseIP(String str); 8 | 9 | public boolean isValidIp(String str); 10 | } 11 | -------------------------------------------------------------------------------- /PluginInterface/src/main/res/values-w820dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 64dp 6 | 7 | -------------------------------------------------------------------------------- /PluginInterface/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16dp 4 | 16dp 5 | 6 | -------------------------------------------------------------------------------- /PluginInterface/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /PluginInterface/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # AndroidDexLoader 2 | Android动态加载dex,apk文件 3 | 4 | 5 | -------------------------------------------------------------------------------- /build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | repositories { 5 | jcenter() 6 | } 7 | dependencies { 8 | classpath 'com.android.tools.build:gradle:1.0.0' 9 | 10 | // NOTE: Do not place your application dependencies here; they belong 11 | // in the individual module build.gradle files 12 | } 13 | } 14 | 15 | allprojects { 16 | repositories { 17 | jcenter() 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m 13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 14 | 15 | # When configured, Gradle will run in incubating parallel mode. 16 | # This option should only be used with decoupled projects. More details, visit 17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 18 | # org.gradle.parallel=true -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':Plugin',':Host',':PluginInterface' 2 | 3 | 4 | --------------------------------------------------------------------------------