Jump to content

What's Android's file/folder hierarchy and structure?

BrianSawyer's Photo
Posted May 05 2010 09:57 AM

From my Android mailbag today, I received this question from Brian Baldwin:


I am computer savvy, began building PCs in the late 70's - early 80's, beginning with DOS 1.0. I know a little basic, a little UNIX, etc., but am not a programmer. I am as psyched about my HTC Hero Android as I am about Windows 7. I love it! Like all users, I download and delete apps on a fairly regular basis. I also rooted my phone to OS 2.1.

Here's my (minor) dilemma; the deleted apps (I think) leave artifacts, files and folders. When I rooted the phone, photos and other files are now in different folders. I also see twice the number of photos and wallpaper as the system seems to be creating logo sized duplicates.

I've been searching, without success, for something that will tell me what the file/folder hierarchy is. What's the structure? How to determine which apps use which folders. Which folders are used by the OS and the mobile OS? I want to be able to keep the memory and SD clean just as I do with my PCs, as well as copy files to the appropriate folders so that they will appear correctly in whatever app should be calling them up.

I hope all this makes sense. And I hope you know of some source of information, be it a book, blog, or other, that will provide some insight in this domain.

Can anyone help Brian out?

Best Android Apps

Learn more about this topic from Best Android Apps.

With so many Android apps available, it's been difficult to find the best of the bunch -- until now. Best Android Apps leads you beyond the titles in Android Market's "Top Paid" and "Top Free" bins to showcase apps that will truly delight, empower, and entertain you. The authors have tested and handpicked more than 200 apps and games, each listed with a description and details highlighting the app's valuable tips and special features.

See what you'll learn

2 Subscribe

3 Replies

+ 1
  adfm's Photo
Posted May 07 2010 12:49 PM

If you're looking for a decent file manager for Android I'd suggest checking out Astro. It's one of the more popular file managers out there and for good reason. It comes packed with extra features that make it the swiss army knife of file browsing. You get tools like an application manager, backup, SD usage, and process manager. It also allows you to connect to your servers via SFTP. How cool is that?

Here's a rather dated video that shows it off some:

You can download it using this handy QR code:

Attached Image
  zigurd's Photo
Posted May 07 2010 03:02 PM

Files are sandboxed on a per-application basis. The databases and files created and stored by an app are removed when the app is removed.

If an app uses other ContentProvider components to store files or data in a database, those files and database items will not be removed because they are stored by the component that provided an interface to store information. Music and pictures are common examples of data that is often stored through interfaces provided by components other than the app that creates or accesses them.

There is no general pool of files every app can access. If an app has "left behind" pictures, for example, the gallery app, or any other app that can delete a picture can get rid of them. Nor is there a structure to files on Android that is available to app developers to manipulate. That's up to the components that store data.

An overview of ContentProvider components - both how to use ones that are part of the Android framework and how to create your own - is found here: http://developer.and...-providers.html

You will see from this overview that how data is stored is always abstracted by software that manages the storage.
 : May 11 2010 11:18 AM
Thanks for the answers. I wanted to share Brian's response:


I used the Astro file manager before I rooted my phone, and it is a good little app. The ROM that we used to root my device included ES File Explorer which is great. But that
doesn't provide the file association. Zigurd's answer is exactly what I was looking for. Thanks to everyone for the help!