Closed H0r53 closed 7 months ago
Ah yes, this is a bug indeed. I need to fix it.
You should be using GenerateFridaSnippetForDex.py
from https://github.com/pnfsoftware/jeb-samplecode/blob/master/scripts/GenerateFridaSnippetForDex.py. However, there is a small error in that one too. Be sure to apply patch https://github.com/pnfsoftware/jeb-samplecode/pull/7
If I rename a function or class in JEB and use the jeb2frida script to generate a Frida hook, the alias I used when renaming the function/class is included in the jeb2frida output instead of the actual class/function name in the APK. Clearly, the Frida runtime will be unable to hook routines that I've renamed with JEB since the app runtime uses the native names. This also occurs with obfuscated code using unicode function/class names outside of the printable range of characters.
Example, JEB tells me a function is defined as this when I hover my cursor over it
However, JEB auto generated names for this class for me (otherwise the names where
[]
). When I use the jeb2frida script I received this:In this particular case, I think I needed
This is reproducible by simply renaming a function in JEB and using the jeb2frida script on that function. The produced code uses the new function name instead of the natural one (which is required for Frida to successfully hook it).
Can the jeb2frida script be updated to use the native names of functions/classes?