How to access the Android file system via the terminal or Android File Transfer on Mac
I own a Sony Xperia S and a Mac. Problem with the Sony Bridge for Mac is that it’s terribly slow. It takes minutes to get access to your files. I also had a problem that I couldn’t access files that are added to the device since the ICS (4.0.4) update. With the latest upgrade (6.1.A.2.45, 26-aug-2012) this issue is fixed. This blog should also work for other phones, if other steps are needed please add a comment, then I’ll update the article.
Android File Transfer
The easiest solution is to use Android File Transfer. With this application you can drag and drop files from and to your local file system. You have to disable the auto-start function of Sony Bridge for Mac (under Preferences), otherwise you won’t be able to access the files.
When you want to have more control you can access your phone with a *nix command prompt. You have to install the Android SDK for this.
Go the the prefences of your phone, developer options and enable usb debugging. Note that this is intended for developers only and gives full access to your device via usb! Disable it after your done and you’re not sure whether it’s safe to leave it on.
Under the platform-tools directory of the SDK home there’s an application called adb. ADB (short for Android Debug Brdige) is a nifty command line tool to communicate with your phone.
To browse the filesystem of your phone run the
./adb shell command in the SDK-home directory. This will open a console where you can enter simple commands like
ll. The files are probably located in
/mnt/sdcard on your Android device.
Now that your familiar with your file system exit the prompt with ctrl-d.
When you want to copy files from your device to your local computer use adb pull. Example:
./adb pull /mnt/sdcard/DCIM/100ANDRO/. /tmp/.
adb push you can push files to your phone.