JNI
JNI Deobfuscation
Reversing the library
Ghidra / IDA Pro / radare2 and GL my friend!
Frida method
Using frida snippet like JADX and Frida.
Executing the functions from JNI in an Android app
Create a New Project on Android Studio
# Android Studio > New > New Project > Empty Views ActivityCopy all folders from resources/lib/* from the original to app/jniLibs/* in new project
Create a new Java class in AS "java" folder (including class name)
# App: io.hextree.weatherusa
# Class name: InternetUtil
io.hextree.weatherusa.InternetUtilCheck the logic of using the native library (this is the decompiler code)
package io.hextree.weatherusa;
[...]
public abstract class InternetUtil {
[...]
httpURLConnection2.setRequestProperty("X-API-KEY", getKey("jhnef6d~efu?tjfus3tobunaa3tbdrun"));
[...]
private static native String getKey(String str);
}And make it usable on our class (java/io.hextree.weatherusa/InternetUtil.java)
Finally, call to our new class from MainActivity (java/com.example.empty_for_pocs_java/MainActivity.java)
Set the homeText "id" in activity_main (res/layout/activity_main.xml)
References
Last updated
Was this helpful?