jnitrace-engine icon indicating copy to clipboard operation
jnitrace-engine copied to clipboard

Interceptor.replace for dlopen bug

Open SeeFlowerX opened this issue 3 years ago • 5 comments

  • https://github.com/chame1eon/jnitrace-engine/blob/9e8735110999a315c121fc9a560893ae521c02d9/lib/engine.ts#L147

replace for dlopen will cause some bug like "Waiting for a blocking GC ProfileSaver"

modifiy to attach implementation can solve this problem, but I am not sure will it cause other bug...

patch code

video proof

SeeFlowerX avatar Dec 05 '21 03:12 SeeFlowerX

"Waiting for a blocking GC ProfileSaver" cause 100% CPU usage, then APP crash

image

SeeFlowerX avatar Dec 05 '21 03:12 SeeFlowerX

Hi,

Thanks very much for showing me this issue. I wasn't aware using the Interceptor.replace was causing issues with "GC ProfileSaver". The reason I used Interceptor.replace instead of Interceptorattach is due to issues on Android > 7 hooking dlopen (from this issue on Frida) but that may be fixed now.

Have you tested your change on a device newer than Android 7? If the change works on those newer devices I am very happy to incorporate the changes.

Thanks

chame1eon avatar Dec 06 '21 20:12 chame1eon

I test on Pixel 4 Android 11.

not sure whether this problem has been solved, I suggest add a option to set by user for better compatibility.

  • https://github.com/frida/frida/issues/394
  • https://github.com/frida/frida/issues/448

SeeFlowerX avatar Dec 09 '21 15:12 SeeFlowerX

Hi,

Sorry for taking so long to get back to you on this. Can I check why you closed the issue? I was going to say your suggestion sounded like a good one so I was going to look to implement it. Before I do that I want to make sure you are still having the same problems.

Thanks

chame1eon avatar Jan 04 '22 19:01 chame1eon

I have faced the same problem. Buf when I modifiy to attach implementation . That solve this problem.

frida 16.0.11 Redmi K30 Android10 jnitrace 3.3.0

https://github.com/chame1eon/jnitrace/issues/34

haikejishu avatar Mar 26 '23 12:03 haikejishu