Adb transfers file with a very slow speed

According to Performance Tuning the Network Stack on Mac OS X Part 2,
edit your /etc/sysctl.conf file as follows and reboot your machine.

kern.ipc.somaxconn=2048
net.inet.tcp.rfc1323=1
net.inet.tcp.win_scale_factor=4
net.inet.tcp.sendspace=1042560
net.inet.tcp.recvspace=1042560
net.inet.tcp.mssdflt=1448
net.inet.tcp.v6mssdflt=1412
net.inet.tcp.msl=15000
net.inet.tcp.always_keepalive=0
net.inet.tcp.delayed_ack=3
net.inet.tcp.slowstart_flightsize=20
net.inet.tcp.local_slowstart_flightsize=9
net.inet.tcp.blackhole=2
net.inet.udp.blackhole=1
net.inet.icmp.icmplim=50

I was faced with the same problem and solved it by the above settings.


I was struggling with this, then saw a suggestion to just start a webserver on the host machine and let your android device/emulator just download the apk.

cd build/outputs/apk/
python -m SimpleHTTPServer 8000

Then, in the android device I just open a browser to http://<host_ip>:8000/ - it downloads in seconds.

Tags:

Macos

Android

Adb