Fix ERR_PROXY_CONNECTION_FAILED due to a change in global proxy by mobile security framework through adb shell on non rooted phone The problem in a non rooted Samsung Galaxy S7 smartphone:


ERR_PROXY_CONNECTION_FAILED in Google Chrome
No internet access on cellphone wireless settings
No internet access on cellphone mobile data setting
only working Whatsapp or Google Duo
The cause


I was working with Mobily Security Framework (https://github.com/MobSF/Mobile-Security-Framework-MobSF). It is a set of tools to analyse mobile apps.
In the option of dynamic analysis, my cellphone was connected to the PC through USB. The tool works with genymotion emulators (https://www.genymotion.com/fun-zone/) but if the device is connected, MobSF starts to setup a testing environment in the smartphone.


[INFO] Creating Dynamic Analysis Environment
[ERROR] Error Running ADB Command
[INFO] Android Version identified as 8.0
[INFO] Environment MobSFyed Check
[WARNING] This Android instance is not MobSfyed.
MobSFying the android runtime environment
[INFO] Android Version identified as 8.0
[ERROR] Make sure a Genymotion Android x86instance is running
[INFO] Installing MobSF RootCA
[ERROR] Error Running ADB Command
[INFO] Installing MobSF Clipboard Dumper
[ERROR] Error Running ADB Command
[INFO] MobSFying Completed!
[INFO] Starting HTTPs Proxy on 1337
[INFO] Enabling ADB Reverse TCP on 1337
[INFO] Setting Global Proxy for Android VM
[INFO] Starting Clipboard Monitor
[INFO] Getting screen resolution
[INFO] Testing Environment is Ready!



As non rooted device, MobSF fails ([ERROR] Error Running ADB Command) but it succedded in changing the global proxy setting ([INFO] Setting Global Proxy for Android VM)


The solution


It is explained in How to set Wi-Fi HTTPS proxy, not HTTP, via adb shell? The command is running in adb shell:


adb shell settings put global http_proxy :0



In spite of the wifi configuration or mobile data configuration (through APN) is set to proxy none, this global configuration is onlye change through adb shell