How to setup your ADB (Android Debug Bridge) more than one device or emulator




Welcome..

Today, We will tell you something good idea. When you were developing an apps or some apps that might be very dynamics of tasks on your screen. Here we will help you to attention on this trick.

The first thing if you don't know what is ADB, you can read here on The Official Android Studio Documentation by Google.

If you just need only one phone to debug, try these :
  • Type adb tcpip (enter), it will give you defaut port where the port is 5555
  • If you want to custom port, just type adb tcpip 2001 (enter)
  • Pluged in usb type 2.0 or 3.0 by your phone on to your PC
  • Type adb devices (enter), to make sure your phone has pluged
  • Make sure your phone and your PC on the same network, then
  • Type adb connect 192.168.1.2:2001 (enter)
  • Unplug your cable
  • Type again adb devices (enter), to make sure everything works
  • Great, let's start develop apps without any cable anymore on your PC usb port
Now, if you want to try the experimental (more than one devices of smartphone) while debugging some apps on to some devices, try these :
  • Pluged in your second one of your phone
  • Type adb devices (enter), now you will see the first one and the second one, the latest one is not configure by ip address
  • Type adb -s your_2nd_device_id tcpip 2002 (enter)
  • Type adb connect your_2nd_device_ipaddress:2002 (enter)
  • Unplug your phone
  • Type adb devices (enter)
  • Now you will see the 1st phone would have address 192.168.1.2:2001 then the 2nd phone would be 192.168.1.3:2002 am I right?
Great, now you can debugging some apps on to some phones by network routes.

May it will help you today.

Comments