android - USB调试时启用SD卡?

标签 android debugging mobile

我正在开发一个手机应用程序,我正在使用操作系统版本为 4.1.2 的 Droid RAZR 对其进行测试

我需要手机能够使用其 SD 卡,并防止计算机将 USB 连接用作“大容量存储”连接,这会导致它接管 SD 卡(它只能安装到任一我的手机或电脑,而不是两者)。

您过去可以在“仅充电”模式下连接到计算机,这将使 SD 卡与手机一起保持 Activity 状态,但这似乎不再是一种选择。只有 Mass Storage(电脑使用 SD 卡)、Media Device(同理)和 Camera(同理)。

还有其他选择吗?也许有某种方法可以从 PC 端禁用大容量存储但仍保留 USB 调试?

最佳答案

看看这个线程 here .如那里所述:

Next, enable USB debugging by checking the “USB Debugging” item.

Finally – and this is the most oddball – you need to go back a screen, to Settings, and click on the Storage item. Up in the upper right of the screen are three tiny squares which represent the Jelly Bean way of doing a context menu. Click that, and a small “USB Computer Connection” item will appear. Click that. You’re taken to a new screen with two “Connect As” options.

Check “Camera”. Yes, because USB debugging requires the use of a camera (no, not really). It’s just a requirement. Something about the communication protocol or file transfer encoding or something. I don’t make this stuff up.

关于android - USB调试时启用SD卡?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17418408/

相关文章:

java - 通往外部存储的安全路径

在 Intellij/Webstorm 和 Chrome 开发工具中同时调试

javascript - 是否可以覆盖 JavaScript 的 toString() 函数来为调试提供有意义的输出?

android - 从自定义 View 接收日文键盘输入

java - 如何在Android xml中正确添加TextChangeListener

android - 选择构建类型时如何区分构建风格?

c# - 共享点 2010 "unhandled win32 exception occurred in W3WP.EXE"

android - 在移动设备或 iPad 上查看时背景图片无响应

android - Kotlin 编程语言有哪些优势?

android - 开源用户安全/密码方案