Run/install/debug Android applications over Wi-Fi?

前端 未结 30 2276
[愿得一人]
[愿得一人] 2020-11-22 07:16

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.

30条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-11-22 07:49

    For Ubuntu / Linux:

    1. Make sure your device is working for debugging: http://developer.android.com/tools/help/adb.html#Enabling
    2. Go to your sdk folder and find the folder platform-tools
    3. Use ./adb devices to list the connected devices. Make sure it is only one device connected and no emulator running.
    4. Find your device IP address, you can find it in your device: http://developer.android.com/tools/help/adb.html#wireless, or got adb shell like this: ./adb shell then netcfg. You will see a list of IP addresses. Find wlan0, in my case 192.168.100.3/2.
    5. ./adb tcpip 5555
    6. Finally enter ./adb connect :5555 in your terminal. You can now deploy the application to your device over Wi-Fi.

提交回复
热议问题