I have investigated the Android file system to find possibilities to make use of the SD card. Some things are officially documented, some I have tried on a Samsung Galaxy S2 and the AVD.
- the directory returned by the java framework call "Context.getExternalFilesDir()" (usually /mnt/sdcard) is mounted "noexec". - secure storage, as referred to by Raistmer (e.g. /mnt/secure or /mnt/asec) is owned by the system and not writable for applications. - the actual file structure varies greatly between device vendors and/or Android versions. Therefore we should rely on the paths returned by the java framework instead of hard coding it. "Context.getExternalFilesDir()" for external, and "Context.getDir()" for internal storage. - internal storage (usually /data) is unrestricted to the owning application, but not readable to others. - installing an application on the SD card, or moving it there, as offered by the Android UI or specified in the Manifest file, only affects the application package APK. Not the BOINC client or the scientific apps. [1] - internal/external storage does not necessarily refer to removable/non-removable storage. My Samsung has 80% of it's built-in storage as "USB storage", which has the same restrictions like an SD card. [2] What can we do to make use of external storage? - bypassing the noexec restriction like mentioned here [3]. Which will break sooner or later. AFAIK the native boinc way... - having boinc/projects/ on the external storage and link all files but the binaries in boinc/slots/ as suggested by Bernd. - what mechanism should we use to pass the paths (external as well as internal storage - currently hard coded) returned from the java framework to the BOINC client? In all cases should be kept in mind that the SD card can be removed at any time! [1] http://developer.android.com/guide/topics/data/install-location.html [2] http://developer.android.com/guide/topics/data/data-storage.html#filesExternal [3] http://linux.die.net/man/8/mount _______________________________________________ boinc_dev mailing list [email protected] http://lists.ssl.berkeley.edu/mailman/listinfo/boinc_dev To unsubscribe, visit the above URL and (near bottom of page) enter your email address.
