Android debug via wifi
Lấy danh sách thiết bị
adb devices -l
List of devices attached
H7AXB771T321953 device product:WW_Phone model:ASUS_X00ID device:ASUS_X00IDC transport_id:1
Bật debug wifi
# This makes the device to start listening for connections on port 5555;
adb tcpip 5555
# Look up the device IP address
adb shell ifconfig
# adb shell netcfg
# You can disconnect the USB now
# This connects to the server we set up on the device on step 2
adb connect <DEVICE_IP_ADDRESS>:5555
adb connect 192.168.1.22:5555
adb connect 10.10.10.25:5555
# Now you have a device over the network with which you can debug as usual.
To switch the server back to the USB mode, run adb usb
, which will put the server on your phone back to the USB mode. If you have more than one device, you can specify the device with the -s option: adb -s <DEVICE_IP_ADDRESS>:5555 usb
.
No root required!
To find the IP address of the device: run adb shell and then netcfg. You'll see it there. To find the IP address while using OSX run the command adb shell ip route.
Xem danh sách thiết bị đang kết nối
cd C:\Users\soiqu\AppData\Local\Android\Sdk\platform-tools
adb devices
Tắt
adb kill-server
Lỗi adb.exe: error: more than one device/emulator
Tham khảo
https://github.com/soiqualang/dothanhlong_blog_markdown/issues/148
https://github.com/soiqualang/dothanhlong_blog_markdown/issues/149
https://stackoverflow.com/questions/4893953/run-install-debug-android-applications-over-wi-fi
https://github.com/soiqualang/dothanhlong_blog_markdown/issues/130