├── .gitignore ├── DexShellTools ├── .classpath ├── .project └── src │ └── com │ └── example │ └── reforceapk │ └── mymain.java ├── ForceApkObj ├── .classpath ├── .project ├── AndroidManifest.xml ├── ic_launcher-web.png ├── libs │ └── android-support-v4.jar ├── proguard-project.txt ├── project.properties ├── res │ ├── drawable-hdpi │ │ └── ic_launcher.png │ ├── drawable-mdpi │ │ └── ic_launcher.png │ ├── drawable-xhdpi │ │ └── ic_launcher.png │ ├── drawable-xxhdpi │ │ └── ic_launcher.png │ ├── layout │ │ └── activity_main.xml │ ├── values-w820dp │ │ └── dimens.xml │ └── values │ │ ├── dimens.xml │ │ └── strings.xml └── src │ └── com │ └── example │ └── forceapkobj │ ├── MainActivity.java │ ├── MyApplication.java │ └── SubActivity.java ├── README.md └── ReforceApk ├── .classpath ├── .project ├── AndroidManifest.xml ├── ic_launcher-web.png ├── libs └── android-support-v4.jar ├── proguard-project.txt ├── project.properties ├── res ├── drawable-hdpi │ └── ic_launcher.png ├── drawable-mdpi │ └── ic_launcher.png ├── drawable-xhdpi │ └── ic_launcher.png ├── drawable-xxhdpi │ └── ic_launcher.png ├── layout │ └── activity_main.xml ├── values-w820dp │ └── dimens.xml └── values │ ├── dimens.xml │ └── strings.xml └── src └── com └── example └── reforceapk ├── MainActivity.java ├── ProxyApplication.java └── RefInvoke.java /.gitignore: -------------------------------------------------------------------------------- 1 | # Built application files 2 | *.apk 3 | *.ap_ 4 | 5 | # Files for the Dalvik VM 6 | *.dex 7 | 8 | # Java class files 9 | *.class 10 | .settings/ 11 | 12 | # Generated files 13 | bin/ 14 | gen/ 15 | 16 | # Gradle files 17 | captures/ 18 | build/ 19 | .gradle/ 20 | .idea/ 21 | obj/ 22 | *.lock 23 | *.bin 24 | *.iml 25 | 26 | # Local configuration file (sdk path, etc) 27 | local.properties 28 | #gradle.properties 29 | 30 | 31 | # Proguard folder generated by Eclipse 32 | proguard/ 33 | 34 | 35 | -------------------------------------------------------------------------------- /DexShellTools/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /DexShellTools/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | DexShellTools 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.jdt.core.javanature 16 | 17 | 18 | -------------------------------------------------------------------------------- /DexShellTools/src/com/example/reforceapk/mymain.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoshan-yang/ApkReinforce/de2c273bddf50b3fb80c2ba1ffee51cb7ebd98cb/DexShellTools/src/com/example/reforceapk/mymain.java -------------------------------------------------------------------------------- /ForceApkObj/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /ForceApkObj/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | ForceApkObj 4 | 5 | 6 | 7 | 8 | 9 | com.android.ide.eclipse.adt.ResourceManagerBuilder 10 | 11 | 12 | 13 | 14 | com.android.ide.eclipse.adt.PreCompilerBuilder 15 | 16 | 17 | 18 | 19 | org.eclipse.jdt.core.javabuilder 20 | 21 | 22 | 23 | 24 | com.android.ide.eclipse.adt.ApkBuilder 25 | 26 | 27 | 28 | 29 | 30 | com.android.ide.eclipse.adt.AndroidNature 31 | org.eclipse.jdt.core.javanature 32 | 33 | 34 | -------------------------------------------------------------------------------- /ForceApkObj/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 10 | 11 | 16 | 17 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /ForceApkObj/ic_launcher-web.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoshan-yang/ApkReinforce/de2c273bddf50b3fb80c2ba1ffee51cb7ebd98cb/ForceApkObj/ic_launcher-web.png -------------------------------------------------------------------------------- /ForceApkObj/libs/android-support-v4.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoshan-yang/ApkReinforce/de2c273bddf50b3fb80c2ba1ffee51cb7ebd98cb/ForceApkObj/libs/android-support-v4.jar -------------------------------------------------------------------------------- /ForceApkObj/proguard-project.txt: -------------------------------------------------------------------------------- 1 | # To enable ProGuard in your project, edit project.properties 2 | # to define the proguard.config property as described in that file. 3 | # 4 | # Add project specific ProGuard rules here. 5 | # By default, the flags in this file are appended to flags specified 6 | # in ${sdk.dir}/tools/proguard/proguard-android.txt 7 | # You can edit the include path and order by changing the ProGuard 8 | # include property in project.properties. 9 | # 10 | # For more details, see 11 | # http://developer.android.com/guide/developing/tools/proguard.html 12 | 13 | # Add any project specific keep options here: 14 | 15 | # If your project uses WebView with JS, uncomment the following 16 | # and specify the fully qualified class name to the JavaScript interface 17 | # class: 18 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 19 | # public *; 20 | #} 21 | -------------------------------------------------------------------------------- /ForceApkObj/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-20 15 | -------------------------------------------------------------------------------- /ForceApkObj/res/drawable-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoshan-yang/ApkReinforce/de2c273bddf50b3fb80c2ba1ffee51cb7ebd98cb/ForceApkObj/res/drawable-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /ForceApkObj/res/drawable-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoshan-yang/ApkReinforce/de2c273bddf50b3fb80c2ba1ffee51cb7ebd98cb/ForceApkObj/res/drawable-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /ForceApkObj/res/drawable-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoshan-yang/ApkReinforce/de2c273bddf50b3fb80c2ba1ffee51cb7ebd98cb/ForceApkObj/res/drawable-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /ForceApkObj/res/drawable-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoshan-yang/ApkReinforce/de2c273bddf50b3fb80c2ba1ffee51cb7ebd98cb/ForceApkObj/res/drawable-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /ForceApkObj/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 10 | 11 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /ForceApkObj/res/values-w820dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 64dp 9 | 10 | 11 | -------------------------------------------------------------------------------- /ForceApkObj/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 16dp 5 | 16dp 6 | 7 | 8 | -------------------------------------------------------------------------------- /ForceApkObj/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ForceApkObj 5 | Hello world! 6 | Settings 7 | 8 | 9 | -------------------------------------------------------------------------------- /ForceApkObj/src/com/example/forceapkobj/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.example.forceapkobj; 2 | 3 | import android.app.Activity; 4 | import android.content.Intent; 5 | import android.os.Bundle; 6 | import android.util.Log; 7 | import android.view.View; 8 | import android.view.View.OnClickListener; 9 | import android.widget.TextView; 10 | 11 | public class MainActivity extends Activity { 12 | 13 | @Override 14 | protected void onCreate(Bundle savedInstanceState) { 15 | super.onCreate(savedInstanceState); 16 | 17 | TextView content = new TextView(this); 18 | content.setText("I am Source Apk"); 19 | content.setOnClickListener(new OnClickListener(){ 20 | @Override 21 | public void onClick(View arg0) { 22 | Intent intent = new Intent(MainActivity.this, SubActivity.class); 23 | startActivity(intent); 24 | }}); 25 | setContentView(content); 26 | 27 | Log.i("demo", "app:"+getApplicationContext()); 28 | 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /ForceApkObj/src/com/example/forceapkobj/MyApplication.java: -------------------------------------------------------------------------------- 1 | package com.example.forceapkobj; 2 | 3 | import android.app.Application; 4 | import android.util.Log; 5 | 6 | public class MyApplication extends Application{ 7 | 8 | @Override 9 | public void onCreate() { 10 | super.onCreate(); 11 | Log.i("demo", "source apk onCreate:"+this); 12 | } 13 | 14 | } 15 | -------------------------------------------------------------------------------- /ForceApkObj/src/com/example/forceapkobj/SubActivity.java: -------------------------------------------------------------------------------- 1 | package com.example.forceapkobj; 2 | 3 | import android.app.Activity; 4 | import android.os.Bundle; 5 | import android.util.Log; 6 | import android.widget.TextView; 7 | 8 | public class SubActivity extends Activity { 9 | 10 | @Override 11 | protected void onCreate(Bundle savedInstanceState) { 12 | super.onCreate(savedInstanceState); 13 | 14 | TextView content = new TextView(this); 15 | content.setText("I am Source Apk SubMainActivity"); 16 | 17 | setContentView(content); 18 | 19 | Log.i("demo", "app:"+getApplicationContext()); 20 | 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | # Android中的Apk的加固(加壳)原理解析和实现 3 | 4 | http://blog.csdn.net/jiangwei0910410003/article/details/48415225/ -------------------------------------------------------------------------------- /ReforceApk/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /ReforceApk/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | ReforceApk 4 | 5 | 6 | 7 | 8 | 9 | com.android.ide.eclipse.adt.ResourceManagerBuilder 10 | 11 | 12 | 13 | 14 | com.android.ide.eclipse.adt.PreCompilerBuilder 15 | 16 | 17 | 18 | 19 | org.eclipse.jdt.core.javabuilder 20 | 21 | 22 | 23 | 24 | com.android.ide.eclipse.adt.ApkBuilder 25 | 26 | 27 | 28 | 29 | 30 | com.android.ide.eclipse.adt.AndroidNature 31 | org.eclipse.jdt.core.javanature 32 | 33 | 34 | -------------------------------------------------------------------------------- /ReforceApk/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 10 | 11 | 16 | 17 | 18 | 19 | 25 | 26 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /ReforceApk/ic_launcher-web.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoshan-yang/ApkReinforce/de2c273bddf50b3fb80c2ba1ffee51cb7ebd98cb/ReforceApk/ic_launcher-web.png -------------------------------------------------------------------------------- /ReforceApk/libs/android-support-v4.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoshan-yang/ApkReinforce/de2c273bddf50b3fb80c2ba1ffee51cb7ebd98cb/ReforceApk/libs/android-support-v4.jar -------------------------------------------------------------------------------- /ReforceApk/proguard-project.txt: -------------------------------------------------------------------------------- 1 | # To enable ProGuard in your project, edit project.properties 2 | # to define the proguard.config property as described in that file. 3 | # 4 | # Add project specific ProGuard rules here. 5 | # By default, the flags in this file are appended to flags specified 6 | # in ${sdk.dir}/tools/proguard/proguard-android.txt 7 | # You can edit the include path and order by changing the ProGuard 8 | # include property in project.properties. 9 | # 10 | # For more details, see 11 | # http://developer.android.com/guide/developing/tools/proguard.html 12 | 13 | # Add any project specific keep options here: 14 | 15 | # If your project uses WebView with JS, uncomment the following 16 | # and specify the fully qualified class name to the JavaScript interface 17 | # class: 18 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 19 | # public *; 20 | #} 21 | -------------------------------------------------------------------------------- /ReforceApk/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-20 15 | -------------------------------------------------------------------------------- /ReforceApk/res/drawable-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoshan-yang/ApkReinforce/de2c273bddf50b3fb80c2ba1ffee51cb7ebd98cb/ReforceApk/res/drawable-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /ReforceApk/res/drawable-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoshan-yang/ApkReinforce/de2c273bddf50b3fb80c2ba1ffee51cb7ebd98cb/ReforceApk/res/drawable-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /ReforceApk/res/drawable-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoshan-yang/ApkReinforce/de2c273bddf50b3fb80c2ba1ffee51cb7ebd98cb/ReforceApk/res/drawable-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /ReforceApk/res/drawable-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoshan-yang/ApkReinforce/de2c273bddf50b3fb80c2ba1ffee51cb7ebd98cb/ReforceApk/res/drawable-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /ReforceApk/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 10 | 11 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /ReforceApk/res/values-w820dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 64dp 9 | 10 | 11 | -------------------------------------------------------------------------------- /ReforceApk/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 16dp 5 | 16dp 6 | 7 | 8 | -------------------------------------------------------------------------------- /ReforceApk/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ReforceApk 5 | Hello world! 6 | Settings 7 | 8 | 9 | -------------------------------------------------------------------------------- /ReforceApk/src/com/example/reforceapk/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.example.reforceapk; 2 | 3 | import android.app.Activity; 4 | import android.os.Bundle; 5 | 6 | public class MainActivity extends Activity { 7 | 8 | @Override 9 | protected void onCreate(Bundle savedInstanceState) { 10 | super.onCreate(savedInstanceState); 11 | setContentView(R.layout.activity_main); 12 | } 13 | 14 | } 15 | -------------------------------------------------------------------------------- /ReforceApk/src/com/example/reforceapk/ProxyApplication.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoshan-yang/ApkReinforce/de2c273bddf50b3fb80c2ba1ffee51cb7ebd98cb/ReforceApk/src/com/example/reforceapk/ProxyApplication.java -------------------------------------------------------------------------------- /ReforceApk/src/com/example/reforceapk/RefInvoke.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guoshan-yang/ApkReinforce/de2c273bddf50b3fb80c2ba1ffee51cb7ebd98cb/ReforceApk/src/com/example/reforceapk/RefInvoke.java --------------------------------------------------------------------------------