Debugging an Android App
Physical device
- Same Wi-Fi network as your Mac.
- Click Connect Device (QR icon) in the TonyProxy toolbar, scan it with the Android camera or a QR scanner app.
- Install the certificate: Settings → Security → Encryption & credentials → Install a certificate → CA certificate, then select the downloaded file.
- Set the Wi-Fi proxy: Settings → Wi-Fi → long-press your network → Modify → Advanced → Proxy: Manual → enter your Mac’s LAN IP and port (9090 by default).
Android’s user-CA restriction (API 24+)
Since Android 7 (API 24), apps targeting API 24+ don’t trust user-installed CAs by default — only system CAs. A CA installed via the steps above is a user CA, so most modern apps will still reject it unless the app explicitly opts in via its network security config (<certificates src="user"/>), which you don’t control for apps you didn’t build.
- For an app you’re building yourself: add a debug-only network security config trusting user CAs, scoped to debug builds only.
- For a third-party app: this restriction generally can’t be worked around without root (pushing the CA into the system trust store) — see your emulator/device’s rooting options if this is a hard blocker.
Emulator
Android Studio emulators generally pick up your Mac’s proxy automatically via host networking. Install the CA the same way as a physical device — open the cert install URL in the emulator’s browser, or push the cert file and install via Settings.
Certificate pinning
Same caveat as iOS and Flutter — an app pinning certs won’t decrypt through TonyProxy regardless of CA trust. See HTTPS Decryption Issues.