.
Setup
0. Prerequisites
- Download the Requestly Desktop app, if you haven’t already.
- Start your Android App on the emulator.
1. Setup Proxy & Certificates
Works only with Requestly Desktop App
>v1.7.0
- Click
Connect Apps
- Go to
Mobile Apps & Browsers
tab.
- Click on
Connect
button of emulator you want to connect to.
Not seeing your emulator? Follow these steps.
2. [if-required] SSL Pinning
Only required on Android API level >= 23 (Android 7+).
Make sure to remove these in production builds
Add these configs to your app codebase for it to work
- Add res/xml/network_security_config.xml
<network-security-config>
<debug-overrides>
<trust-anchors>
<certificates src="user" />
<certificates src="system" />
</trust-anchors>
</debug-overrides>
<base-config cleartextTrafficPermitted="true">
<trust-anchors>
<certificates src="system" />
<certificates src="user" />
</trust-anchors>
</base-config>
</network-security-config>
- Add to AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest ... >
<application android:networkSecurityConfig="@xml/network_security_config" ... >
...
</application>
</manifest>
3. Deactivate Proxy (After done debugging)
Please make sure to revert the proxy after you are done testing using Requestly
adb shell settings put global http_proxy :0
Troubleshooting
Emulator not detected?
-
Check if your emulator is running?
-
Check if
adb
is installed. If not, install it from here -
Try Restarting your emulator.
How does it work?
Here's the code that makes this happen in a single click
-
Searches for online ADB devices
-
On
Connect
-
Root the device (To install Requestly CA)
-
Inject Requestly CA (if not already)
-
Setup Proxy on Emulator
-
Restart the Emulator (Only first time)
-
-
On
Disconnect
- Removes the Proxy