打开linker日志
Enable logging of dlopen/dlsym and library loading errors for apps (Available in Android O)
Starting with Android O it is possible to enable logging of dynamic
linker activity for debuggable apps by setting a property corresponding
to the fully-qualified name of the specific app:
针对单个应用
adb shell setprop debug.ld.app.com.example.myapp dlerror,dlopen,dlsym
adb logcat
Any combination of dlerror
, dlopen
, and dlsym
can be used. There’s
no separate dlclose
option: dlopen
covers both loading and unloading
of libraries. Note also that dlerror
doesn’t correspond to actual
calls of dlerror(3) but to any time the dynamic linker writes to its
internal error buff