All Projects → tiann → Epic

tiann / Epic

Licence: other
Dynamic java method AOP hook for Android(continution of Dexposed on ART), Supporting 5.0~11

Programming Languages

java
68154 projects - #9 most used programming language
C++
36643 projects - #6 most used programming language

Projects that are alternatives of or similar to Epic

Pine
Dynamic java method hook framework on ART.
Stars: ✭ 171 (-95.02%)
Mutual labels:  hook, art, xposed, aop
Sandhook
Android ART Hook/Native Inline Hook/Single Instruction Hook - support 4.4 - 11.0 32/64 bit - Xposed API Compat
Stars: ✭ 1,172 (-65.87%)
Mutual labels:  hook, art, xposed, aop
Virtualxposed
A simple app to use Xposed without root, unlock the bootloader or modify system image, etc.
Stars: ✭ 12,648 (+268.32%)
Mutual labels:  hook, xposed, aop
Swifthook
A library to hook methods in Swift and Objective-C.
Stars: ✭ 93 (-97.29%)
Mutual labels:  hook, aop
Xposednavigationbar
Xposed导航栏功能拓展模块
Stars: ✭ 42 (-98.78%)
Mutual labels:  hook, xposed
Xpatch
免Root实现app加载Xposed插件工具。This is a tool to repackage apk file, then the apk can load any xposed modules installed in the device. It is another way to hook an app without root device.
Stars: ✭ 1,054 (-69.31%)
Mutual labels:  hook, xposed
Androididchanger
Xposed Module for Changing Android Device Info
Stars: ✭ 394 (-88.53%)
Mutual labels:  hook, xposed
Hookwormforandroid
一个基于Magisk&Riru的Module,可以助你用超低成本开发各种Hook插件,无须Xposed
Stars: ✭ 136 (-96.04%)
Mutual labels:  hook, xposed
Easyprotector
一行代码检测XP/调试/多开/模拟器/root
Stars: ✭ 1,732 (-49.56%)
Mutual labels:  hook, xposed
Easyrouter
A simple android framework used to route activity or action with url.
Stars: ✭ 164 (-95.22%)
Mutual labels:  hook, aop
Qujing
曲境是一个xposed模块,可实现在PC浏览器上动态监控(hook)函数调用和查看堆栈信息,及反射调用(invoke)等功能。
Stars: ✭ 197 (-94.26%)
Mutual labels:  hook, xposed
Stinger
Stinger is a high-efficiency library with great compatibility, for aop in Objective-C, using libffi instead of Objective-C message forwarding. It is 20+ times faster than the Aspects, from message-sending to Aspect-oriented code ends.
Stars: ✭ 845 (-75.39%)
Mutual labels:  hook, aop
Sandvxposed
Xposed environment without root (OS 5.0 - 10.0)
Stars: ✭ 604 (-82.41%)
Mutual labels:  hook, xposed
Headwolf
Scaffolding for agile development based on Xposed and Sekiro/基于Xposed和Sekiro搭建的敏捷开发的脚手架🎁献给懒汉们的小礼物😘只需四步!部署完一个Hook项目!👋👋新版本只需两步!!!
Stars: ✭ 182 (-94.7%)
Mutual labels:  hook, xposed
SandVXposed
Xposed environment without root (OS 5.0 - 10.0)
Stars: ✭ 832 (-75.77%)
Mutual labels:  hook, xposed
X Apm
应用管理 Xposed
Stars: ✭ 482 (-85.96%)
Mutual labels:  hook, xposed
Beike AspectD
Flutter AOP framework.(Flutter面向切面库, 最新适配Flutter v2.5.3, null-safety)
Stars: ✭ 39 (-98.86%)
Mutual labels:  hook, aop
aspectgo
Aspect-Oriented Programming framework for Go
Stars: ✭ 62 (-98.19%)
Mutual labels:  hook, aop
SandVXposed
Xposed environment without root (OS 5.0 - 12.0)
Stars: ✭ 241 (-92.98%)
Mutual labels:  hook, xposed
use-dencrypt-effect
⚛ A custom React hook generating crypting text effect.
Stars: ✭ 39 (-98.86%)
Mutual labels:  hook

