Steps to Follow:
- First In Android Settings Application go to About Device option.
- Click 9 times on Build Number option, so that you can unlock Developer Options setting.
- Now In you Setting's Application, you will have Developer Options enabled, go and click on it.
- set following options on : Stay Awake, USB Debugging and if you have Internet Adb option in menu set that also enabled if not then dont worry continue the steps.
- Now open your Android Studio and the application you want to run on the android device.
- In Android Studio, at bottom click on Terminal tab, Terminal window opens.
- Now through your terminal go to the directory where your Android SDK is stored
- In SDK directory go to platform-tools directory.
- Now if you list the files in the platform-tools you will see adb there.
- Running following Commands.
as an example.
adb connect <ip-address-of-your-device>:5555
as an example:
adb connect 10.10.0.21:5555
The terminal should show something like below
adb server is out of date. killing...
*daemon started successfully*
connected to 10.10.0.21:5555
Now run shell command
adb shell
you will get the prompt something like this, i my case i used android x86 device for debugging.
shell@x86_64:/$
Now if you go to the task bar in the android studio and click on Run options and then Run'app' you will be able to see the device as your Deployment Target.
Hope it helps !