SOLVED Logical Linux-like file structure on Android phone

I finally solved the messy file structure of Android!
While everyone has their own idea of a nice file system, it helps everyone if one person can get a specific system to work!
I've done that.
I want to show my current solution so that you can benefit. Also, you can suggest improvements.
I can't change the internal sdcard Android file structure except to create symbolic links to the external sdcard where appropriate, which is what I have effectively done below.
Here's the file structure that you can make ahead of time: /storage/extSdCard/data/ /storage/extSdCard/tmp/
These are created somehow by Android, so you can't avoid them: /storage/extSdCard/Android /storage/extSdCard/LOST.DIR /storage/extSdCard/.android_secure
In the "data" directory, you can create these managed directories: ./data/audio/ ./data/doc/ ./data/download ./data/map/ ./data/pic/ ./data/software/apk ./data/video
To tell Android to *use* those locations, install this freeware: Redirect File Organizer by Xavier Tobin (handles all the folders above) https://play.google.com/store/apps/details?id=com.tobino.redirectsfree&hl=en
There are only two steps in toto: 1. Define your desired file system <-- this is the hardest step! 2. Link everything to that system <-- this is the easiest step!
The linking itself only has two steps: a. Link all the programs that don't allow linking in their settings b. Link all the programs that do allow linking in their settings
Link all the programs that don't allow linking in their settings 0. Install Redirect File Organizer (freeware for multiple redirects): Redirect File Organizer by Xavier Tobin (this redirects many folders for free) https://play.google.com/store/apps/details?id=com.tobino.redirectsfree&hl=en a. Install & open: Redirect File Organizer by Xavier Tobin b. Check that "Background Service" = checked by default c. Press "Folder Redirect" d. Source folder: sdcard0/Download/ e. Destination folder: /storage/exSdCard/data/download/ f. Press the "Create Folder Redirect" button 1. DCIM: src: /storage/emulated/0/DCIM dst: /storage/extSdCard/data/pic 2. Documents: src: /storage/emulated/0/Documents dst: /storage/exSdCard/data/doc 3. Download: src: /storage/emulated/0/Download dst: /storage/extSdCard/data/download 4. EasyVoiceRecorder: src: /storage/emulated/0/EasyVoiceRecorder dst: /storage/extSdCard/data/audio/mic/EasyVoiceRecorder 5. MyTrails gpx: src: /storage/emulated/0/MyTrails/gpx dst: /storage/extSdCard/data/map/track/gpx 6. MyTracks kml: src: /storage/emulated/0/MyTracks/kml dst: /storage/extSdCard/data/map/track/kml 7. Ringtones: src: /storage/emulated/0/Ringtones dst: /storage/exSdCard/data/audio/ringtone 8. Screenshots: src: /storage/emulated/0/Pictures/Screenshots dst: /storage/extSdCard/data/pic/screenshot 9. Sounds: src: /storage/emulated/0/Sounds dst: /storage/extSdCard/data/audio/mic/sound 10. If you know of other apps to move, just suggest them.
Link all the programs that do allow linking in their settings 1. App Backup & Restore: Settings > Edit Backup Path > FROM: /storage/emulated/0/App_Backup_Restore TO: /storage/extSdCard/data/software/apk 2. AutomaticCallRecorder: Settings > Recording Path > FROM: /storage/emulated/0/CallRecordings/ TO: /storage/extSdCard/data/audio/phone/call 3. GTVoiceNotes: Settings > Recording folder FROM: /sdcard/GTVoiceNotes TO: /storage/extSdCard/data/audio/mic/GTVoiceNotes (it will create the folder on its own) 0. DONOTUSE: Camera: Settings > Storage > Memorycard Unfortunately you get no granularity other than FROM: /storage/emulated/0/DCIM TO: /storage/extSdCard/DCIM So just make sure that the Camera is set to: Camera: Settings > Storage > device 0. DONOTUSE: (default) Voice Recorder: Unfortunately you get no granularity other than Settings > Storage > (Device or Memorycard) So just make sure that the recorder is set to: Recorder: Settings > Storage > device 0. DONOTUSE: CameraFV5 FROM: "DCIM/CameaFV5 folder" It only has three choices, one of which is "custom" but it doesn't internal, external, or custom (but custom doesn't seem to work)
The whole point is to keep a logical file hierarchy on the external sdcard, which I have been able to do above. Any advice is appreciated, but, let's not argue over the "specific" hierarchy I chose, as that is the hardest thing to come up with, but, since everyone may wish to organize their socks differently, the actual organization is not an important point.
The important thing is that you *can* organize your files on Android! If you know of improvements, let me know!
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Jim Jansen wrote this copyrighted missive and expects royalties:

Thank you for sharing!
--
Q: Why did the WASP cross the road?
A: To get to the middle.
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
On Wed, 11 Nov 2015 06:27:22 -0500, Chris Ahlstrom wrote:

