Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to access Android File system from Windows 7 command line through USB

When my Android device (Samsung galaxy s4) is connected to my laptop (Windows 7), I would like to be able to access files on the Android device from the Windows 7 command line. The commands :

cd Computer\GGS4\Phone

or

Computer\GGS4\Phone:

don’t work

FYI, the reason why I need this is to use mp3slpt from laptop to cut mp3 file on the Android device. Something like :

D:\temp> mp3splt Computer\GGS4\Podcast\program1.mp3  7.12 7.30 -d out -o  program1Extract
like image 643
u2gilles Avatar asked Feb 07 '14 05:02

u2gilles


2 Answers

Newer Android devices (primarily) use MTP to communicate with USB hosts. Older devices were identified as mass storage devices. Win7 supports MTP but it doesn't "mount" the device as a drive and the device storage is therefore not available via a file path.

I think the best solution is to copy the file before passing it to mp3splt:

adb pull Podcast/program1.mp3
mp3splt program1.mp3 7.12 7.30 -d out -o program1Extract
del program1.mp3

You can also develop a Win7 driver that provides a virtual drive using MTP or run an FTP server on your device which you can then associate with a Windows drive (native Win7 example).

like image 127
Tobias Avatar answered Nov 08 '22 17:11

Tobias


You can try to install a WebDAV server to the android device, then mount the WebDAV server as a drive on Windows 7, after mounting to a drive, you can access the drive (android folder) from the command line.
Here is a free WebDAV server from Google Play (Of course, there are many other WebDAV servers in Google Play)
And the steps to mount the WebDAV server as a drive on Windows 7

like image 39
user2223403 Avatar answered Nov 08 '22 16:11

user2223403