APK Analysis Frida

Lee Wei Xuan MVP +++

What is Frida?
Frida is a toolkit that enables dynamic interaction with running programs.

Installing Frida

1
pip install frida-tools

Then test the installation:

1
frida --version

Next, match your device’s architecture (use adb shell getprop ro.product.cpu.abi)

1
adb shell getprop ro.product.cpu.abi

Using Frida for APK Analysis

  1. Connect your Android device via USB and ensure USB debugging is enabled.
  2. Start the Frida server on your Android device:
    1
    2
    3
    adb shell
    su
    frida-server &
  3. List running processes to find your target app:
    1
    frida-ps -U
  4. Attach to the target app using its process ID or name:
    1
    frida -U -n <app_name>
  5. Inject scripts to manipulate or analyze the app:
    1
    frida -U -l your_script.js -n <app_name>
  6. Use Frida’s REPL to interactively explore the app:
    1
    2
        frida -U -n <app_name> -f <app_name> --no
    -pause
  7. Write custom scripts to hook functions, modify behavior, or extract data:
    1
    2
    3
    4
    5
    6
    7
    Java.perform(function() {
    var MainActivity = Java.use('com.example.app.MainActivity');
    MainActivity.someMethod.implementation = function() {
    console.log('someMethod called');
    return this.someMethod();
    };
    });
  • Title: APK Analysis Frida
  • Author: Lee Wei Xuan
  • Created at : 2025-06-04 17:47:05
  • Updated at : 2025-07-25 19:34:27
  • Link: https://weixuan0110.github.io/2025/06/04/APK-Analysis-Frida/
  • License: This work is licensed under CC BY-NC-SA 4.0.
On this page
APK Analysis Frida