ADB传输文件的速度非常慢 [英] Adb transfers file with a very slow speed

查看:2725
本文介绍了ADB传输文件的速度非常慢的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的计算机上的adb出现问题,它在OSX Yosemite上运行。我试图安装 ab,安装apk花费了5分钟。我试图缩小问题的范围,似乎 adb推送与此有关。

I'm having a problem with adb on my machine, it runs on OSX Yosemite. I was trying to adb install a 44mb apk and it took 5 minutes for the apk to be installed. I try to narrow the problem, and it seems that the adb push has something to do with this.

I使用 adb push -p src dest 测试以查看传输进度。传输适用于小文件,保留约1300KB / s的传输速率。传输大文件时,它会减慢很多速度,传输速率约为120KB / s。传输总是以字节8388608 /总速度减慢。

I tested with adb push -p src dest to see the transfer progress. The transfer works fine for small files, leaving about 1300KB/s transfer rate. It slows down a lot when transferring large files, about 120KB/s transfer rate. The transfer always slows down at byte 8388608/total.

我已经在同事的Mac上使用OSX Yosemite在相同的设备和相同的USB电缆上测试了adb push,并且可以正常工作精细。我不知道是什么原因引起的问题,有人可以帮助我吗?

I've tested adb push with the same device and same USB cable at my coworker's Mac using OSX Yosemite and it works fine. I don't know what causes the problem, could somebody help me?

推荐答案

根据在Mac OS上调整网络堆栈的性能X第2部分

如下编辑 /etc/sysctl.conf 文件,然后重新启动计算机。

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.

这篇关于ADB传输文件的速度非常慢的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