IDA restores JNI Function Method Name, idajni Function
In android debugging, you will often see this type of function:
First, add a number to a pointer, such as v3 + 676. Then, the address is used as a method pointer to call the method, and the first parameter is the pointer itself, for example (v3 + 676) (v3 ...). This is actually the JNIEnv method that we often use in JNI. Ida does not automatically identify these methods, so when we debug the so file, we often see but cannot figure out what the function is doing, this function is too abstract. The solution is very simple. You only need to perform a type conversion on the JNIEnv pointer. For example, if the v3 pointer is mentioned above, press the "y" key and declare the type as "JNIEnv *".
Then IDA will automatically find the corresponding method and display it:
Is it much clearer in an instant? In addition, some people (seemingly on the snow Forum) also summarized the numbers, addresses, and method declarations corresponding to all JNIEnv methods: