chame1eon / jnitrace

A Frida based tool that traces usage of the JNI API in Android apps.
MIT License
1.62k stars 260 forks source link

not working on x86 emulator with arm support #6

Closed qtfreet00 closed 5 years ago

qtfreet00 commented 5 years ago

I'm tested jnitrace on mumu emulator which support arm libraries

jnitrace don't print anything

tested library is arm

chame1eon commented 5 years ago

Thanks for the bug report. I think the issue is that Frida does not interception where ARM to x86 translation is taking place. jnitrace just uses Frida behind the scenes so if Frida is not working jnitrace will not work. Can you try seeing if Frida can hook some of the functions in that library?

qtfreet00 commented 5 years ago

yes,my other frida scripts works correctly on this emulator,and i tried jnitrace on my real phone,works well too , i think maybe jnitrace choose arch wrong on emulator run with arm library

chame1eon commented 5 years ago

Okay, thanks for trying that. I will try to reproduce the issue to see if I can get to the bottom of it. Any chance you can send me a link to the APK you were using for testing?

chame1eon commented 5 years ago

I have tested my own test application on MUMU emulator and jnitrace works fine if the application has x86 supported libraries. If it only has arm, like you say, it will not run. This is a common problem with native Frida on the x86 project emulators which MUMU emulator uses. Those emulators use the libhoudini library to dynamically translate ARM code into x86 instructions and that causes problems when trying to hook them with Frida. I am closing this issue now as it is not really a jnitrace issue, more a Frida/libhoudini issue. Thanks for your bug report.