@echo off REM The REAL issue: Genymotion emulator doesn't route through proxy settings easily REM Solution: Use adb port forwarding + force app traffic through mitmproxy via Frida echo. echo ==================================================== echo INVESTIGATING MITMPROXY TRAFFIC ISSUE echo ==================================================== echo. cd /d "%~dp0" echo [*] Checking if mitmproxy is listening... netstat -ano | findstr ":8080" >nul if %errorlevel% equ 0 ( echo [✓] mitmproxy is listening on port 8080 ) else ( echo [!] mitmproxy NOT listening on port 8080 exit /b 1 ) echo. echo [*] Checking emulator proxy settings... for /f "tokens=*" %%A in ('adb shell settings get global http_proxy') do set PROXY=%%A echo [*] Current proxy setting: %PROXY% if "%PROXY%"==":0" ( echo [!] Proxy setting is empty or default (:0) echo [!] This is the problem - emulator isn't routing through proxy ) echo. echo [*] Checking if app is running... adb shell pidof com.canadapost.android >nul 2>&1 if %errorlevel% equ 0 ( echo [✓] Canada Post app is running ) else ( echo [!] Canada Post app is NOT running echo [!] You need to launch it first with LAUNCH_APP_WITH_FRIDA.bat ) echo. echo [*] Checking Firefox certificate on emulator... adb shell ls /data/misc/user/0/cacerts-added/ 2>nul | find "." >nul if %errorlevel% equ 0 ( echo [✓] Certificate found in emulator ) else ( echo [!] No certificates found ) echo. echo ==================================================== echo SOLUTION: Use Frida to force traffic through proxy echo ==================================================== echo. echo The real issue: Standard proxy settings don't work in Genymotion echo Solution: Use Frida to intercept and modify HTTP calls directly echo. echo Next steps: echo 1. Make sure mitmproxy is running: mitmproxy -p 8080 -w canadapost_traffic.mitm echo 2. Launch app with Frida: frida -U -f com.canadapost.android -l frida_simple_bypass.js echo 3. The Frida hook will force all traffic through mitmproxy echo. pause