derek5. 2011-02-04 02:23 采纳率: 100%
浏览 584
已采纳

使用 Wi-Fi 运行 / 安装 / 调试 Android 应用程序?

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

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

转载于:https://stackoverflow.com/questions/4893953/run-install-debug-android-applications-over-wi-fi

  • 写回答

24条回答 默认 最新

  • bug^君 2012-04-19 21:19
    关注

    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 or adb shell ifconfig with 6.0 and higher
    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 Screenshot Showing the option on 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.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(23条)

报告相同问题?

悬赏问题

  • ¥15 关于#python#的问题:求帮写python代码
  • ¥20 MATLAB画图图形出现上下震荡的线条
  • ¥15 LiBeAs的带隙等于0.997eV,计算阴离子的N和P
  • ¥15 关于#windows#的问题:怎么用WIN 11系统的电脑 克隆WIN NT3.51-4.0系统的硬盘
  • ¥15 来真人,不要ai!matlab有关常微分方程的问题求解决,
  • ¥15 perl MISA分析p3_in脚本出错
  • ¥15 k8s部署jupyterlab,jupyterlab保存不了文件
  • ¥15 ubuntu虚拟机打包apk错误
  • ¥199 rust编程架构设计的方案 有偿
  • ¥15 回答4f系统的像差计算