Comments (4)
看代码里有很详细的注释文档
from whale.
写一个demo吧。这让我一个刚入门的情何以堪。
from whale.
这个的hook方式跟你写Xposed模块是几乎一样的(it is similar to the way in which you are writing the Xposed module)
这里给个常用的实例方法整体替换示例,如果喜欢用XposedHelpers类也可以
public void hookMethod(Method oldMethod, final Method newMethod) {
XposedBridge.hookMethod(oldMethod,
new XC_MethodReplacement() {
@Override
protected Object replaceHookedMethod(MethodHookParam param) throws Throwable {
Log.i(TAG, "调用替换方法");//a meaning less log to prevent crash(replacement method is too short?)
return newMethod.invoke(param.thisObject, param.args);
}
});
}
看看XposedBridge类的实现就知道怎么回事了
from whale.
Demo :
xposed-hook-based-on-whale
from whale.
Related Issues (20)
- 应用退到后台会bg anr被杀掉
- crash apps HOT 3
- android 10 crash HOT 3
- backup function is hang when called
- 集成whale的native hook,hook了art的defineClass方法,x86会报地址错误异常,arm64正常hook
- handle AOSP 10 Runtime changes HOT 3
- SEGV_MAPERR on emulator x86 api 28
- instrumentation.cc:986] Check failed: !method->IsNative() HOT 1
- SEGV_MAPERR null pointer dereference on api 28 x86_64 emulator HOT 1
- Error when trying to remove hook
- Unable to read data from libart.so. HOT 1
- signal 11 (SIGSEGV) JniMethodEndWithReference HOT 3
- Support Android 11 (P)
- should elf_image be mmap-ed with +X?
- update README file - compatibility section HOT 1
- Need rooted?
- Add support for Android 12 & 13
- Could not hook hidden API on Android 5/5.1
- Provide static libs for iOS HOT 1
- 适配到android 12 HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from whale.