Comments (4)
systemMain()只在system_server进程启动时才会调用,你自己的进程启动更本不会调用到,因此无法hook到
from whale.
SystemServer.java
private void createSystemContext() {
ActivityThread activityThread = ActivityThread.systemMain();
mSystemContext = activityThread.getSystemContext();
mSystemContext.setTheme(DEFAULT_SYSTEM_THEME);
final Context systemUiContext = activityThread.getSystemUiContext();
systemUiContext.setTheme(DEFAULT_SYSTEM_THEME);
}
from whale.
在 zygote 进程中 hook 的,类似 xposed
from whale.
} else if (startsSystemServer) {
Log.d("xxxx", "startsSystemServer");
findAndHookMethod(ActivityThread.class, "systemMain", new XC_MethodHook() {
@Override
protected void afterHookedMethod(MethodHookParam param) throws Throwable {
final ClassLoader cl = Thread.currentThread().getContextClassLoader();
Log.d("xxxxxx", "systemMain");
我在 414 进程,也就是 zygote 进程做的上面的代码的 hook ,
然后:
02-17 12:24:18.845: D/xxxx(414): startsSystemServer
02-17 12:24:20.062: I/Zygote(414): System server process 963 has been created
02-17 12:24:28.698: I/SystemServer(963): Entered the Android system server!
02-17 12:24:28.768: D/added-source-log(963): /frameworks/base/core/java/android/app/ActivityThread.java#systemMain()
但是 963 进程并没有打印出 systemMain
其他 app 进程的 hook 正常
from whale.
Related Issues (20)
- 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
- Whale
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.