How to connect Android Device through Wife using adb command

Connecting an Android device via Wi-Fi ADB (Android Debug Bridge) allows you to debug and execute commands on your device wirelessly, without the need for a USB connection. Here's how you can set up and connect an 

Android device through Wi-Fi ADB:

Prerequisites:

  • Android device with Developer Options enabled
  • USB cable (for initial setup)
  • A computer with ADB installed


Steps:


1. Enable Developer Options and USB Debugging:

  • On your Android device, go to Settings.
  • Scroll down and tap on About phone.
  • Find the Build number and tap on it 7 times. This will enable Developer Options.
  • Go back to the main Settings page and select Developer options.
  • Turn on USB Debugging.

2. Connect Android Device via USB:

  • Connect your Android device to your computer using a USB cable.
  • Open a terminal or command prompt on your computer.
  • Check if your device is recognized by ADB with the following command:

    adb devices

  • You should see your device listed. If prompted on your Android device to allow USB debugging, accept it.

3. Get the IP Address of your Android Device:

  • Disconnect the USB cable from your Android device.
  • On your Android device, go to Settings > Wi-Fi.
  • Tap on the connected Wi-Fi network (the one your computer is also connected to).
  • Note down the IP address.

4. Connect Android Device via Wi-Fi ADB:

  • In the terminal or command prompt on your computer, enter the following command to connect to your device via Wi-Fi:

    adb connect [IP_ADDRESS]

    Replace [IP_ADDRESS] with the IP address you noted down from your Android device.
  • After executing the command, you should see a message indicating that the connection was successful.

5. Verify Connection:

  • To verify that your Android device is connected via Wi-Fi ADB, enter the following command:
    adb devices

  • You should see your device listed with the IP address next to it, indicating a successful Wi-Fi ADB connection.

Now you can debug and execute ADB commands wirelessly on your Android device from your computer. Remember that both your computer and Android device should be connected to the same Wi-Fi network for this to work.


Connect through Android Studio





Comments

Popular posts from this blog

Google Assistant Implementation in Android application with app actions