crmulliner / ddi

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

Application crash while hooking String.intern() #21

Open razaina opened 8 years ago

razaina commented 8 years ago

Hi Colin

i was trying to hook String.intern() but it made the application crash with a SEGV_MAPERR while doing (*env)->CallObjectMethod(...).

#define SEGV_MAPERR (__SI_FAULT|1) /* address not mapped to object */

The strmon example works properly so I do not understand what's going on.

Below is a screenshot of the crash log from logcat. I highlighted in green my lib that has been injected.

pbm

The offset 0x000017bc refers to the line 92.

pbm2

Do you have an idea of what could cause this?

razaina commented 8 years ago

This solution https://github.com/crmulliner/ddi/issues/8 solved the issue for now.