[ADB]-1.adb链接使用wifi作为媒介

1.首先让电脑主机和设备(手机)链接到同一个局域网
2.先用usb线链接手机,查看设备网络地址参数,然后设置参数

2.1 adb shell ifconfig
lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0 
          inet6 addr: ::1/128 Scope: Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0 
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 
          collisions:0 txqueuelen:1 
          RX bytes:0 TX bytes:0 

wlan0     Link encap:Ethernet  HWaddr cc:4b:73:1d:76:d8
          inet addr:172.20.10.11  Bcast:172.20.10.15  Mask:255.255.255.240 
          inet6 addr: fe80::ce4b:73ff:fe1d:76d8/64 Scope: Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:580 errors:0 dropped:0 overruns:0 frame:0 
          TX packets:605 errors:0 dropped:0 overruns:0 carrier:0 
          collisions:0 txqueuelen:1000 
          RX bytes:90226 TX bytes:70272 

eth0      Link encap:Ethernet  HWaddr 8e:db:86:0e:01:f7
          inet6 addr: fe80::8cdb:86ff:fe0e:1f7/64 Scope: Link
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0 
          TX packets:6 errors:0 dropped:0 overruns:0 carrier:0 
          collisions:0 txqueuelen:1000 
          RX bytes:0 TX bytes:508 
          Interrupt:24 
2.2adb tcpip 5555 //此时,应该usb已经链接不上adb了

adb connect 链接ip

2.3 adb connect 172.20.10.11
eg:
zwl@zwl:FireNow-Nougat$ adb connect 172.20.10.11
already connected to 172.20.10.11:5555        //之前已经链接过了
从这里之后,就可以像链接usb线一样,正常执行adb 命令了

zwl@zwl:FireNow-Nougat$ adb shell
rk3399_firefly_box:/ $ 

猜你喜欢

转载自blog.csdn.net/qq_16919359/article/details/107031314