adb 切换usb模式_如何使用adb TCPIP没有USB调试启用?

I've read quite a few posts already on adb and tcpip mode and I can create a wireless adb connection, but only when USB debugging is on.

The way I'm using it is like so:

USB debugging is enabled

call adb tcpip on the computer (switches from usb to tcpip mode with default port 5555)

call adb connect PHONE_IP and a connection is made

The above works with or without the usb cable being connected, but only when the USB debugging option is ticked in Developer Options on the Android device. As soon as I untick the option, the tcp connection is lost and cannot be re-established until re-enabling the USB debugging option.

The problem is I'm getting started with a IOIO OTG device and I need to disable USB debugging to use the IOIO as an Accessory Device. It would be really useful if I can use the IOIO and debug with adb at the same time.

I'm using Android 4.1.2 (API 16) on the device.

I can use two devices, both using the same OS version, one rooted, one un-rooted.

Is it possible to use adb in tcpip mode without USB debugging enabled ?

If so, how ?

解决方案

On your rooted device, install a Terminal Emulator

enter "su"

and then "start adbd"

(source)

I have tried this on my rooted Android 4.0.4 device. I could connect normally without enabling USB debugging.

A few more words:

"USB Debugging" is actually called "enable_adb" internally.

If you enable USB Debugging this usually happens(little device

dependant):

a Settings.Secure value is stored (ADB_ENABLED)

(on some devices also a system property is set)

the adb deamon is started

If the UsbManager just checks for the Secure Setting, everything should work. If it checks for the actual running deamon you are out of luck.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值