Using Android Debug Bridge (ADB) via TCP/IP

本文指导您如何在Android设备上通过TCP/IP设置ADB,包括在设备和主机上进行网络配置,以及如何使用环境变量连接设备。强调了安全措施,确保仅在开发环境中使用此方法,并警告不要在生产环境或可能包含敏感数据的设备上启用。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

https://wiki.linaro.org/Platform/Android/SetupAdbOverTcp

 

Using Android Debug Bridge (ADB) via TCP/IP

On the device running Android (using the serial console):

netcfg eth0 up                 #get your eth network up
netcfg eth0 dhcp                 #get your dhcp ip for eth0 intergace
ifconfig eth0                       #confirm your board IP 
echo 0>/sys/class/android_usb/android0/enable  #enable adb via IP
stop adbd
setprop service.adb.tcp.port 6565
start adbd

On your host machine (assuming the its reachable via tcpip):

export ADBHOST=<board's IP>
sudo android-sdk-linux_x86/platform-tools/adb start-server
android-sdk-linux_x86/platform-tools/adb connect <board's IP>:6565
android-sdk-linux_x86/platform-tools/adb shell

Note: default adb port is 5555, and using another value is trivial security measure. However, adb access at all, and networked access foremostly, is utterly insecure and intended to be used only on development-only devices in a physically and networkedly controlled environment. Never enable those on a production-use device or on a device which may contain sensitive data. The same goes for unauthenticated root access.


CategoryAndroidTips

Platform/Android/SetupAdbOverTcp (2012-05-03 05:34:44由liuyq0307编辑)


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值