什么是USB调试?我能永远保持它吗? -- usb 领域 和 battery-life 领域 和 usb-debugging 领域 android 相关 的问题

What is USB debugging? Can I keep it ON forever?


简体版||繁體版
27
vote

问题

中文

有时我需要将一些音乐从我的电脑转移到我的Galaxy S2,并且必须始终激活USB调试。然后我想,我可以永远保持一般吗?我的意思是,永远保持它可以给我一个问题(成本电池?)?什么是USB调试?

english

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?

        
 
 

回答列表

30
 
vote
vote
最佳答案
 

启用USB调试基本上启动了设备上的 abcdefghijklmnadb 守护程序,这允许它与另一个设备上的 abcdefghijklmnadb 通信以启用调试命令。它在开发和调试应用程序时使用,并允许您(主要)到:

  • 在计算机和设备(两种方式)之间传输数据
  • 轻松从 logcat
  • 读取日志数据
  • 调试应用程序,包括断点和堆监控
  • 安装和卸载应用程序
  • 访问设备上的剥离外壳,用于命令行交互。

让它保持所有时间将对电池产生可忽略不计的影响,如果有的话。其他一些需要考虑的事情(或不):

  • pro:如果您的设备具有阻止您访问屏幕的硬件问题,USB调试可能有助于恢复数据(尤其是在扎根设备上)。
  • pro:您可以安装应用程序,重新启动您的设备,并且通常在物理上实际与您的设备进行实际交互的其他方便,即使有屏幕锁定/关闭。
  • pro:在扎根设备上,如果忘记屏幕锁定密码/引脚/模式(也是潜在的配置,请参阅下文),可能会重新获得条目。
  • pro:您可以利用USB调试的端口转发,以使用 pdanet (我相信这就是它如何实现它所需要的方式)。
  • con:如果您的设备丢失或被盗,无论您是否有屏幕锁定,肆无忌惮的个人可能会尝试从设备窃取数据。如果你扎根了,他们就会得到一切。
  • con:我记得读取某些设备在启用了USB调试时将SD卡作为大容量存储设备访问时可能会有问题。我个人从不看到这个问题,但我看到人们声称这是一个问题。

另请参阅:使用来自Android SDK文档的硬件设备,该文档讨论了物理设备上的调试应用程序(而不是模拟器)。还有一个关于 android调试桥(adb)的文档页面解释了它的目的及其目的命令。

 

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.

 
 
   
   
4
 
vote

使 eldarerathis'con

一个可以使用 tasker 或 locale 一起与安全设置插件自动切换 USB调试在安全位置(例如,基于Cell Towers,网络/ GPS位置,连接或遥不可及的WiFi网络),并在离开时将其关闭(使用 Tasker )。使用nfc标记和 locale nfc插件它也可以按需将其打开/关闭。

即使在不触摸屏幕的情况下也是如此 - 所以即使屏幕被打破,它也会起作用。那个"肆无忌惮的个人" 那么必须在你的"安全位置" 或有你的标签,并且必须知道那些情况 - 这危险得多。

如果您的设备不属于将其存储与 USB调试安装的小组,则这将留下几乎没有"CON" 。

 

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.

 
 
2
 
vote

当将其插入计算机时,最大的下行程序无法将其作为大容量存储设备安装。使用它打开它将始终假设您要调试设备。如果您正在开发电话或使用手机使用adb,则您真的只需要它打开它。 adb程序仅通过Android SDK可用,因此它不是用户的平均需求。据说我一直都在继续打开,但这只是为了安卓开发而康复,因为我更频繁地使用它作为大容量存储。你的里程可能会有所不同。

 

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.

 
 
 
 
0
 
vote

您无需始终继续调试。在一些设备中,它会影响电池的充电。在保持调试时,充电速度变得非常低....它会花费超过5个小时才能全额充电....如果您有这样的问题,请继续USB调试,仅在您需要时。 ....

 

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......

 
 
 
 

相关问题