Download Join the chat at https://gitter.im/android-hacker/epic

中文文档入口

What is it?

Epic is the continuation of Dexposed on ART (Supports 5.0 ~ 11).

Dexposed is a powerful yet non-invasive runtime AOP (Aspect-oriented Programming) framework for Android app development, based on the work of open-source Xposed framework project.

The AOP of Dexposed is implemented purely non-invasive, without any annotation processor, weaver or bytecode rewriter. The integration is as simple as loading a small JNI library in just one line of code at the initialization phase of your app.

Not only the code of your app, but also the code of Android framework that running in your app process can be hooked.

Epic keeps the same API and all capability of Dexposed, you can do anything which is supported by Dexposed.

Typical use-cases

  • Classic AOP programming
  • Instrumentation (for testing, performance monitoring and etc.)
  • Security audit (sensitive api check,Smash shell)
  • Just for fun :)

Integration

Directly add epic aar to your project as compile libraries, Gradle dependency like following(jitpack):

dependencies {
    compile 'com.github.tiann:epic:0.11.2'
}

Everything is ready.

Basic usage

There are three injection points for a given method: before, after, origin.

Example 1: monitor the creation and destroy of java thread

class ThreadMethodHook extends XC_MethodHook{
    @Override
    protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
        super.beforeHookedMethod(param);
        Thread t = (Thread) param.thisObject;
        Log.i(TAG, "thread:" + t + ", started..");
    }

    @Override
    protected void afterHookedMethod(MethodHookParam param) throws Throwable {
        super.afterHookedMethod(param);
        Thread t = (Thread) param.thisObject;
        Log.i(TAG, "thread:" + t + ", exit..");
    }
}

DexposedBridge.hookAllConstructors(Thread.class, new XC_MethodHook() {
    @Override
    protected void afterHookedMethod(MethodHookParam param) throws Throwable {
        super.afterHookedMethod(param);
        Thread thread = (Thread) param.thisObject;
        Class<?> clazz = thread.getClass();
        if (clazz != Thread.class) {
            Log.d(TAG, "found class extend Thread:" + clazz);
            DexposedBridge.findAndHookMethod(clazz, "run", new ThreadMethodHook());
        }
        Log.d(TAG, "Thread: " + thread.getName() + " class:" + thread.getClass() +  " is created.");
    }
});
DexposedBridge.findAndHookMethod(Thread.class, "run", new ThreadMethodHook());

Example 2: Intercept the dex loading behavior

DexposedBridge.findAndHookMethod(DexFile.class, "loadDex", String.class, String.class, int.class, new XC_MethodHook() {
    @Override
    protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
        super.beforeHookedMethod(param);
        String dex = (String) param.args[0];
        String odex = (String) param.args[1];
        Log.i(TAG, "load dex, input:" + dex + ", output:" + odex);
    }
});

Checkout the sample project to find out more.

Support

Epic supports ART thumb2 and arm64 architecture from Android 5.0 ~ 11. arm32, x86, x86_64 and mips are not supported now (Thus it cannot work on android emulator).

Known Issues

  1. Short method (instruction less 8 bytes on thumb2 or less 16bytes in ARM64) are not supported.
  2. Fully inline methods are not supported.

Contribute

We are open to constructive contributions from the community, especially pull request and quality bug report. Currently, the implementation for ART is not proved in large scale, we value your help to test or improve the implementation.

You can clone this project, build and install the sample app, just make some click in your device, if some bugs/crash occurs, please file an issue or a pull request, I would appreciate it :)

Thanks

  1. Dexposed
  2. Xposed
  3. mar-v-in/ArtHook
  4. Nougat_dlfunctions

Contact me

[email protected]

Join discussion

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].