7 ms·
One thing that's bugging me about Android right now - there's no widely accepted location standard for storing data on the SD card. Some of the "in the box" app
by barrkel 17y ago
One thing that's bugging me about Android right now - there's no widely accepted location standard for storing data on the SD card. Some of the "in the box" apps put all their data inside the Android directory, but others use "data", some use the Java-style reversed DNS (com.example.App), others use the same but with dashes (com-example-App), and others again just dump their guts into the root directory (espeak-data, amazonmp3) etc.
It all reminds me of DOS days when people would install their apps in subdirs of the root directory, or even worse, neophytes who installed their apps in the root directory itself. It really makes me feel like I'm living in the wild west when I put files on the SD card - the data might be safe today, but what if some app tomorrow happens to choose the same directory name?
There definitely needs to be more guidance given here. A harder line like, store app-specific data in Android/data/com.example.YourApp, media of kind x in <here>, etc. would be very helpful.
For example, it's the blind leading the blind here:
http://androidforums.com/updates-cupcakes/5930-definitive-androids-folder-structure.html http://androidforums.com/updates-cupcakes/5930-definitive-an...
And calls for clarification go unanswered:
http://osdir.com/ml/AndroidDevelopers/2009-08/msg00721.html http://osdir.com/ml/AndroidDevelopers/2009-08/msg00721.html
- Tichy 17y agoHaven't reached that aspect yet (trying to stay in HTML), but I am surprised. I thought apps would be shielded from each other, which would imply they could not mess with each others files. Well, I am curious to learn more about it.
- thwarted 17y agoBecause of some weird need for backward compatibility here, the sdcard needs to be dos/vfat formatted so file perms can not be enforced. This makes USB mounting work on all OSes, but this means many apparently need the "can modify sdcard contents" perm, which is global for the entire sdcard. I think this is why apps can not be stored and run from the sdcard currently.
- barrkel 17y agoThe OS presents a file system API to programs. It isn't necessary for the characteristics of the underlying file system to be directly reflected in the view programs see. It would be perfectly possible for the OS to lie to processes, somewhat like chroot, and present each an idealized and sandboxed view of the sdcard.