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

前端 未结 30 2312
[愿得一人]
[愿得一人] 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:45

    Steps for Android Wifi debugging with ADB:

    $> adb devices   // check all usb debuggable devices connected.
    
    $> adb -d shell  // Access device shell.
    
    shell> ifconfig  // Check and copy wifi ip-address eg:192.168.1.90
    
    shell> exit      // Exit from android device shell.
    
    $> adb tcpip 5000   // open TCP port 5000 (or any available)
    
    $> adb connect 192.168.1.90:5000  // connect to device via wifi ip over specific TCP port.
    
    $> adb devices   // you will get debuggabled android device over wifi.
    

    Required: Connect your android device to computer via USB with developer mode enabled. Also connect your android device and computer to same wifi router (or use tethering).

提交回复
热议问题