Skip to content

A Java hook framwork (Xposed style) for Android Runtime (ART) implemented by LSPlant.

License

Notifications You must be signed in to change notification settings

fengyuecanzhu/Maple

Repository files navigation

Maple

A Java hook framwork (Xposed style) for Android Runtime (ART) implemented by LSPlant.

Features

  • Support Android 5.0 - 13 (API level 21 - 33)
  • Support armeabi-v7a, arm64-v8a, x86, x86-64
  • Xposed style hook api

Usage

1、Before usage

Import method:

Add the maven repository in your build.gradle(Project) (new version Android Studio please in settings.gradle):

allprojects {
    repositories {
        mavenCentral()
    }
}

Then import the framework in your build.gradle(app):

dependencies {
    implementation "me.fycz.maple:maple:2.1"
}

2、Usage in codes

All APIs are xposed style, you can use as simple as using xposed.

kotlin:

MapleUtils.findAndHookMethod(
    Activity::class.java,
    "onCreate",
    Bundle::class.java,
    object : MethodHook() {
        override fun beforeHookedMethod(param: MapleBridge.MethodHookParam) {
            //TODO: Hook before the method onCreate in the Activity is called.
        }
    }
)

java:

MapleUtils.findAndHookMethod(
    Activity.class,
    "onCreate",
    Bundle.class,
    new MethodHook() {
        @Override
    	public void afterHookedMethod(MapleBridge.MethodHookParam param) throws Throwable {
            //TODO: Hook after the method onCreate in the Activity is called.
        }
    }
);

Credits

Inspired by the following frameworks:

About

A Java hook framwork (Xposed style) for Android Runtime (ART) implemented by LSPlant.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages