If I connect a Phone with my Windows 7 machine via USB, it shows up in explorer with a name e.g. Nexus 5. How can I open a command prompt and change directory to this device. For lettered drives, I can just type D: F: etc.
Answer
In order to assign a drive letter to a removable device, that device must support UMS (USB Mass Storage) protocol. Unfortunately most newer Android phones, especially those without a removable SD Card, do not support UMS. Instead, they support MTP (Media Transfer Protocol) and PTP (Picture Transfer Protocol) protocols. In such devices it's not possible to map storage as a drive in Windows.
See more details on this Superuser.com question.
With that said, on some selected Samsung and Sony Android devices it's possible to enable the UMS mode for external storage only (SD Card). See this app.
Also, if your goal to simply copy files to and from an Android device via command prompt, ADB will allow you to do so. This utility is part of Android SDK tools. You will need USB drivers for your android phone to be installed, USB Debugging activated in Developer Settings on the phone, and authorize the PC to debug the phone (via a prompt on the device.) After that is done, you will be able to use adb push
and adb pull
commands to copy files & directories, and various Linux shell commands via adb shell
(e.g. adb shell ls /sdcard/
) to navigate the directory structure on the phone.
No comments:
Post a Comment