Set Up a Persistent Android System‑Wide Proxy via ADB – No Root Required

13 min read Learn a step‑by‑step method to configure a permanent HTTP/HTTPS proxy on Android devices using ADB without rooting, with verification and troubleshooting tips. October 02, 2026 07:00 How to Set Up a Persistent System‑Wide Proxy on Android Using ADB (No Root)

Many developers, testers, and privacy‑conscious users need every network request from an Android phone to pass through a proxy server – for debugging API traffic, applying corporate filters, or routing through a VPN‑like tunnel. Android’s UI only offers per‑Wi‑Fi‑network proxy configuration, which disappears when you switch networks or reboot. This tutorial shows how to create a truly system‑wide proxy that survives reboots, using only ADB commands – no rooting, no third‑party apps.

Before You Start

  • ADB installed on your computer (part of Android Platform‑Tools). If you haven’t set it up, follow any "Enable ADB" guide first.
  • USB debugging enabled on the phone (Settings > About phone > Tap Build number 7 times, then Settings > System > Developer options > USB debugging).
  • The device is charged to at least 50 % and connected via USB or Wi‑Fi ADB.
  • A working HTTP/HTTPS proxy (e.g., 192.168.1.100:8888) that you can reach from the phone’s network.

If you plan to use the proxy for mobile data as well, make sure the proxy server is reachable over cellular (public IP or port‑forwarded).

Understanding Android’s Proxy Storage

Android stores the global proxy in the global_http_proxy setting under the global namespace. The value is a string in the form host:port. When you set it via ADB, the system applies the proxy to all network interfaces, but the UI does not expose this flag, which is why many users think “Android has no system‑wide proxy”. The setting persists in /data/property/persist.sys.global_http_proxy (on most devices) and is reapplied at boot by the system server.

