Run apps in Android Studio through mobile by USB

Asked

Viewed 56,744 times

7

Does anyone know how I can set up Android Studio to run apps on the connected USB on mobile? I’m currently using Genymotion and I was wondering if there are any compatibility issues. I tried to change inside "run Configurations" where I added a new USB device, but when I click "run" it is not displayed.

  • 1

    On your device, you have set the option to Developer? If yes, please tick the option to USB Debugging? If so, using the adb, when you use adb devices with your device plugged into the USB, it is listed?

  • @Wakim I have an LG G2. Have to leave the phone as root? Pq on it there is no developer option. USB options do not have this. Where is the part of adb Devices? Remembering that I am using Android Studio and not Eclipse. Thank you.

  • 2

    Do not need root, just click 7 times on Build Number in mobile options (hehe). This applies to all IDE’s and the adb stays in the folder Platform-tools inside the android sdk. Devices is a command to list the devices connected via USB and that are available for use for any command of the adb.

  • @Very good wakim. Thank you.

  • @Wakim an answer, I wanted to vote on the answer, but there is no ;)

  • I am beginner in the studies of android but I had a similar problem, and I found the solution in seguite video https://www.youtube.com/watch?v=1QkYd_QjEWc is very short without audio and solved my problem, wait that help :)

Show 1 more comment

2 answers

12


No root needed to debug your application on a physical device.

To enable debug mode by clicking 7 times in the Build Number in mobile options.

After enabling just check the option USB Debugging inside the menu Developer Options. These names may vary according to the model and language of the device.

With this configuration done. The simplest test is the command devices of the adb. The devices is a command to list devices connected via USB and accessible to adb server, that is, they are available for use for any adb command, including debug.

Example of execution:

wakim@wakim-Inspiron-5420:~$ adb devices
List of devices attached 
0432772433  device
  • thanks for the help!!!

  • how and where I take this test?

  • @Fabiohenrique, this test has to be done in the terminal with adb in the system path.

1

Browser other questions tagged

You are not signed in. Login or sign up in order to post.