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
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
@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.
– Luiz Henrique Ugliano
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.
– Wakim
@Very good wakim. Thank you.
– Luiz Henrique Ugliano
@Wakim an answer, I wanted to vote on the answer, but there is no ;)
– Jorge B.
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 :)
– Higor Tavares