Step‑by‑Step: Configure a Persistent Proxy

  1. Verify ADB connection.

    Open a terminal on your computer and run:

    adb devices

    You should see your device listed as device. If it shows unauthorized, check the phone for the RSA prompt and allow it.

  2. Check the current proxy state.

    Run the following command to see whether a global proxy is already set:

    adb shell settings get global http_proxy

    If the output is null or '', no proxy is active.

  3. Set the proxy.

    Replace PROXY_HOST and PROXY_PORT with your server’s address.

    adb shell settings put global http_proxy PROXY_HOST:PROXY_PORT

    Example:

    adb shell settings put global http_proxy 192.168.1.100:8888

    This command writes the value to the global settings database and updates the in‑memory configuration immediately.

  4. Make the setting survive a reboot.

    On most stock Android builds the value written in step 3 is already persisted, but some OEM skins (e.g., Samsung One UI) clear it on boot. To guarantee persistence, also write the property directly:

    adb shell setprop persist.sys.global_http_proxy PROXY_HOST:PROXY_PORT

    Then, to ensure the system server picks up the change, restart the runtime:

    adb shell stop && adb shell start

    Alternatively, you can simply reboot the device; the proxy should remain active after the reboot.

  5. Verify that traffic is routed through the proxy.

    Open a browser on the phone and visit a site that shows your IP address (e.g., https://ifconfig.me). The displayed IP should be that of your proxy server.

    For a more technical check, you can capture traffic with adb logcat or use a proxy‑aware app like httping in Termux.

  6. Optional: Apply the proxy only to Wi‑Fi networks.

    If you want the proxy to affect Wi‑Fi but not mobile data, you can combine the global setting with the per‑network setting. First, clear the global proxy:

    adb shell settings delete global http_proxy

    Then, for each Wi‑Fi network, use the UI (Settings > Network & Internet > Wi‑Fi > Network name > Advanced > Proxy) or the ADB command:

    adb shell settings put global wifi_proxy PROXY_HOST:PROXY_PORT

    Note that the wifi_proxy key is not documented and may not work on all OEMs; the UI method is more reliable.

  7. Remove the proxy when you’re done.

    To revert to the default (no proxy), run:

    adb shell settings delete global http_proxy
    adb shell setprop persist.sys.global_http_proxy ""
    adb shell stop && adb shell start

    After the restart, verify that adb shell settings get global http_proxy returns null.

Why This Works (and When It Doesn’t)

The settings put global command writes directly to the SettingsProvider, which is the authoritative source for system properties. Android reads the http_proxy value at network stack initialization, so a reboot or a manual stop/start forces the runtime to reload the proxy.

However, some manufacturers ship a custom NetworkManagementService that resets the global proxy during their own boot scripts. In those cases, the setprop persist.sys.global_http_proxy line is essential because the property is read later in the boot sequence, after the OEM’s scripts.

Common Pitfalls and Troubleshooting

  • Proxy not applied after reboot. On devices with aggressive battery‑saving frameworks (e.g., Huawei, Xiaomi), the system may clear persist.sys.global_http_proxy. Re‑apply the property and add it to the init.rc overlay via adb root (requires unlocked bootloader) or use a startup script in Termux:Boot as a workaround.
  • Only Wi‑Fi traffic is proxied. Android treats mobile data separately. If you see cellular traffic bypassing the proxy, confirm that the proxy server is reachable over the cellular network and that no VPN or carrier‑level NAT is interfering.
  • Apps that ignore the system proxy. Some apps (e.g., Chrome, certain VPN clients) use their own network stack and ignore the global setting. For those, you must enable the proxy inside the app’s settings or use a VPN‑based solution.
  • Authentication required. The built‑in proxy setting does not support username/password. If your proxy requires auth, you’ll need to embed credentials in the URL (user:pass@host:port) – however, many Android components strip the credentials for security. In such cases, a local proxy (e.g., proxifier) that adds auth headers is recommended.

Advanced: Automating Proxy Switches with ADB Scripts

If you frequently toggle between a corporate proxy and a direct connection, a small batch or shell script can save time. Below is an example for Linux/macOS:

# set-proxy.sh
#!/bin/bash
DEVICE="$(adb get-serialno)"
if [ "$1" == "on" ]; then
  HOST="192.168.1.100"
  PORT="8888"
  adb -s "$DEVICE" shell settings put global http_proxy "$HOST:$PORT"
  adb -s "$DEVICE" shell setprop persist.sys.global_http_proxy "$HOST:$PORT"
  echo "Proxy enabled: $HOST:$PORT"
else
  adb -s "$DEVICE" shell settings delete global http_proxy
  adb -s "$DEVICE" shell setprop persist.sys.global_http_proxy ""
  echo "Proxy disabled"
fi
adb -s "$DEVICE" shell stop && adb -s "$DEVICE" shell start

Run ./set-proxy.sh on to enable and ./set-proxy.sh off to disable. Adjust the HOST and PORT variables for your environment.

Security and Privacy Considerations

  • All traffic, including DNS queries, will be sent to the proxy. Ensure the proxy is trustworthy; otherwise you expose browsing habits and credentials.
  • When using an HTTP proxy (not HTTPS), data is unencrypted between the phone and the proxy. For sensitive work, prefer an HTTPS or SOCKS5 proxy that offers encryption.
  • Some apps may leak data via direct sockets that bypass the proxy. Test critical apps individually if privacy is a hard requirement.

When to Use a System‑Wide Proxy vs. Per‑Network Proxy

The built‑in per‑Wi‑Fi proxy (Settings > Wi‑Fi > Network > Proxy) is sufficient for casual debugging on a single network. The ADB method shines when you need:

  • Consistent proxying across multiple Wi‑Fi networks and mobile data.
  • Automation via scripts or CI pipelines that push a proxy to many devices.
  • Testing of apps that ignore the UI proxy but respect the global setting.

Wrapping Up

By following the steps above you now have a reliable, persistent system‑wide proxy on your Android device without rooting. The method works on most stock Android versions from 6.0 (Marshmallow) onward, and with minor adjustments on heavily customized OEM skins. Remember to verify the proxy after each reboot, keep your proxy server secure, and be aware of apps that may bypass the setting. With this knowledge you can debug network traffic, enforce corporate policies, or simply route your phone’s traffic through a privacy‑enhancing proxy whenever you need it.

User Comments (0)

Add Comment
We'll never share your email with anyone else.