When you develop or troubleshoot an Android app, the most common real‑world complaint is that the app feels sluggish on a 3G or edge connection. Testing only on a fast Wi‑Fi network hides latency‑related bugs, oversized payloads, and UI freezes caused by long‑running network calls. By deliberately throttling the device’s network, you can observe how your code behaves under the exact conditions your users experience, and you can adjust caching, retry logic, and UI feedback accordingly.
adb available). No Android Studio is required.7 times. You’ll see a toast message: “You are now a developer!”.The exact wording varies by Android version, but the option lives inside Developer options.
Full speed, 4G, 3G, 2G, LTE, and sometimes Edge or GPRS.Select the speed you want to emulate. The system immediately limits both upload and download throughput to the chosen value, and also injects a modest amount of latency that matches typical real‑world measurements for that technology.
Full speed when you finish testing.After you pick a speed, you should confirm that the limits are in effect. The simplest way is to run a speed‑test app that reports both bandwidth and latency.
3G should give you roughly 1–2 Mbps down and 500 kbps up, with latency around 150‑200 ms.If the numbers are still close to your original Wi‑Fi speed, double‑check that you selected the correct entry and that the device didn’t automatically switch to a faster network (some phones prioritize cellular over Wi‑Fi when throttling is active).
While the UI method is handy for quick checks, you often need to switch speeds repeatedly during an automated test run. ADB provides a command‑line interface that can change the setting without touching the screen.
First, confirm that your device is visible to ADB:
adb devices
You should see a line with the device serial number and the word device. If not, enable USB debugging inside Developer options (toggle the switch at the top) and accept the RSA key prompt on the phone.
Once the connection is verified, use the following command to set the speed. The setting is stored in the global namespace under the key network_speed (the exact key name differs by Android version; the command below works on Android 9‑13).
adb shell settings put global network_speed <value>
Replace <value> with one of the following integers:
0 – Full speed (no throttling)1 – 4G (≈20 Mbps down, 10 Mbps up)2 – 3G (≈2 Mbps down, 1 Mbps up)3 – 2G (≈250 kbps down, 100 kbps up)4 – Edge (≈100 kbps down, 50 kbps up)Example: to simulate a 3G connection, run:
adb shell settings put global network_speed 2
To revert to normal speed:
adb shell settings put global network_speed 0
After issuing the command, you can immediately run your speed‑test app again to verify the change.
network_speed key may be hidden behind a permission called WRITE_SECURE_SETTINGS. If the command fails with “Security exception”, you can grant the temporary permission using adb shell pm grant com.android.settings android.permission.WRITE_SECURE_SETTINGS, but this requires the device to be rooted or to be running a userdebug build. In most production devices, stick to the UI method.The built‑in speed presets bundle both bandwidth limits and a modest latency value. If you need to test extreme latency (e.g., satellite connections with 600 ms RTT), you can combine the speed throttling with a Linux netem rule. Android does not expose tc (traffic control) by default, but you can install a tiny helper binary via adb push if you have a rooted device or a userdebug build.
tc binary compiled for ARM64 (or ARMv7) and place it on your computer./data/local/tmp on the device:
adb push tc /data/local/tmp/
adb shell chmod 755 /data/local/tmp/tc
wlan0 for Wi‑Fi):
adb shell "su -c '/data/local/tmp/tc qdisc add dev wlan0 root netem delay 600ms'"
adb shell "su -c '/data/local/tmp/tc qdisc del dev wlan0 root netem'"
This approach lets you set any delay, jitter, or packet‑loss pattern you need. Because it requires root, it’s best suited for internal QA devices rather than a consumer phone.
tc can break the network stack until the device is rebooted. Always test the command on a non‑critical device first, and keep a terminal open so you can quickly revert the rule.If you run UI‑automation tests (e.g., with adb shell am instrument or Appium), you can embed the ADB speed‑change commands directly in your script.
# Example Bash snippet
#!/bin/bash
# Set to 3G
adb shell settings put global network_speed 2
# Run your test suite
./run‑ui‑tests.sh
# Restore full speed
adb shell settings put global network_speed 0
Place the snippet at the beginning of each test case that needs a specific network condition. The script will automatically restore the normal speed afterward, ensuring later tests are not unintentionally throttled.
adb shell settings put global development_settings_enabled 1
Then reopen Settings. If the entry still does not appear, the device’s firmware simply does not support the feature.network_speed key is protected. Use the UI method or a rooted device.tc method described earlier.When you finish testing, it’s good practice to clear any lingering settings:
Full speed.adb shell settings delete global network_speed
tc rule, run the delete command shown in Step 6.The device will now behave exactly as it did before you started the simulation.
With the steps above you can:
All of these checks lead to a smoother user experience for people on slower carriers, in remote areas, or on congested public Wi‑Fi.
Simulating a slow network on a real Android device is straightforward once you enable Developer options. The built‑in speed presets cover the most common cellular classes, and ADB lets you script rapid switches for automated test pipelines. For extreme latency or packet‑loss scenarios, a rooted device with tc netem provides full control.
By following this guide you’ll be able to reproduce the exact connectivity constraints your users face, catch performance bugs early, and ship an app that feels responsive even on the weakest link.









