crmulliner / ddi

ddi - Dynamic Dalvik Instrumentation Toolkit
http://www.mulliner.org/android/
393 stars 159 forks source link

Debugging libdvm.so crashes and Own Apps #7

Open mkaplanACS opened 9 years ago

mkaplanACS commented 9 years ago

Great tool. I am experiencing crashing issues that don't appear to be directly related to my interception code. After running apps for some time, I eventually get a crash (in libdvm.so), look at the tombstone file, and then may or may not see my interception library. If my library is involved, it is often not the last call in the stack trace, but a few calls back (mapping to some JNI routine I call). I do not see anything obvious in the logs. Final crash is in libdvm.so or libc, any ideas on how to debug?

Also I do not seem able to hijack my own Apps. I am writing apps with ADT 23.0.2.1259578. The app seems to crash immediately when I attempt to inject it. Anyone else experiencing this?

odexcide commented 9 years ago

You could be getting an OutOfMemory if you are not releasing resources in the JNI code. Paste the debuggerd crash dump to give us a better idea what is happening. Make sure you logcat -c to clear the log first before running hijack.