How to debug in Android Studio using adb over WiFi

后端 未结 15 1960
有刺的猬
有刺的猬 2020-12-04 06:32

I\'m able to connect to my phone using adb connect, and I can adb shell also.

But when I go to Run->Device Chooser, there are no devices there.

What should I

相关标签:
15条回答
  • I'm using AS 3.2.1, and was about to try some of the plugins, but was hesitant realizing the plugins are able to monitor any data..

    It's actually really simple doing it via the Terminal tab in AS:

    1. Turn on debugging over WiFi in your phone
      • Go to developer options and turn on "ADB over network"
      • You'll see the exact address and port to use when connecting
    2. Go to the Terminal tab in Android Studio
    3. Type adb tcpip 5555
    4. Type your ip address as seen in developer options i.e. adb connect 192.168.1.101
    5. Now you'll see your device in AS "Select deployment target" dialog
    0 讨论(0)
  • 2020-12-04 07:13

    In Android Studio 3.0.1 > Goto > (Short cut key (Alt+Cltr+S)) Settings > Goto Plugins > Click on Browser repositories... > Search "ADB WIFI" and install the plugin. After the installation restart your android studio.

    Click the icon and connect your device.

    0 讨论(0)
  • 2020-12-04 07:15

    0pen android studio and follow this path

    Go to -> settings -> plugins -> Click on Browser repositories

    after that search for WIFI ADB ULTIMATE then click on install.

    First time you have to connect it using USB.

    You can check its working on github. For more details kindly refer WIFI ADB ULTIMATE

    0 讨论(0)
  • 2020-12-04 07:16

    Try below android studio plugin

    Android WiFi ADB

    HOW TO

    1. Connect your device to your computer using a USB cable.
    2. Then press the button on the toolbar and disconnect your USB once the plugin connects your device over WiFi.
    3. You can now deploy, run and debug your device using your WiFi connection.

    Github Link: https://github.com/pedrovgs/AndroidWiFiADB

    NOTE: Remember that your device and your computer have to be in the same WiFi connection.

    0 讨论(0)
  • 2020-12-04 07:18

    Step 1: Goto your Android sdk folder -> platform tools and copy the whole path

    For example: C:\Program Files (x86)\Android\android-sdk\platform-tools

    Step 2: Goto command prompt or Android studio terminal

    windows users cd C:\Program Files (x86)\Android\android-sdk\platform-tools

    Mac Users /Users/<username>/Library/Android/sdk/platform-tools

    and press enter

    Step 3: Connect your device & system with same wifi.

    Step 4: Type adb tcpip 5555 and press Enter.

    Step 5: Type adb connect x.x.x.x:5555, replacing the x.x.x.x with your phone IP address.

    find out phone IP address

    Settings -> About phone -> Status (some phones may be vary)

    Note: In case that you connect more than one device, disconnect other phones except the one you need to connect.

    Command prompt screen shot:

    0 讨论(0)
  • 2020-12-04 07:19

    You can find the adb tool in /platform-tools/

    cd Library/Android/sdk/platform-tools/
    

    You can check your devices using:

    ./adb devices
    

    My result:

    List of devices attached
    XXXXXXXXX   device
    

    Set a TCP port:

    ./adb shell setprop service.adb.tcp.port 4444
    
    ./adb tcpip 4444
    

    Result message:

    restarting in TCP mode port: 4444
    

    To init a wifi connection you have to check your device IP and execute:

    ./adb connect 192.168.0.155:4444
    

    Good luck!

    0 讨论(0)
提交回复
热议问题