How to access all your photos on your Samsung S4 (Internal and Sdcard)

I had just come back from a trip with hundreds of photos on my new Samsung S4. I plug it into my computer to backup them and make some room in the phone, and then I'd got this annoying dialog popping up.

Error accessing SDCard pictures on Samsung S4Error accessing SDCard pictures on Samsung S4

A quick search shows that some other people is having this problem. The solution I found was to root the device and install some software to enable USB Mass Storage. That is nice and probably I will do it soon, but it takes some time to go through the main process. Moreover, it looks like you have to use some Windows tools.

So the solution I am using currently is transferring the images using a script that calls adb to pull the files from the phone file system. To use this solution you need:

  • 1. Enable Debug mode. Go to Settings > About Device > and Tap 7 times on the Build Number button. This will enable the Developers Options Menu on the Phone Settings
  • 2. Enable USB Debugging on the Developers Options
  • 3. Install Android SDK or one of those standalone adb packages out there, so you can execute adb

Now you can just pull the files from the phone. I wrote a very basic shell script to automate the process.


#. /usr/local/bin/

echo "Copying Internal memory Photos"
mkdir internal
adb pull /storage/emulated/legacy/DCIM/Camera ./internal/.

echo "Copying External Card Photos"
mkdir sdcard
adb pull /storage/extSdCard/dcim/Camera/ ./sdcard/.

The second line just sets my environmental variables to get adb in the path. That will be different in your setup, or not needed at all depending on how do you configure the access to adb. Then, the script just pulls the pictures from the internal Phone memory (/storage/emulated/legacy/DCIM/Camera) in one folder and the photos stored in the sdcard (/storage/extSdCard/dcim/Camera/) in another folder. That's it