Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to limit Android device network speed for test purposes

I am testing an Android application which had some problems with managing its content on low quality networks. I am unable to verify if the problem still occurs, because with the speed of the network I have in my home (120mb/s), everything is already downloaded before I manage to start the reproduction route. Using the Android simulator is not an option in this case, as the reproduction route demands very quick action for the issue to appear.

I know that iOS has feature which allows users to limit network conditions, but I am unable to find a similar tool for Android.

TL;DR

Is there any way to simulate a bad network condition on actual Android device?

like image 935
Imprezobus Avatar asked Oct 29 '14 20:10

Imprezobus


3 Answers

Give BradyBound a try. You need to have a rooted phone for this, though.

You can also try this linux command. You'll need a Terminal Emulator for this in addition to root.

like image 125
Dodu Avatar answered Sep 20 '22 15:09

Dodu


  1. first you need a rooted Android device.
  2. the method below limits bandwidth, the tc module in Android doesn't support set latency.

limit to 10kbit:

adb shell '
 tc qdisc add dev eth0 root handle 1: htb default 30
 tc class add dev eth0 parent 1: classid 1:1 htb rate 10kbit
 tc class add dev eth0 parent 1: classid 1:2 htb rate 10kbit
 tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32  match ip dst 0.0.0.0/0 flowid 1:1
 tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32  match ip src 0.0.0.0/0 flowid 1:2
'

cancel the limit:

adb shell tc qdisc del dev eth0 root
like image 30
tigerZ Avatar answered Sep 19 '22 15:09

tigerZ


Try Throttly,it's a network link conditioner tool for Android. https://play.google.com/store/apps/details?id=me.twocities.throttly

like image 27
twocity Avatar answered Sep 19 '22 15:09

twocity