Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fengyuecanzhu/Maple
A Java hook framwork (Xposed style) for Android Runtime (ART) implemented by LSPlant.
https://github.com/fengyuecanzhu/Maple
Last synced: 14 days ago
JSON representation
A Java hook framwork (Xposed style) for Android Runtime (ART) implemented by LSPlant.
- Host: GitHub
- URL: https://github.com/fengyuecanzhu/Maple
- Owner: fengyuecanzhu
- License: lgpl-3.0
- Created: 2022-03-28T08:52:50.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2022-12-30T09:14:36.000Z (almost 2 years ago)
- Last Synced: 2024-08-01T17:32:06.170Z (3 months ago)
- Language: Java
- Homepage:
- Size: 167 KB
- Stars: 23
- Watchers: 2
- Forks: 9
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Maple
A Java hook framwork (Xposed style) for Android Runtime (ART) implemented by [LSPlant](https://github.com/LSPosed/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):
```groovy
allprojects {
repositories {
mavenCentral()
}
}
```Then import the framework in your build.gradle(app):
```groovy
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:
```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:
```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:
- [LSPlant](https://github.com/LSPosed/LSPlant)
- [Dobby](https://github.com/LSPosed/Dobby)
- [Pine](https://github.com/canyie/Pine)
- [XposedBridge](https://github.com/rovo89/XposedBridge)