通过Wi-Fi运行/安装/调试Android应用程序? [英] Run/install/debug Android applications over Wi-Fi?

查看:204
本文介绍了通过Wi-Fi运行/安装/调试Android应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我认为有一种方法可以通过Wi-Fi测试您的应用程序在开发中。这是准确的吗?



我希望能够解开我的手机和无线开发。

解决方案

请参阅论坛帖子 上的选项的屏幕
应显示IP地址

  • adb connect< DEVICE_IP_ADDRESS>:5555

  • 完成后禁用设置






  • 使用Android Studio有一个插件,允许您连接USB调试,而无需使用终端的任何ADB命令。


    I thought there was a way to test your applications in development over Wi-Fi. Is this accurate?

    I'd love to be able to untether my phone and develop wirelessly.

    解决方案

    See forum post Any way to view Android screen remotely without root? - Post #9.

    1. Connect the device via USB and make sure debugging is working.
    2. adb tcpip 5555
    3. find the IP address with adb shell netcfg
    4. adb connect <DEVICE_IP_ADDRESS>:5555
    5. Disconnect USB and proceed with wireless debugging.
    6. adb -s <DEVICE_IP_ADDRESS>:5555 usb to switch back when done.

    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.


    WARNING: leaving the option enabled is dangerous, anyone in your network can connect to your device in debug, even if you are in data network. Do it only when connected to a trusted Wi-Fi and remember to disconnect it when done!


    @Sergei suggested that line 2 should be modified, commenting: "-d option needed to connect to the USB device when the other connection persists (for example, emulator connected or other Wi-Fi device)".

    This information may prove valuable to future readers, but I rolled-back to the original version that had received 178 upvotes.


    On some device you can do the same thing even if you do not have an USB cable:

    1. Enable ADB over network in developer setting It should show the IP address
    2. adb connect <DEVICE_IP_ADDRESS>:5555
    3. Disable the setting when done


    Using Android Studio there is a plugin allowing you to connect USB Debugging without the need of using any ADB command from a terminal.

    这篇关于通过Wi-Fi运行/安装/调试Android应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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