1  OEM USB Drivers Lenovo [已关闭]  ( Oem usb drivers lenovo ) 
关闭。这个问题是 off-topic 。它目前不接受答案。 想要改进这个问题?更新这个问题,所以它是关于android爱好者堆栈交换的主题。 关闭 ...

0  我的tecno n6s不会启动并显示进程.Android .com没有回应  ( My tecno n6s wont start and displays the process android com is not responding ) 
每当我开始我的tecno n6s时,它不会透过公司文本徽标tecno,如果它达到我应该输入我的pin的地方,则出现一个文本,将出现一个文本说出process.android.com没有响应然后回到公司徽标,我如何解决它而不丢失任何数据.USB调试未打开。 ...

27  什么是USB调试?我能永远保持它吗?  ( What is usb debugging can i keep it on forever ) 
有时我需要将一些音乐从我的电脑转移到我的Galaxy S2,并且必须始终激活USB调试。然后我想,我可以永远保持一般吗?我的意思是,永远保持它可以给我一个问题(成本电池?)?什么是USB调试? ...

2  我无法将我的电脑或笔记本电脑连接到我的电脑。调试选项正在说“设备处于充电模式,USB调试被禁用”  ( I cannot connect my one plus two to my computer or laptop debugging option is s ) 
我使用一个加二。但它没有连接到我的系统。它用于先前连接。但是一旦我将它设置为仅限"电荷" 模式。从那以后,通知栏中没有选项可以从电话转移此事。我已经尝试了所有的步骤,即使是在构建号上的点击次数。但没有什么能帮助我脱掉USB调试选项是说设备处于充电模式,禁用USB调试。我尝试了所有方法来启用它,但它不会让我这样做。当我...

13  如何禁用USB连接的通知?  ( How do i disable the usb connected notification ) 
每次插入手机时,我都会收到USB连接的通知。有没有方法可以禁用通知,而无需禁用USB调试? 电话:lg optimus s 载体:Sprint Android:2.2,rooted ...

1  USB在三星Galaxy A51上断开连接  ( Usb disconnects on samsung galaxy a51 ) 
我有三星Galaxy A51(SM A515F)运行最新的Android 10和MacOS 10.15开发机。 给出adb授权,但有时(〜每30分钟)它会断开连接并再次显示对话框。 它只发生在此设备(我有约10个不同的设备)。我尝试过不同的USB端口和电缆(包括设备上的电缆),没有运气。 我看到ioreg输出中的设备...

1  打开Android调试  ( Turn on android debugging ) 
我的手机屏幕完全破碎,好事是它的调试模式打开,我可以使用PC上的VYSOR访问我的手机屏幕 但我有另一台PC,当我尝试使用该系统访问我的手机时,我必须用OK按钮授予访问权限,但我不能这样做,所以如何在不同的PC或授予调试时访问我的电话屏幕或授予调试? 手机的屏幕被打破 USB调试在上 我需要授予对调试提示对话框的...

2  Micromax A57不显示在Eclipse设备列表中  ( Micromax a57 is not displayed in eclipse device list ) 
我已经购买了一个新的microomax a57(ninja-3)智能手机。我想直接从Eclipse安装我的应用程序,因为我需要查看Logcat输出以测试我的应用程序。 我刚刚安装了设备附带的软件,并从此链接下载了驱动程序 microomax a57驱动器 但问题是设备未在Eclipse中列出。 我只是读了一些告诉我...

0  如何在恢复模式下获取root权限?  ( How to get root privilege in recovery mode ) 
我已在adb中复制了'su'命令到/ system。但我不能跑'su','su'说:权限被拒绝。 ...

2  为什么在连接我的Android手机时,某些过程会块?  ( Why do some processes block when my android phone is connected ) 
我一直在尝试全夜重新启动(WinXP),而Emacs(Win32,V23.something,不重要)没有启动......有时...它锁定在 mount.exe 上(在发布期间加载一些Cygwin的东西),我终于注意到了。无法通过processExplorer杀死 mount.exe 。杀死emacs杀死了emacs...




© 2022 it.wenda123.org All Rights Reserved. 问答之家 版权所有