Android Frida: SSL Pinning Bypass and Runtime Hooking in 2026

Manish Garg
Manish Garg Associate of (ISC)² · RingSafe
Apr 25, 2026
4 min read

Last updated: May 18, 2026

Frida is the universal mobile-pentest swiss-army knife. SSL pinning bypass, root detection bypass, runtime function hooking, in-memory string extraction — Frida does all of it. This article covers the practitioner workflow for Android with Frida 16+ in 2026, the patterns that work against modern hardened apps, and the detection that mobile-banking apps (rightly) deploy against it.

The mental model

Frida injects a JavaScript engine into a target process and lets you execute JavaScript that interacts with the app’s native and managed (Java) code. From that JavaScript you can:

  • Hook any Java method (intercept calls, modify arguments, replace return values)
  • Hook native (C/C++) functions in shared libraries
  • Read and modify memory
  • Send messages back to your laptop in real time

For Android, you need a rooted device or emulator (Magisk + Frida-server) or a re-packaged APK with frida-gadget injected (no root required). The latter works for testing apps you legitimately have. Real-time hooking against production apps requires root.

SSL pinning bypass — the canonical first task

Most banking, fintech, and healthtech apps pin certificates to prevent MitM. Frida bypasses pinning by hooking the validation function. The frida-codeshare community maintains scripts; the most universal is frida-multiple-unpinning:

frida -U -f com.target.app -l multiple-unpinning.js

This loads the script at startup and hooks every known pinning library — OkHttp, Retrofit, TrustKit, custom X509TrustManager implementations, native pinning via OpenSSL.

For apps with custom pinning, manual hooking:

Java.perform(function() {
  var TrustManager = Java.registerClass({
    name: 'com.example.TrustAllManager',
    implements: [Java.use('javax.net.ssl.X509TrustManager')],
    methods: {
      checkClientTrusted: function(chain, authType) {},
      checkServerTrusted: function(chain, authType) {},
      getAcceptedIssuers: function() { return []; }
    }
  });
  // Replace SSLContext.init to use our trust manager
});

Root detection bypass

Apps detect root by checking /system/bin/su, /system/xbin/busybox, certain packages (com.topjohnwu.magisk), system properties (ro.debuggable, ro.secure), and SafetyNet/Play Integrity API responses.

The Frida script fridantiroot.js hooks all common detection paths. For SafetyNet bypass, modern apps require Play Integrity API which is harder to bypass on stock devices. Magisk modules (Universal SafetyNet Fix, Shamiko) handle this at the OS level for rooted devices.

Runtime function hooking — what’s possible

Beyond bypasses, Frida lets you understand what an app actually does:

  • Hook crypto functions — log every key, IV, and plaintext that flows through Cipher.doFinal(). Useful for understanding custom encryption.
  • Hook string deobfuscation — modern apps wrap strings in obfuscated unwrappers. Hook the unwrap function; log every output.
  • Hook network HMAC signing — understand the signature scheme used for API calls. Often the hardest part of API testing.
  • Hook authorization checks — if the app makes a local check before allowing a feature, replace return value with true.

Practical workflow

  1. Set up Android Studio emulator with Google APIs (not Play Store) image — easier to root.
  2. Root the emulator with rootAVD or magisk patched boot image.
  3. Install Frida server on emulator: adb push frida-server /data/local/tmp/ && adb shell "su -c '/data/local/tmp/frida-server &'"
  4. From laptop: frida-ps -U lists running processes. Find the target.
  5. Decompile target APK with jadx-gui to read source. Identify functions to hook.
  6. Write hooks; iterate.

For traffic interception, configure Burp as proxy on the emulator (Settings → Wi-Fi → Proxy). With pinning bypassed, all traffic flows through Burp.

Detection — what hardened apps do

Banking-grade apps in India (HDFC PayZapp, ICICI iMobile, etc.) implement layered Frida detection:

  • frida-gadget binary detection — scan loaded shared libraries for known Frida signatures.
  • Port scanning — Frida server listens on TCP 27042 by default. App scans localhost for it.
  • Process name detection — look for frida-server, frida-helper in /proc.
  • Memory scanning — search for Frida JS engine signatures.
  • Hooking detection — verify that critical functions have not been intercepted (cross-check return addresses, instruction integrity).
  • SafetyNet / Play Integrity — Google attestation that the device passes hardware integrity checks.

Bypassing all of these together is the modern mobile pentester’s challenge. Tools like Objection, magisk-frida, frida-objection, and obfuscated frida-server builds chip away at each layer.

Compliance angle

  • RBI mobile banking guidelines require runtime application self-protection (RASP); Frida detection is one component.
  • OWASP MASVS V8 — runtime resilience requirements for sensitive apps.
  • DPDP §8(5) — apps processing personal data should defend against tampering.

The takeaway

Frida is the entry point to serious mobile pentesting. Master the hooking workflow, then layer the bypasses for hardened targets. The defender’s job is layered RASP — no single Frida-detection mechanism is sufficient. Banking-grade resilience requires every layer above, validated by adversarial testing each release.


Related engagement → How we ran a mobile + API security review for a BFSI client

Need a real pentest?

Get a VAPT scoping call

Senior practitioner-led VAPT — not a checklist run by juniors. CVSS-scored findings, free retest, attestation letter. India's SMBs and SaaS teams.

Book VAPT scoping call Replies in 4 working hrs · India-only · Senior consultants