无线 Adb 完全没有 USB 电缆,适用于没有 root 的手机 [英] Adb over wireless without usb cable at all for not rooted phones

查看:29
本文介绍了无线 Adb 完全没有 USB 电缆,适用于没有 root 的手机的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在我的手机 (LG nexus 4) 上调试 Android 应用程序.我在旅行中忘记带 USB 线了.当我在家工作时,我只需连接 USB 电缆并执行命令adb tcpip 5555"即可.然后我可以拔下 USB 电缆并通过adb 连接 IP"进行连接.

I want to debug Android APPs on my phone (LG nexus 4). I'm travelling and I forgot my USB cable. When I work at home I can do it just connecting the USB cable and executing the command 'adb tcpip 5555'. Then I can unplug the USB cable and connect via 'adb connect IP'.

但是现在我无法执行第一个命令,因为我没有电缆.我不明白为什么每次都必须这样做,因为我之前已经执行过 'adb tcpip' 命令.

But now I cannot execute the first command because I don't have a cable. I don't understand why I have to do it every time, since I already execute the 'adb tcpip' command before.

我现在的尝试:

我在我的 Android 上安装了一个终端应用程序并尝试在那里执行该命令,但我收到了找不到设备"的错误消息.也许他看不到自己......

I installed a terminal application on my Android and tried to execute that command there, but I received a "device not found" error. Maybe he cannot see himself...

我在Android 开发选项"中搜索任何合理的选项并启用似乎与 Wifi 相关的所有内容.但没有任何帮助.

I search for any reasonable option in "Android Development Options" and enabled everything seemed to have relation with Wifi. But nothing helped.

我搜索了 StackOverflow,但我发现的所有答案之前都涉及通过 USB 电缆连接.有没有办法在完全不需要电缆的情况下进行这种连接?

I search StackOverflow, but all answers I found involving connect via USB cable before. Is there I way to do this connection without the need of a cable at all?

一些信息:我的 Nexus 4 没有 root.安卓版本是5.1.1.

Some info: My Nexus 4 isn't rooted. The android version is 5.1.1.

推荐答案

问题与非 root 设备有关,但如果它已 root,最简单的方法是:

从您手机上的终端,执行以下操作:

From the terminal on your phone, do this:

su
setprop service.adb.tcp.port 5555
stop adbd
start adbd

请参阅此答案了解完整详情.

这篇关于无线 Adb 完全没有 USB 电缆,适用于没有 root 的手机的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