Having trouble with USB debugging???
Want to reduce the usage of USB??
In this post, we will show you two methods that help you to run the app over WiFi in Android Studio.
Yes, this is simple, efficient and it will benefit you in the long run. If you are a beginner, we recommend you to take the strategy NO:1.
Are you curious to find out what it is ??
Strategy NO:1 – Using Android WiFi ADB plugin
What will you need
- USB cable – initial setup
- Android Wifi ADB plugin
- Efficient way to make APK and reduce android build time
- Reduce Android App Development Time Using Genymotion free emulator – for personal use
- Android AsyncTask Example
Open Android Studio,
- Click Shift key twice or search icon at the top – right side corner of the Android Studio
- Search “plugins“
- Click on plugins item on the list
You can also get plugins window by File->Settings->Plugins
- Now plugins window will appear, just click on “Browse repositories“
- Search “Android Wifi ADB” plugin”
- Select “Android WiFi ADB” from plugins list”
- Install it.
- The plugin will be downloaded.
Click “Restart Android Studio“.
- Android Studio shows a notification Restart Android Studio to activate changes in plugins? Click “Yes“
- Make sure that USB debugging is fine and successfully connected with the USB cable.
- After the restart, just click the Android WiFi ADB icon that besides the run button like above.
- Android Studio notifies with a message that your device is connected.
- Disconnect your device, otherwise run dialog will show your device twice. one as USB device, other as WiFi device.
- Click the run button and select your device in the run device dialog.
After selecting the device, it will continue to download through WiFi and install on your device.
Strategy NO:2 – How to run your app over WiFi using ADB commands
Sometimes, This method may difficult for you if you are a beginner. But we are just
- connecting the device using the IP address
- Install the app through ADB command.
Open Android Studio,
- Click your terminal on Android Studio, You can also use the command prompt.
- Type “adb devices” and Press Enter key – List the devices which are connected to system.
If your device is plugged with USB, then it will show it to you on the terminal.
- Type “adb tcpip 5555” and Press Enter key.
Now you can disconnect your device.
Find the IP address of your smart device. You can find it by Settings-> About Phone -> Status -> IP address.
Now connect your device over wifi by running
- “adb connect <IP address of your Android Device>:5555“
that’s all. your Android device successfully connected with computer.
- Install apk – adb install “full location of apk”
- adb install C:/app-debug.apk – here C:/app-debug.apk – full location of APK, I just placed the APK to C drive.
It’s a nice technique, but we are not saying that to leave USB cables forever. It’s needed for initial setup. If your pc and Android device restart again, Then you need to use USB cables again for reidentify the device.
Share your experiences with us and don’t forget to share.
Thanks for scrolling…