[Gen9 Android Development] Quallenauge:
Thanks for this. I will correct this.

May be correct.

To sum up my changes for this, I uploaded my current image: http://www.4shared.com/file/iRf9eJja/archos_imagetar.html

And this are the storage points:

/etc/vold.fstab (The specific vold.A80S.rc file is not acceses, because of the non-archos vold binary).

#dev_mount volume_internal /mnt/storage_usb auto /devices/platform/usb_mass_storage/lun0 /class/block/mmcblk0
dev_mount volume_sdcard /storage/sdcard1 auto /devices/platform/omap/omap_hsmmc.0/mmc_host/mmc1
dev_mount volume_external /storage/usbdisk0 auto /devices/platform/omap/musb-omap2430/musb-hdrc/usb2/2-1/2-1:1.0 /devices/platform/omap/usbhs_omap/ehci-omap.0/usb1/1-1/1-1:1.0

overlay/frameworks/base/core/res/res/xml/storage_list.xml

<StorageList xmlns:android="http://schemas.android.com/apk/res/android">
<!-- internal emulated storage -->
<storage android:mountPoint="/mnt/sdcard"
android:storageDescription="@string/storage_internal"
android:emulated="true"
android:primary="true"
android:mtpReserve="100" />
<storage android:mountPoint="/storage/sdcard1"
android:storageDescription="@string/storage_sd_card"
android:primary="false"
android:removable="true" />

<storage android:mountPoint="/storage/usbdisk0"
android:storageDescription="@string/storage_usb"
android:primary="false"
android:removable="true" />
</StorageList>

init.rc

on early-init
# create mountpoints
mkdir /mnt 0775 root system
...
on init
# See storage config details at http://source.android.com/tech/storage/
mkdir /mnt/shell 0700 shell shell
mkdir /storage 0050 root sdcard_r

# Directory for putting things only root should see.
mkdir /mnt/secure 0700 root root
# Create private mountpoint so we can MS_MOVE from staging
mount tmpfs tmpfs /mnt/secure mode=0700,uid=0,gid=0

# Directory for staging bindmounts
mkdir /mnt/secure/staging 0700 root root

# Directory-target for where the secure container
# imagefile directory will be bind-mounted
mkdir /mnt/secure/asec 0700 root root

# Secure container public mount points.
mkdir /mnt/asec 0700 root system
mount tmpfs tmpfs /mnt/asec mode=0755,gid=1000

# Filesystem image public mount points.
mkdir /mnt/obb 0700 root system
mount tmpfs tmpfs /mnt/obb mode=0755,gid=1000
...

/system/etc/init/init.archos.rc

write /sys/class/rfkill/rfkill0/state 0

# See storage config details at http://source.android.com/tech/storage/
mkdir /mnt/shell/emulated 0700 shell shell
mkdir /storage/emulated 0555 root root

export EXTERNAL_STORAGE /storage/emulated/legacy
export EMULATED_STORAGE_SOURCE /mnt/shell/emulated
export EMULATED_STORAGE_TARGET /storage/emulated
export SECONDARY_STORAGE /mnt/storage_sd_card
export SECOND_VOLUME_STORAGE /mnt/storage_sd_card

# Support legacy paths
symlink /storage/emulated/legacy /sdcard
symlink /storage/emulated/legacy /mnt/sdcard
symlink /storage/emulated/legacy /storage/sdcard0
symlink /mnt/shell/emulated/0 /storage/emulated/legacy

and

/system/etc/init.A80S.rc

on early-boot
...
#virtual sdcard daemon running as media_rw (1023)
service sdcard /system/bin/sdcard /data/media /mnt/shell/emulated 1023 1023
class late_start

With this I get a external storage mounted with the following permissions:

/ # ls -l /storage/
dr-xr-xr-x 2 0 0 4096 Jan 21 14:12 emulated
lrwxrwxrwx 1 0 0 24 Jan 21 14:12 sdcard0 -> /storage/emulated/legacy
d---rwxr-x 4 1000 1015 32768 Jan 1 1970 sdcard1
drwxrwxrwx 2 0 0 4096 Jan 21 14:15 usbdisk0

However, with the terminal app, I cant cd into this (Permission denied).

I also can't switch to /storage/emulated/0 within the terminal app (Permission denied).

(From adb, there seems no folder "0" in /storage/emulated/ - it may virtually created on app start?

LogCat from Boot to gallery

Also the gallery process is closing, because he has no access to the external memory:

Relevant gallary part...

I added some debug statements in cutils, note the output of: fs_prepare_dir::

Edit: Maybe this is interesting: http://www.mailinglistarchive.com/html/android-platform@googlegroups.com/2012-12/msg00029.html

Man, what and where is the key point?! It seems that I'm breaking my brain here :eek: