LSPosed / LSPlant

A hook framework for Android Runtime (ART)
https://lsposed.org/LSPlant/
GNU Lesser General Public License v3.0
890 stars 220 forks source link

release打包下模式打包软件白屏 #40

Closed SharkFall closed 1 year ago

SharkFall commented 1 year ago

以下是在miui运行的堆栈: W/MIUIScout App: Event:APP_SCOUT_WARNING Thread:main backtrace: at dalvik.system.DexFile.openInMemoryDexFilesNative(Native Method) at dalvik.system.DexFile.openInMemoryDexFiles(DexFile.java:393) at dalvik.system.DexFile.(DexFile.java:121) at dalvik.system.DexPathList.initByteBufferDexPath(DexPathList.java:264) at dalvik.system.BaseDexClassLoader.(BaseDexClassLoader.java:197) at dalvik.system.InMemoryDexClassLoader.(InMemoryDexClassLoader.java:40) at dalvik.system.InMemoryDexClassLoader.(InMemoryDexClassLoader.java:52) at dalvik.system.InMemoryDexClassLoader.(InMemoryDexClassLoader.java:63) at myApp.attachBaseContext(Native Method)#在attachBaseContext调用hook java方法(不进行hook同样会白屏) at android.app.Application.attach(Application.java:333) at android.app.Instrumentation.newApplication(Instrumentation.java:1178) at android.app.LoadedApk.makeApplication(LoadedApk.java:1369) at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7033)

hook方式: image 在debug打包模式下正常hook并且打开软件

cmake配置: 不编译lsplant动态库,仅编译lsplant静态库,并将lsplant与dobby的静态库均链接至我的so

在原生android也进行了测试,同样白屏,但软件并未崩溃退出 miui13 android12,google pixel原生android10

vvb2060 commented 1 year ago

没日志