Take the 2-minute tour ×
Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. It's 100% free, no registration required.

Sometimes I need to transfer some music from my PC to my Galaxy S2 and must always activate USB debugging. Then I think, can I keep it ON forever? I mean, Keep it ON for ever can give me a problem (cost battery?) ? And what's USB debugging?

share|improve this question
    
How does USB debugging affect transferring music? Can't you still select "Select to copy files to/from your computer." from the notification bar? –  TREE Nov 29 '11 at 18:54

4 Answers 4

up vote 23 down vote accepted

Enabling USB debugging essentially starts up the adb daemon on your device, which allows it to communicate with adb on another device to enable debugging commands. It's used when developing and debugging applications, and allows you (primarily) to:

  • Transfer data between a computer and your device (both ways)
  • Read log data easily from logcat
  • Debug applications, including breakpoints and heap monitoring
  • Install and uninstall applications
  • Access a stripped-down shell on the device, for command-line interaction.

Leaving it enabled all the time will have a negligible impact on battery, if any at all. Some other things to consider about leaving it on (or not):

  • PRO: If your device has a hardware problem that prevents you from accessing the screen, USB debugging could be helpful in recovering data (especially on a rooted device).
  • PRO: You can install applications, reboot your device, and generally do some other convenient things without having to actually interact with your device physically, even with the screen locked/off.
  • PRO: On a rooted device it may be possible to regain entry if you have forgotten the screen lock password/pin/pattern (also a potential CON, see below).
  • PRO: You can take advantage of port forwarding over USB debugging to use tethering apps like PDANet (I believe that's how it's implemented since it does require it).
  • CON: If your device is lost or stolen, an unscrupulous individual could attempt to steal data from the device regardless of whether or not you've got a screen lock. If you're rooted, they can get pretty much everything.
  • CON: I recall reading that some devices can have trouble with accessing the SD card as a mass storage device when USB debugging is enabled. I've personally never seen this issue, but I have seen people allege that it was a problem.

See also: Using Hardware Devices from the Android SDK documentation which discusses debugging applications on physical devices (rather than the emulator). There is also a documentation page regarding the Android Debug Bridge (ADB) which explains its purpose and its commands.

share|improve this answer
5  
If you were to charge off of an untrusted "charging station" (via USB, not mains), you would want to turn USB Debugging off. What you think is just power could be a full data connection. –  Broam Nov 29 '11 at 18:34
    
One more cons: Malicious apps can damage system easily.. –  Sachin Shekhar May 22 '12 at 14:33

The biggest downside is not being able to mount it as a mass storage device when you plug it into the computer. With it turned on it will always assume you want to debug the device. You really only need it turned on if you are developing software for the phone or plan on using adb with your phone. The adb program is only available through the Android SDK so its not something average users need. That being said I keep my turned on all the time, but that's only for connivence for doing Android development because I do that more often that use it as a mass storage. You mileage may vary.

share|improve this answer
    
I never had any issues with my devices not being able to mount as UMS with USB Debugging turned on. Also, adb can be installed without the full SDK (see Is there a minimal installation of ADB?) and prove useful to non-developers, e.g. for creating a Full Backup of non-rooted devices with Android 4.0+. –  Izzy Apr 22 '13 at 19:24

To make one of eldarerathis' cons less critical:

One could use Tasker or Locale together with the Secure Settings plugin to automatically toggle USB Debugging on for safe locations (based e.g. on cell towers, network/GPS location, WiFi networks connected or in reach), and toggle it off (exit-task with Tasker) when leaving such. With a NFC tag and the Locale NFC Plugin it could also be switched it on/off on demand.

All that even without touching the screen -- so it would work even if the screen is broken. And that "unscrupulous individual" then would have to be in your "safe location" or have your tag, and must know those circumstances -- which is much less risky.

If your device does not belong to that small group having trouble mounting their storage with USB Debugging turned on, this would leave almost no "Con" then.

share|improve this answer

You don't have need to keep debugging always on. In some devices it affects the charging of battery. When debugging is kept on, the charging speed becomes very low.... it'll take more than 5 hours to full charge.... if you have such problem then keep off usb debugging, ON it only when you need......

share|improve this answer
1  
I've never heard of devices having such a problem. Is there somewhere I can read more about this? –  Dan Hulme Aug 14 at 6:11

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.