How to run an android app directly in phone from android studio using WIFI ?

Android developer even though he is very good and comfortable in developing app will feel less comfortable for testing their code using AVD (Android Virtual Device) if he want to test the app changes frequently and also if he does not have high configuration system.

For ease, physical/hardware devices like mobile phone can be used for testing and verification of features/app. Android Studio itself provides easy ways for connecting mobile phone for debugging.

We can either use below methods which are in built in Android Studio

  • Using USB Cable
  • Using WIFI (for Android 11+ devices)

For some people connecting with USB cable look easy, for some WIFI connection is comfortable. This tutorial will help you on how to connect Mobile Phone and Android Studio using WIFI.

Steps to connect Mobile Phone and Android Studio using WIFI

  • Connect android phone and the computer which runs android studio to same WIFI network. WIFI

  • Open Android Studio and click on the dropdown arrow of connected devices near run icon in tool bar (Yellowed in screenshot) Connected devices option in toolbar

  • Next Click on the Pair devices using WIFI option Connected devices option in toolbar

  • A new window Pair new devices over WIFI will be opened. We can choose any of the shown method for connecting the hardware devices
    • Pair using QR code
    • Pair using pairing code
    Connected devices option in toolbar

  • Next Open Settings in mobile phone and go to Developer Options.
    If Developer Options is not visible, Go to About device or About Phone whichever is there, and further go to Software Information.
    Then tap Build Number 7 times & enter pin/pattern. This will enable Developer Options. After this Developer Options in Settings will be shown. (In case of Samsung mobile)

  • Scroll down and check is there any Wireless Debugging options, Enable it and go into the option.
    You will find => Pair device with QR Code option and Pair with pairing code option.
    Choose any one option and pair it.
    Connected devices option in toolbar

    That’s it …! You have successfully paired your mobile with android studio. Now Click close button.

  • Finally Click Runrun button or debug icon from toolbar to run/debug the app . Connected devices option in toolbar

    Now Running application from Android Studio in mobile seems very easy without data/USB cable.

Note : Wireless Debugging is enabled only on mobile phones from Android 11+ device. Wont work in older devices