Comments (8)
入口处新增
loadApp(name = "com.highcapable.yukihookapi.demo_app") {
Log.e("HookEntry", "onHook: $packageName:$processName")
}
重复打印 两次
from yukihookapi.
入口处新增
loadApp(name = "com.highcapable.yukihookapi.demo_app") { Log.e("HookEntry", "onHook: $packageName:$processName") }
重复打印 两次
请仔细阅读 这里 的文档。
如果你的项目使用了资源钩子,每次都会回调两次,第一次是方法 Hook,第二次是资源 Hook,内部代码已经使用判断区分每次 Hook 的作用域,并不会重复执行,这属于正常现象。
如果你并不需要资源钩子,你可以在注解中声明 isUseResourcesHook = false
。
from yukihookapi.
项目很感兴趣,尝试demo使用报错
环境 LSP 1.8.5 系统版本8.1.0 arm64-v8a
日志不完整,无法定位是什么问题,请粘贴 demo 代码和全部日志,请勿截图,否则不受理此类问题,谢谢。
from yukihookapi.
感谢回复,我这里测试日志主要是避免重复hook。如果是原理如此且不会执行那就不算问题。
后面的异常完整日志如下:
2022-11-16 09:26:44.660 18485-18485 HookEntry com...hcapable.yukihookapi.demo_app E onHook: com.highcapable.yukihookapi.demo_app:com.highcapable.yukihookapi.demo_app
2022-11-16 09:26:44.857 18485-18485 HookEntry com...hcapable.yukihookapi.demo_app E onHook: com.highcapable.yukihookapi.demo_app:com.highcapable.yukihookapi.demo_app
2022-11-16 09:26:45.001 18485-18485 YukiHookAPI-Demo com...hcapable.yukihookapi.demo_app E Activity Proxy initialization failed because got an Exception
java.lang.NoClassDefFoundError: Can't find this Class in [LspModuleClassLoader[module=/data/app/com.highcapable.yukihookapi.demo_module-z08F1xLhtnMJnJfK5LJo3A==/base.apk, nativeLibraryDirs=/data/app/com.highcapable.yukihookapi.demo_module-z08F1xLhtnMJnJfK5LJo3A==/base.apk!/lib/arm64-v8a, /system/lib64, /vendor/lib64, P[DexPathList[[dex file "InMemoryDexFile[cookie=[0, 501158811808]]", dex file "InMemoryDexFile[cookie=[0, 501158812448]]", dex file "InMemoryDexFile[cookie=[0, 501158812768]]", dex file "InMemoryDexFile[cookie=[0, 501158812928]]", dex file "InMemoryDexFile[cookie=[0, 501158813088]]", dex file "InMemoryDexFile[cookie=[0, 501158813248]]", dex file "InMemoryDexFile[cookie=[0, 501158813408]]", dex file "InMemoryDexFile[cookie=[0, 501158813728]]", dex file "InMemoryDexFile[cookie=[0, 501158814048]]", dex file "InMemoryDexFile[cookie=[0, 501158814208]]", dex file "InMemoryDexFile[cookie=[0, 501158814368]]", dex file "InMemoryDexFile[cookie=[0, 501158814528]]", dex file "InMemoryDexFile[cookie=[0, 501158814688]]", dex file "InMemoryDexFile[cookie=[0, 501158814848]]", dex file "InMemoryDexFile[cookie=[0, 501158815008]]", dex file "InMemoryDexFile[cookie=[0, 501158815168]]", dex file "InMemoryDexFile[cookie=[0, 501158815328]]", dex file "InMemoryDexFile[cookie=[0, 501158815488]]", dex file "InMemoryDexFile[cookie=[0, 501158815648]]", dex file "InMemoryDexFile[cookie=[0, 501158815808]]", dex file "InMemoryDexFile[cookie=[0, 501158815968]]", dex file "InMemoryDexFile[cookie=[0, 501158816128]]"],nativeLibraryDirectories=[/system/lib64, /vendor/lib64]]]]]:
-> name:[android.app.ActivityTaskManager]
Generated by YukiHookAPI#ReflectionTool
at com.highcapable.yukihookapi.hook.core.finder.tools.ReflectionTool.createException(ReflectionTool.kt:567)
at com.highcapable.yukihookapi.hook.core.finder.tools.ReflectionTool.findClassByName$yukihookapi(ReflectionTool.kt:112)
at com.highcapable.yukihookapi.hook.factory.ReflectionFactoryKt.toClass(ReflectionFactory.kt:124)
at com.highcapable.yukihookapi.hook.factory.ReflectionFactoryKt.toClass$default(ReflectionFactory.kt:124)
at com.highcapable.yukihookapi.hook.type.android.ComponentTypeFactoryKt.getActivityTaskManagerClass(ComponentTypeFactory.kt:150)
at com.highcapable.yukihookapi.hook.xposed.parasitic.AppParasitics.registerModuleAppActivities$yukihookapi(AppParasitics.kt:337)
at com.highcapable.yukihookapi.hook.factory.YukiHookFactoryKt.registerModuleAppActivities(YukiHookFactory.kt:158)
at com.highcapable.yukihookapi.hook.factory.YukiHookFactoryKt.registerModuleAppActivities$default(YukiHookFactory.kt:158)
at com.highcapable.yukihookapi.demo_module.hook.HookEntry$onHook$1$2$1$1.invoke(HookEntry.kt:221)
at com.highcapable.yukihookapi.demo_module.hook.HookEntry$onHook$1$2$1$1.invoke(HookEntry.kt:221)
at com.highcapable.yukihookapi.hook.xposed.parasitic.AppParasitics$registerToAppLifecycle$1$12.afterHookedMember(AppParasitics.kt:228)
at com.highcapable.yukihookapi.hook.xposed.bridge.factory.YukiHookHelper$compat$2.afterHookedMethod(YukiBridgeFactory.kt:163)
at pw.z.B.hmA.CaRcIvKkUJz.XposedBridge$AdditionalHookInfo.callback(Unknown Source:147)
at LSPHooker_.callApplicationOnCreate(Unknown Source:11)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6059)
at android.app.ActivityThread.-wrap2(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1814)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:192)
at android.app.ActivityThread.main(ActivityThread.java:6825)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:886)
2022-11-16 09:26:45.002 18485-18485 LSPosed-Bridge com...hcapable.yukihookapi.demo_app E java.lang.NoClassDefFoundError: Can't find this Class in [LspModuleClassLoader[module=/data/app/com.highcapable.yukihookapi.demo_module-z08F1xLhtnMJnJfK5LJo3A==/base.apk, nativeLibraryDirs=/data/app/com.highcapable.yukihookapi.demo_module-z08F1xLhtnMJnJfK5LJo3A==/base.apk!/lib/arm64-v8a, /system/lib64, /vendor/lib64, P[DexPathList[[dex file "InMemoryDexFile[cookie=[0, 501158811808]]", dex file "InMemoryDexFile[cookie=[0, 501158812448]]", dex file "InMemoryDexFile[cookie=[0, 501158812768]]", dex file "InMemoryDexFile[cookie=[0, 501158812928]]", dex file "InMemoryDexFile[cookie=[0, 501158813088]]", dex file "InMemoryDexFile[cookie=[0, 501158813248]]", dex file "InMemoryDexFile[cookie=[0, 501158813408]]", dex file "InMemoryDexFile[cookie=[0, 501158813728]]", dex file "InMemoryDexFile[cookie=[0, 501158814048]]", dex file "InMemoryDexFile[cookie=[0, 501158814208]]", dex file "InMemoryDexFile[cookie=[0, 501158814368]]", dex file "InMemoryDexFile[cookie=[0, 501158814528]]", dex file "InMemoryDexFile[cookie=[0, 501158814688]]", dex file "InMemoryDexFile[cookie=[0, 501158814848]]", dex file "InMemoryDexFile[cookie=[0, 501158815008]]", dex file "InMemoryDexFile[cookie=[0, 501158815168]]", dex file "InMemoryDexFile[cookie=[0, 501158815328]]", dex file "InMemoryDexFile[cookie=[0, 501158815488]]", dex file "InMemoryDexFile[cookie=[0, 501158815648]]", dex file "InMemoryDexFile[cookie=[0, 501158815808]]", dex file "InMemoryDexFile[cookie=[0, 501158815968]]", dex file "InMemoryDexFile[cookie=[0, 501158816128]]"],nativeLibraryDirectories=[/system/lib64, /vendor/lib64]]]]]:
-> name:[android.app.ActivityTaskManager]
Generated by YukiHookAPI#ReflectionTool
at com.highcapable.yukihookapi.hook.core.finder.tools.ReflectionTool.createException(ReflectionTool.kt:567)
at com.highcapable.yukihookapi.hook.core.finder.tools.ReflectionTool.findClassByName$yukihookapi(ReflectionTool.kt:112)
at com.highcapable.yukihookapi.hook.factory.ReflectionFactoryKt.toClass(ReflectionFactory.kt:124)
at com.highcapable.yukihookapi.hook.factory.ReflectionFactoryKt.toClass$default(ReflectionFactory.kt:124)
at com.highcapable.yukihookapi.hook.type.android.ComponentTypeFactoryKt.getActivityTaskManagerClass(ComponentTypeFactory.kt:150)
at com.highcapable.yukihookapi.hook.xposed.parasitic.AppParasitics.registerModuleAppActivities$yukihookapi(AppParasitics.kt:337)
at com.highcapable.yukihookapi.hook.factory.YukiHookFactoryKt.registerModuleAppActivities(YukiHookFactory.kt:158)
at com.highcapable.yukihookapi.hook.factory.YukiHookFactoryKt.registerModuleAppActivities$default(YukiHookFactory.kt:158)
at com.highcapable.yukihookapi.demo_module.hook.HookEntry$onHook$1$2$1$1.invoke(HookEntry.kt:221)
at com.highcapable.yukihookapi.demo_module.hook.HookEntry$onHook$1$2$1$1.invoke(HookEntry.kt:221)
at com.highcapable.yukihookapi.hook.xposed.parasitic.AppParasitics$registerToAppLifecycle$1$12.afterHookedMember(AppParasitics.kt:228)
at com.highcapable.yukihookapi.hook.xposed.bridge.factory.YukiHookHelper$compat$2.afterHookedMethod(YukiBridgeFactory.kt:163)
at pw.z.B.hmA.CaRcIvKkUJz.XposedBridge$AdditionalHookInfo.callback(Unknown Source:147)
at LSPHooker_.callApplicationOnCreate(Unknown Source:11)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6059)
at android.app.ActivityThread.-wrap2(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1814)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:192)
at android.app.ActivityThread.main(ActivityThread.java:6825)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:886)
2022-11-16 09:26:45.042 18485-18485 ResourceType com...hcapable.yukihookapi.demo_app E Style contains key with bad entry: 0x0101062d
2022-11-16 09:26:45.151 742-885 libnav mm-pp-dpps E CablComputeBacklightLevel(): UpdateType = DifferentSceneUpdate
2022-11-16 09:26:45.173 18485-18485 ResourceType com...hcapable.yukihookapi.demo_app E Style contains key with bad entry: 0x0101062d
2022-11-16 09:26:45.258 18485-18485 ResourceType com...hcapable.yukihookapi.demo_app E Style contains key with bad entry: 0x0101062d
2022-11-16 09:26:45.483 1413-8617 WindowManager system_server E App trying to use insecure INPUT_FEATURE_NO_INPUT_CHANNEL flag. Ignoring
2022-11-16 09:26:45.517 1413-6265 WindowManager system_server E App trying to use insecure INPUT_FEATURE_NO_INPUT_CHANNEL flag. Ignoring
2022-11-16 09:26:45.679 1413-1560 ANDR-PERF-JNI system_server E Iop tryGetService failed
2022-11-16 09:26:46.052 742-885 libnav mm-pp-dpps E CablComputeBacklightLevel(): UpdateType = DifferentSceneUpdate
2022-11-16 09:26:47.485 1413-1892 TaskPersister system_server E File error accessing recents directory (directory doesn't exist?).
from yukihookapi.
注解好像是
@InjectYukiHookWithXposed(isUsingResourcesHook = false)
加入后确实只log一次
from yukihookapi.
直接跑项目的 demo 就会这样吗?
方便提供一下测试设备:
手机型号
运行的系统
Android 版本
from yukihookapi.
我已经看到了,Android 8.1 的这个报错问题我已经修复了,但是没有同步上来,目前在 Android 10 及以上系统是正常的,你可以换一个高版本的系统或者等我后期发布新版本后统一修复,目前是可以用的,可以忽略这个错误。
from yukihookapi.
ok
from yukihookapi.
Related Issues (20)
- Hook美团众包没效果 HOT 7
- [BUG] 无法保存键值 HOT 2
- 添加在 Hook 资源时获取宿主原始资源的扩展功能 HOT 10
- [无法复现] before 和 after 替换 result 无效的问题 HOT 4
- [important-less-bug] Sending non-protected broadcast HOT 7
- Debug环境下的log是否考虑优化一下,并且可以提供一个Hook环境判断吗? HOT 4
- YukiHookPrefsBridge missing Context instance HOT 3
- [BUG] YukiHookDataChannel. Supporting Android 14 HOT 3
- 是否会支持增加Modern Xposed API HOT 1
- hello
- [BUG] HookParam call timing problem HOT 20
- New Hook Entry Class
- New Xposed Module Config Plan
- Need help, prefs doesn`t work HOT 10
- YukiHookPrefsBridge read value not working in the release mode HOT 4
- [BUG] 仅在Android 9 版本 registerModuleAppActivities 错误 HOT 9
- https://jihulab.com/xihan123/QDReadHook.git HOT 3
- Migrating to 1.2.0 HOT 1
- 增加模块的Context 获取 和 模块classload 合并入宿主 HOT 1
- cannot be cast to 类型转换异常 HOT 1
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 yukihookapi.