I’m been learning Linux and really enjoying the open source world, but still bump into some things that are easy on Windows but seemingly impossible in Ubuntu. The latest: Accessing the Android file system on my phone when I plug it into my Linux system. I just get “Folder is Empty”. HELP!
If you look at it from the perspective of getting the job done, rather than running a specific program, there’s not a lot you can do on a Windows PC nowadays that you can’t also accomplish on a major Linux distribution. Ubuntu is a great choice in this regard because its package management system and slick graphical user interface make it super user friendly. Including playing well with Android devices like a smartphone or tablet, actually. But… you do need to set things properly on the Android device too and that’s not obvious.
By default, Android devices are shut down so that unknown power sources can’t access the file system or touch any files, photos, videos, documents, music or similar. That wasn’t always the case and it wasn’t that long ago smart hackers were leaving power adapters in public places that surreptitiously sucked data off of phones being charged. Yikes. By defaulting to no data access at all, unknown chargers and docks are relegating to providing power and nothing else. Problem solved.
Since you do want to access your phone’s file system, however, you will need to re-enable USB file access. But let’s go through the steps…
FIX ANDROID FILE SYSTEM NOT VISIBLE TO LINUX
Here’s what I would guess you’re seeing when you plug your Android phone into your Ubuntu Linux system:
To fix it you’ll need to pick up your Android phone, go into the Settings app, and search for “usb”:
What you want is “USB Preferences” (at least, that’s what it’s called on Android 11. Earlier versions might have a slightly different name for this group of settings). Tap on “USB Preferences” on your Android device and you’ll be taken to this screen:
You can leave the top part as set, but it’s the “Use USB For” area that needs to be tweaked. As you can see, the default setting is “No data transfer”, so it’s no wonder that the Linux system has “Folder is Empty” when checking the device!
But what are all these options? Good question. “File transfer / Android Auto” is the most open, where the remote device can access everything (as is required for Android Auto). This includes contacts, call history, and much more. A small step down is “USB Tethering” which allows the connected system or device to use the Android unit as a network connection. Think “hotspot”. “MIDI” is a musical interface and can let musical devices like external keyboards interact in a limited way with your Android device. Finally, “PTP” is Picture Transfer Protocol and allows the connected device to only access photos and videos take on the phone, no contacts, text messages, phone logs, nothing else.
If we switch it from “No data transfer” to “PTP”, check out what happens!
ACCESS ONLY PHOTOS AND VIDEOS FROM ANDROID DEVICE
In the Linux file system, the error “Folder is Empty” is replaced by a somewhat cryptic icon:
The photos and related are within the “Internal shared storage”. Double click and it’ll open up just like a regular file system folder.
Here’s what’s inside:
You might think that the photos you’ve taken with your Android phone would be found in “Pictures“, but that’s not so. “Pictures” are screenshots and other system images, while “DCIM” (which rather awkwardly stands for Digital Camera IMage) is actually where all your photos are stored.
Let’s get the full file system accessible from your Linux system, not just pictures and photos!
ACCESS FULL ANDROID FILE SYSTEM FROM LINUX
On the Android phone, in the USB Settings, choose “File transfer / Android Auto” and the limited picture-only view will be replaced by something far more interesting:
Much more interesting, you now have access to everything, from ringtones to documents, notifications to the Android OS itself. Cool!
While we’re here, let’s now jump into the DCIM folder so you can see how photos are organized and shown:
No previews, but a double click and you can indeed see that the photos on the Android device are fully viewable and accessible on your Ubuntu Linux system too:
That’s it. Now you can copy photos, music files, movies, etc. to your computer as desired, or add new content to your Android device since it’s a two-way connection. Just avoid deleting anything in the “Android” folder to ensure you don’t break your OS and you’ll be fine. Good luck!
Pro Tip: I’ve been writing about Linux since the dawn of the operating system, and Unix before that. Please check out my extensive Linux help area for lots of additional tutorial content while you’re visiting. Thanks!