This is a sample app that demonstrates how to use the Proxyman to capture HTTP/HTTPS traffic on Android Emulators.
- Android Studio
- Proxyman
- Android Emulator
- Clone the repository
- Open the project in Android Studio
- Create a new Android Emulator. Make sure it's Google APIs version, not a Play Store Version.
- Start the app on the Android Emulator
- Open Proxyman -> Certificates Menu -> Install Certificate on Android -> Emulators…
- Click on the Override Button
- Relaunch your app and test it.
- Done
- Clone the repository
- Open the project in Android Studio
- Open Proxyman -> Certificates Menu -> Install Certificate on Android -> Physical Devices -> Follow the steps by steps instructions
- Verify complete the 5th steps
- Add res/xml/network_security_config.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<uses-permission android:name="android.permission.INTERNET" />
<application
android:allowBackup="true"
android:dataExtractionRules="@xml/data_extraction_rules"
android:fullBackupContent="@xml/backup_rules"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.Proxyman_Sample_OKHTTP_App"
tools:targetApi="31"
android:networkSecurityConfig="@xml/network_security_config">
<activity
android:name=".MainActivity"
android:exported="true"
android:label="@string/app_name"
android:theme="@style/Theme.Proxyman_Sample_OKHTTP_App">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
- Add to AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<uses-permission android:name="android.permission.INTERNET" />
<application
android:allowBackup="true"
android:dataExtractionRules="@xml/data_extraction_rules"
android:fullBackupContent="@xml/backup_rules"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.Proxyman_Sample_OKHTTP_App"
tools:targetApi="31"
android:networkSecurityConfig="@xml/network_security_config">
<activity
android:name=".MainActivity"
android:exported="true"
android:label="@string/app_name"
android:theme="@style/Theme.Proxyman_Sample_OKHTTP_App">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
- Start the app and test it on Proxyman
- Done