Frida is a dynamic code instrumentation toolkit. It lets you inject your script into black-box processes(No source code needed). It allows you to inject your own code and to programmatically and interactively inspect and change running processes.

Frida, on the other hand, allows you to interact with the Android APK so you can inject code to bypass many of the techniques developers use to secure the apps. Some examples include bypassing the login screen to authenticate without a password or disabling SSL pinning to allow the hacker to see all the network traffic between your app and any backend servers.

Many of the method calls you make in your Android app can be hijacked or overridden by Frida for purposes that were never intended. By injecting JavaScript code, Frida can disable or enable a switch or pass fake parameters to gain access to information that would not otherwise be available.

Hooking Theory

How to install

Download the Frida client.

pip install frida-tools

Then download the android server from this address:

https://github.com/frida/frida/releases

Note: Your Frida client version and server must be same.

Untitled

If you are in emulator the x86 version is fine.

Then extract the Frida server. One of directories which can run binaries is /data/local/tmp. So put the frida-server on this directory and add execute permission to it. Now run it.

To test the connection use this command:

frida-ps -U
# When using -U firda use adb connection to connect to it's server.

In case of -U didn’t work use device ID in adb:

C:\\Users\\Hossein>adb devices
List of devices attached
emulator-5554   device

frida-ps -D emulator-5554

How Frida Works