How to connect multiple android devices with ADB over wifi

后端 未结 3 1379
野性不改
野性不改 2021-02-05 21:58

ADB is installed in the computer, and usb debugging is enabled on devices. Also I have connected one device over wifi successfully. How to connect more devices without having to

3条回答
  •  [愿得一人]
    2021-02-05 23:02

    I have this problem long time ago so I decided to create this simple bash script.

    Assuming that you already added the adb to the path:

    export PATH=${PATH}:/home/YOUR-USERNAME/path/to/adb
    

    You just need to follow this steps:

    1. Run this commands: to create your script (typically, you want $HOME/bin for storing your own scripts)

      cd ~
      mkdir bin
      cd bin
      touch adb_connect
      
    2. Open and copy the script using any editor like gedit.

      gedit adb_connect
      
    3. And make your file executable.

      sudo chmod +x adb_connect
      
    4. Modify your path to add the directory where your script is located:

      export PATH=$PATH:$HOME/bin
      
    5. Finally, now connect your device using USB and run the script:

      adb_connect
      
    6. Your device must be connect now, disconnect the USB cable and repeat steps 5 and 6 to add more devices. If a successful connection occurs, it will have this output:

      Connecting to LGV498bdcb2c5
      restarting in TCP mode port: 7105
      connected to 192.168.20.105:7105
      

提交回复
热议问题