安卓ADB通过无线连接手机
本文摘录于:https://www.cnblogs.com/zhuxibo/p/14261117.html只是做学习备份之用,绝无抄袭之意,有疑惑请联系本人!
别人给的操作确实可行,我这里实操记录如下:
Administrator@piaoranPC MINGW64 /e/Work/SYD8810/SYD8810_BLE_delivery_locker (master)
$ adb tcpip 5555
* daemon not running; starting now at tcp:5037
* daemon started successfully
Administrator@piaoranPC MINGW64 /e/Work/SYD8810/SYD8810_BLE_delivery_locker (master)
$ adb devices
List of devices attached
AB6UUT3210001598 device
Administrator@piaoranPC MINGW64 /e/Work/SYD8810/SYD8810_BLE_delivery_locker (master)
$ adb shell netcfg
r_rmnet_data0 DOWN 0.0.0.0/0 0x00000000
rmnet_data0 UP 0.0.0.0/0 0x00000041
ifb0 UP 0.0.0.0/0 0x000000c3
tunl0 DOWN 0.0.0.0/0 0x00000080
wlan0 UP 192.168.8.51/24 0x00001043
rmnet_data5 DOWN 0.0.0.0/0 0x00000000
r_rmnet_data3 DOWN 0.0.0.0/0 0x00000000
ip6gre0 DOWN 0.0.0.0/0 0x00000080
p2p1 DOWN 0.0.0.0/0 0x00001002
rmnet_data3 UP 10.9.168.78/30 0x00000041
r_rmnet_data1 DOWN 0.0.0.0/0 0x00000000
sit0 DOWN 0.0.0.0/0 0x00000080
rmnet_data1 UP 0.0.0.0/0 0x00000041
gretap0 DOWN 0.0.0.0/0 0x00001002
lo UP 127.0.0.1/8 0x00000049
erspan0 DOWN 0.0.0.0/0 0x00001002
ifb1 DOWN 0.0.0.0/0 0x00000082
wifi-aware0 DOWN 0.0.0.0/0 0x00001002
rmnet_ipa0 UP 0.0.0.0/0 0x00000041
dummy0 UP 0.0.0.0/0 0x000000c3
rmnet_data4 DOWN 0.0.0.0/0 0x00000000
gre0 DOWN 0.0.0.0/0 0x00000080
r_rmnet_data2 DOWN 0.0.0.0/0 0x00000000
ip6_vti0 DOWN 0.0.0.0/0 0x00000080
ip6tnl0 DOWN 0.0.0.0/0 0x00000080
ip_vti0 DOWN 0.0.0.0/0 0x00000080
p2p0 DOWN 0.0.0.0/0 0x00001002
rmnet_data2 DOWN 0.0.0.0/0 0x00000000
Administrator@piaoranPC MINGW64 /e/Work/SYD8810/SYD8810_BLE_delivery_locker (master)
$ adb connect 192.168.8.51:5555
connected to 192.168.8.51:5555
Administrator@piaoranPC MINGW64 /e/Work/SYD8810/SYD8810_BLE_delivery_locker (master)
$ adb devices
List of devices attached
192.168.8.51:5555 device
其实IP地址也可以在关于手机的这个界面获得:
通过无线安装APK
这里通过无线安装APK,注意:这里传输文件的时间要很久,所以要耐心等待:
Administrator@piaoranPC MINGW64 /e/Work/SYD8810/SYD8810_BLE_delivery_locker (master)
$ adb install -r /e/download/errand_0529.apk
Performing Streamed Install
Success
上面命令的过程是:
adb install -r 后,将apk文件拖拽到cmd界面光标处,回车
一定要注意"-r"后要有一个空格
另外提一句:这里为什么不在CMD中操作,原因是不知道为什么我的电脑在CMD执行这条命令的时候会自动打开Android_studio