├── app ├── .gitignore ├── src │ ├── main │ │ ├── res │ │ │ ├── values │ │ │ │ ├── strings.xml │ │ │ │ ├── colors.xml │ │ │ │ └── styles.xml │ │ │ ├── mipmap-hdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-mdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-anydpi-v26 │ │ │ │ ├── ic_launcher.xml │ │ │ │ └── ic_launcher_round.xml │ │ │ ├── layout │ │ │ │ ├── activity_empty.xml │ │ │ │ ├── activity_test_thread_hook.xml │ │ │ │ ├── activity_test_on_click.xml │ │ │ │ ├── activity_test_notification.xml │ │ │ │ ├── activity_target.xml │ │ │ │ ├── activity_target_app_compat.xml │ │ │ │ ├── activity_test_start.xml │ │ │ │ ├── activity_test_application_start.xml │ │ │ │ ├── activity_test_imanager_start.xml │ │ │ │ ├── activity_rx_java_hook.xml │ │ │ │ ├── activity_test_clipboard.xml │ │ │ │ ├── activity_test_start_no_register.xml │ │ │ │ ├── activity_test_hook_start.xml │ │ │ │ └── activity_main.xml │ │ │ ├── drawable-v24 │ │ │ │ └── ic_launcher_foreground.xml │ │ │ └── drawable │ │ │ │ └── ic_launcher_background.xml │ │ ├── java │ │ │ └── com │ │ │ │ └── xj │ │ │ │ └── hookdemo │ │ │ │ ├── activityhook │ │ │ │ ├── EmptyActivity.java │ │ │ │ ├── TargetActivity.java │ │ │ │ ├── TestActivityStart.java │ │ │ │ ├── TargetAppCompatActivity.java │ │ │ │ ├── TestApplicationStart.java │ │ │ │ ├── TestIActivityManagerStart.java │ │ │ │ ├── TestStartActivityNoRegister.java │ │ │ │ ├── TestHookStartActivity.java │ │ │ │ └── TestClipboardActivity.java │ │ │ │ ├── TestNotificationActivity.java │ │ │ │ ├── hook │ │ │ │ ├── HookedClickListenerProxy.java │ │ │ │ ├── activity │ │ │ │ │ ├── PMSHandler.java │ │ │ │ │ ├── AMSInvocationHandler.java │ │ │ │ │ ├── IActivityManagerHandler.java │ │ │ │ │ ├── ActivityThreadHandlerCallback.java │ │ │ │ │ ├── AMSHookInvocationHandler.java │ │ │ │ │ ├── ActivityProxyInstrumentation.java │ │ │ │ │ ├── ApplicationInstrumentation.java │ │ │ │ │ └── AMSHookUtil.java │ │ │ │ ├── clipboard │ │ │ │ │ ├── ClipboardHookRemoteBinderHandler.java │ │ │ │ │ ├── ClipboardHookLocalBinderHandler.java │ │ │ │ │ └── ClipboardHelper.java │ │ │ │ ├── notification │ │ │ │ │ └── NotificationHookHelper.java │ │ │ │ ├── HookResetUtils.java │ │ │ │ └── HookHelper.java │ │ │ │ ├── thread │ │ │ │ ├── TestThreadHookActivity.kt │ │ │ │ ├── ThreadMethodHook.java │ │ │ │ └── ThreadHookUtils.java │ │ │ │ ├── rxjava │ │ │ │ ├── IOMain.java │ │ │ │ ├── Rx2Utils.kt │ │ │ │ └── RxJavaHookActivity.kt │ │ │ │ ├── App.java │ │ │ │ ├── TestOnClickActivity.java │ │ │ │ ├── utils │ │ │ │ └── BinderHook.java │ │ │ │ ├── MainActivity.java │ │ │ │ └── NotificationHelper.java │ │ └── AndroidManifest.xml │ ├── test │ │ └── java │ │ │ └── com │ │ │ └── example │ │ │ └── administrator │ │ │ └── hookdemo │ │ │ └── ExampleUnitTest.java │ └── androidTest │ │ └── java │ │ └── com │ │ └── example │ │ └── administrator │ │ └── hookdemo │ │ └── ExampleInstrumentedTest.java ├── proguard-rules.pro └── build.gradle ├── settings.gradle ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── .idea ├── caches │ └── build_file_checksums.ser ├── encodings.xml ├── compiler.xml ├── runConfigurations.xml ├── gradle.xml ├── jarRepositories.xml ├── misc.xml └── codeStyles │ └── Project.xml ├── .gitignore ├── gradle.properties ├── gradlew.bat └── gradlew /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app', ':demo',"Demo2" 2 | -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | HookDemo 3 | 4 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdutxiaoxu/HookDemo/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /.idea/caches/build_file_checksums.ser: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdutxiaoxu/HookDemo/HEAD/.idea/caches/build_file_checksums.ser -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdutxiaoxu/HookDemo/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdutxiaoxu/HookDemo/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdutxiaoxu/HookDemo/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdutxiaoxu/HookDemo/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdutxiaoxu/HookDemo/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdutxiaoxu/HookDemo/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdutxiaoxu/HookDemo/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdutxiaoxu/HookDemo/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea 5 | .DS_Store 6 | /build 7 | /captures 8 | .externalNativeBuild 9 | /demo/ 10 | /Demo2/ 11 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdutxiaoxu/HookDemo/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdutxiaoxu/HookDemo/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3F51B5 4 | #303F9F 5 | #FF4081 6 | 7 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Fri Sep 03 17:14:46 CST 2021 2 | distributionBase=GRADLE_USER_HOME 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-bin.zip 4 | distributionPath=wrapper/dists 5 | zipStorePath=wrapper/dists 6 | zipStoreBase=GRADLE_USER_HOME 7 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/java/com/xj/hookdemo/activityhook/EmptyActivity.java: -------------------------------------------------------------------------------- 1 | package com.xj.hookdemo.activityhook; 2 | 3 | import android.os.Bundle; 4 | import android.support.v7.app.AppCompatActivity; 5 | 6 | public class EmptyActivity extends AppCompatActivity { 7 | 8 | @Override 9 | protected void onCreate(Bundle savedInstanceState) { 10 | super.onCreate(savedInstanceState); 11 | // setContentView(R.layout.activity_empty); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /app/src/main/java/com/xj/hookdemo/TestNotificationActivity.java: -------------------------------------------------------------------------------- 1 | package com.xj.hookdemo; 2 | 3 | import android.support.v7.app.AppCompatActivity; 4 | import android.os.Bundle; 5 | 6 | public class TestNotificationActivity extends AppCompatActivity { 7 | 8 | @Override 9 | protected void onCreate(Bundle savedInstanceState) { 10 | super.onCreate(savedInstanceState); 11 | setContentView(R.layout.activity_test_notification); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /app/src/main/java/com/xj/hookdemo/activityhook/TargetActivity.java: -------------------------------------------------------------------------------- 1 | package com.xj.hookdemo.activityhook; 2 | 3 | import android.app.Activity; 4 | import android.os.Bundle; 5 | 6 | import com.xj.hookdemo.R; 7 | 8 | public class TargetActivity extends Activity { 9 | 10 | @Override 11 | protected void onCreate(Bundle savedInstanceState) { 12 | super.onCreate(savedInstanceState); 13 | setContentView(R.layout.activity_target); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_empty.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/java/com/xj/hookdemo/activityhook/TestActivityStart.java: -------------------------------------------------------------------------------- 1 | package com.xj.hookdemo.activityhook; 2 | 3 | import android.os.Bundle; 4 | import android.support.v7.app.AppCompatActivity; 5 | 6 | import com.xj.hookdemo.R; 7 | 8 | public class TestActivityStart extends AppCompatActivity { 9 | 10 | @Override 11 | protected void onCreate(Bundle savedInstanceState) { 12 | super.onCreate(savedInstanceState); 13 | setContentView(R.layout.activity_test_start); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /app/src/test/java/com/example/administrator/hookdemo/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.xj.hookdemo; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * @see Testing documentation 11 | */ 12 | public class ExampleUnitTest { 13 | @Test 14 | public void addition_isCorrect() { 15 | assertEquals(4, 2 + 2); 16 | } 17 | } -------------------------------------------------------------------------------- /app/src/main/java/com/xj/hookdemo/activityhook/TargetAppCompatActivity.java: -------------------------------------------------------------------------------- 1 | package com.xj.hookdemo.activityhook; 2 | 3 | import android.os.Bundle; 4 | import android.support.v7.app.AppCompatActivity; 5 | 6 | import com.xj.hookdemo.R; 7 | 8 | public class TargetAppCompatActivity extends AppCompatActivity { 9 | 10 | @Override 11 | protected void onCreate(Bundle savedInstanceState) { 12 | super.onCreate(savedInstanceState); 13 | setContentView(R.layout.activity_target_app_compat); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /app/src/main/java/com/xj/hookdemo/activityhook/TestApplicationStart.java: -------------------------------------------------------------------------------- 1 | package com.xj.hookdemo.activityhook; 2 | 3 | import android.os.Bundle; 4 | import android.support.v7.app.AppCompatActivity; 5 | 6 | import com.xj.hookdemo.R; 7 | 8 | public class TestApplicationStart extends AppCompatActivity { 9 | 10 | @Override 11 | protected void onCreate(Bundle savedInstanceState) { 12 | super.onCreate(savedInstanceState); 13 | setContentView(R.layout.activity_test_application_start); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /app/src/main/java/com/xj/hookdemo/activityhook/TestIActivityManagerStart.java: -------------------------------------------------------------------------------- 1 | package com.xj.hookdemo.activityhook; 2 | 3 | import android.support.v7.app.AppCompatActivity; 4 | import android.os.Bundle; 5 | 6 | import com.xj.hookdemo.R; 7 | 8 | public class TestIActivityManagerStart extends AppCompatActivity { 9 | 10 | @Override 11 | protected void onCreate(Bundle savedInstanceState) { 12 | super.onCreate(savedInstanceState); 13 | setContentView(R.layout.activity_test_imanager_start); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_test_thread_hook.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 |