7

I am developing a phone app and I'm testing it with my Droid RAZR with OS version 4.1.2

I need the phone to be able to use its SD card, and prevent the computer from using the USB connection as a "mass storage" connection, which causes it to take over the SD card (it can only be mounted to either my phone or the computer, not both).

You used to be able to connect to the computer in "Charge Only" mode, which would keep the SD card active with the phone, but that no longer seems to be an option. There is only Mass Storage (computer uses SD card), Media Device (same story), and Camera (same there too).

Is there another option? Perhaps some way to disable the mass storage from the PC's side but still retain the USB Debugging?

1 Answer 1

6

Take a look at this thread here. As stated there:

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.

3
  • Thank you for that. The only thing I really had to do was change the USB Connection type to "Camera". For some strange reason, the phone then uses the SD card. I apparently didn't test it thoroughly enough. Commented Jul 2, 2013 at 6:22
  • I personnaly found that, when I first started my firs App on my Device (for testing purposes of course). For some reason the SDK didn't find my devices and I started searchin for the reason. It turned out, that the USB settings have to be set to "As Camera" and it settled it :)
    – g00dy
    Commented Jul 2, 2013 at 6:26
  • +1 Translation for Huawei phones: " drag down the notifications list after connecting the USB port to the debugging PC/device and select 'Photos' as the connection type". My problem arose trying to use scrcpy to screen/keyboard mirror a Huawei phone to PC. More details in this answer
    – traktor
    Commented Mar 29, 2022 at 3:32

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