Felix
Felix

Reputation: 6104

Simulate low bandwidth in android

Does anyone know a possibility to simulate a low bandwidth on Android phones (i.e. EDGE or G3) while connected to WiFi?

Is there a app for this?

It it possible to do something like this on android devices?

Thanks in advance for any tips.

Edit: I don't want to use the emulator. I need it to do reproducible performance measurements for my bachelor's thesis. Using UMTS is just not reproducible enough that's why I'm looking for something to simulate it.

Upvotes: 42

Views: 57164

Answers (12)

soggypants
soggypants

Reputation: 425

Two options:

  • In "Developer options" of your device set "Network download rate limit" under "Networking" category to desired speed.
  • Use "NetThrottle - Network Tool" app from Google Play Store or similar apps which create local VPN on the device and runs all traffic through that.

Upvotes: 1

since2006
since2006

Reputation: 226

you can limit bandwidth in Android emulator.

eg:

emulator -netspeed gsm

Speeds for reference in increasing kbps:

                            UP       DOWN
                      -------- ----------
    gsm   GSM/CSD         14.4       14.4
    hscsd HSCSD           14.4       57.6
    gprs  GPRS            28.8       57.6
    umts  UMTS/3G        384.0      384.0
    edge  EDGE/EGPRS     473.6      473.6
    hsdpa HSDPA         5760.0   13,980.0
    lte   LTE         58,000.0  173,000.0
    evdo  EVDO        75,000.0  280,000.0
    full  No limit           ∞          ∞

more:

https://developer.android.com/studio/run/emulator-console

Upvotes: 13

Nev
Nev

Reputation: 1568

Within the Android emulator, you can now throttle the network speed directly.

enter image description here Android Emulator Extended Controls

Press the 3 dots button, followed by 'Cellular' on the left. You can then select the network type and signal strength.

Speeds for reference in increasing kbps:

                        UP       DOWN
                  -------- ----------
gsm   GSM/CSD         14.4       14.4
hscsd HSCSD           14.4       57.6
gprs  GPRS            28.8       57.6
umts  UMTS/3G        384.0      384.0
edge  EDGE/EGPRS     473.6      473.6
hsdpa HSDPA         5760.0   13,980.0
lte   LTE         58,000.0  173,000.0
evdo  EVDO        75,000.0  280,000.0
full  No limit           ∞          ∞

Upvotes: 7

Varun Goyal
Varun Goyal

Reputation: 732

I know this is an old channel, but I was recently required to do this, most of the solutions listed seemed "quite complex" for a humble app developer like me, so I figured out a simple 3-step approach to do this.

  1. Root your phone, there are a lot of websites devoted to this kind of nonsense.

  2. Download BradyBound app. Rate this guy a 5 star for such an amazing job.

  3. While connected to the desired WiFi network, throttle your connection away!

Upvotes: 3

Steven de Salas
Steven de Salas

Reputation: 21467

You can also just change the preferred network type to 2G.

Its not as fine-grained as throttling your bandwidth via the PC but its a lot simpler to implement.

enter image description here

On Android 5 Lollipop go to:

  1. Settings
  2. More
  3. Cellular Networks
  4. Preferred network type

You'll notice the change to a slower GPRS network as an E icon on the top status bar of the screen.

Upvotes: 26

starkej2
starkej2

Reputation: 11509

If your developing on OS X, you can use Network Link Conditioner to slow down your internet connection, then turn on internet sharing and connect the Android phone to that network.

Upvotes: 5

ilyasd
ilyasd

Reputation: 269

If you have an iPhone with developer mode on, you can use the network conditioner under developer settings. Setup a wi-fi hotspot and connect your android device to the hotspot. Now you can simulate the different network speeds via link conditioner.

Upvotes: 3

DoDo
DoDo

Reputation: 2426

If you have rooted phone, you can use tc utility to limit bandwidth on wlan0 interface. I've written a little script that does that and described how to use it on my blog. I've tested it with CyanogenMod 10.3 and I'm really curious if it works on other rooted phones.

Upvotes: 1

Maxim Shoustin
Maxim Shoustin

Reputation: 77904

You can use followed 2 applications for your purposes:

  • Use Connectify application to create virtual WiFi AP on your PC. Connectify link It will give you ability to manage traffic over virtual adapter.
  • Download DummyNet open source program and install service to your virtual AP dowload dummynet

Now you can connect with android to your virtual WiFi AP and manage BW + packet loss + latency by using some scripts (single batch file *.bat). Here is example:

cd C:\ipfw3-2012\binary
@echo on
@set CYGWIN=nodosfilewarning

@ipfw -q flush
@ipfw -q pipe flush

set download="80Kbit/s"

set srcIp=111.111.222.222

ipfw pipe 1 config bw %download%

ipfw add pipe 1 tcp from any to any in

ipfw -c show
ipfw pipe show

It works great. Here is print screen:

enter image description here enter image description here

Upvotes: 3

Felix
Felix

Reputation: 6104

I solved the problem by slowing down the network of my PC with network simulator. Then I created a virtual wifi with win 7 and connected my phone with it.

Upvotes: 11

dtbnguyen
dtbnguyen

Reputation: 121

Upvotes: 2

P.Melch
P.Melch

Reputation: 8180

You can write a wrapper class that fetches the whole content and returns that data with delays and only in small chunks.

Upvotes: -3

Related Questions