Thanks for recognizing that it can help all of us.
The hardest (and most controversial) part is always how "I" organize my socks versus how anyone else organizes theirs.
The second hardest part was finding a free app that created the symbolic links. At first, I tried a few "crippleware" apps, that only created one to three links, but I needed more than what they could offer for free:
This only allows 1 folder redirect (before asking you to pay): URSafe Media Redirector by Venator Software Media & Video https://play.google.com/store/apps/details?id=com.venator.app.mediaredirector
This also only allows 1 folder redirect (before asking you to pay): Photo & File Redirect by Nicola Rosada https://play.google.com/store/apps/details?id=rosadanicolasoft.fotoandfileredirect&hl=en
This at least allows 3 folder redirects (before asking you to pay): Automatic File Mover FREE by CM Apps https://play.google.com/store/apps/details?id=filemover.tst
In fact, I had used those 3 apps above and needed *more* links, so I stumbled upon Xavier Tobin's app merely in trying to find another free crippleware app that allowed more links:
Redirect File Organizer by Xavier Tobin (this redirects many folders for free) https://play.google.com/store/apps/details?id=com.tobino.redirectsfree&hl=en
Once I realized that Redirect File Organizer did everything I needed, I started over again and deleted everything and did it all with just that one app. Hooray!
By the way, could there have been an even *simpler* way to move folders.
Perhaps I could have just used a terminal and typed in a symbolic link? "ln -s /oldfilespec /newfilespec".
Does anyone here know whether it could have been that simple? $ mv /storage/DCIM /storage/extSdCard/data/pic/DCIM $ ln -s /storage/extSdCard/data/pic/DCIM /storage/DCIM
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

FAT (fat16, fat32, vfat) filesystems do not support symbolic (or hard) links.
If you can format your external card as ext2, ext3 or ext4, it may work with Android (since the underlying kernel is linux).
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
On Wed, 11 Nov 2015 16:40:43 +0000, Scott Lurndal wrote:

Thank you for that suggestion.
My external SD card is 134GB so it must be exfat, which you didn't list above so I wasn't sure if the card allowed symbolic links.
Googling, I find this article: Does or will exFAT support symlinks? http://earthwithsun.com/questions/232257/does-or-will-exfat-support-symlinks Which implies that exfat does not support symbolic links.
I also was unsure what the file system of the default Android internal sdcard was, so I googled and found that it's amazingly difficult to find an article that describes what the Android default file system is.
I found this which implies that Android defaults to yaffs2 and vfat, depending on what part of the Android file system we're looking at: What is Android's file system? http://stackoverflow.com/questions/2421826/what-is-androids-file-system
Since we're looking at moving things from the internal sdcard to the external sdcard, it seems that the internal file system is "vfat".
If the internal card is vfat and the external card is exfat, neither of which apparently support symbolic links, then, I see exactly why you said that "ln -s" wouldn't work. Too bad. It would be so easy if it did.
I wonder how the "Redirect File Organizer" app manages to run, in effect, a symbolic link?
Anyway, it works, so, here's my suggested method for storing on the external sd card all your important data, which then can be easily backed up over your local WiFi network (I abhor the cloud for a variety of reasons) to your hard disk drive or directly to DVD or other hard media.
1. Write down on paper your desired file system, with the rule being that all data that you want to back up later, should be under a single directory at some point high up. 2. Manually consider each of your apps, one by one, & note which apps store data you want to keep and backup later. (We'll call these the "important" apps.) 3. Make sure that each "important app" has a logical place to store its data on your external SD card. Usually that means you need to modify the hierarchy you defined in step 1 above. 4. Install "Redirect File Organizer" on our Android device. 5. One by one, for each "important app", redirect its data to the corresponding location on your external SD card. (Almost always you'll find you need to re-organize your hierarchy, e.g., I went through a half dozen iterations myself, and I'm very experienced at organizing Windows & Linux file system hierarchies). 6. When it comes time to back up the data, you can easily just back up your "data" hierarchy, confident that you have just what you need (no more, no less).
It's (almost) perfect!
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
On Wed, 11 Nov 2015 17:21:06 +0000, Jim Jansen wrote:

BTW, while I was googling to find that the Android default file system is both vfat (for /sdcard0) and yaffs2 (for everything else), I found this nice article which explains the *organization* of the Android partitions.
Android File System Structure/Architecture/Layout Details http://techblogon.com/android-file-system-structure-architecture-layout-details/
Android consists of six partitions: /boot ==> e.g., the android kernel /system ==> e.g., the android os /recovery ==> e.g., a backup boot recovery area /data ==> e.g., contains your applications /cache ==> e.g., frequently accessed data /misc ==> e.g., on/off system settings And two sd-card partitions: /sdcard ==> e.g., user data /sd-ext ==> e.g., more user data
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

HomeOwnersHub.com is a website for homeowners and building and maintenance pros. It is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.