[Gen9 Android Development] trevd:
Cool! The build system is a beast and google themselves have do a lot of tweaking lately, Although Cyanogenmod have forked it because there is some difference between the 2, Kernel building is one example and I've notice google now have shell scripts for setting up new devices.

This is pretty old but still relevant, http://www.kandroid.org/online-pdk/guide/build_cookbook.html and you've probably already found the "Documentation" https://android.googlesource.com/platform/build/+/master/core/build-system.html

So to business. One of my friends own a GalaxyTab2 10.1. He's running CM10.1 Nightlies and it also has an External SDCard , I've been playing around with those files today but to be honest I'm not 100% sure what I'm expecting see, This "per user" storage is a bit of a shift.

Anyhow his is all working. I grabbed the p5100 device tree and had the vold and the storage_list out of it plus I used the directories specified int the init files for the devices.

The Init add some things we were missing , i.e Secondary storage

############### ESPRESSO ANYONE! ######################################
on init
mkdir /mnt/shell/emulated 0700 shell shell
mkdir /storage 0550 system sdcard_r
mkdir /storage/emulated 0555 root root
mkdir /storage/sdcard1 0775 system system
mkdir /storage/usbdisk0 0775 system system

export EXTERNAL_STORAGE /storage/emulated/legacy
export SECONDARY_STORAGE /storage/sdcard1
export EMULATED_STORAGE_SOURCE /mnt/shell/emulated
export EMULATED_STORAGE_TARGET /storage/emulated

# for backwards compatibility
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
symlink /storage/sdcard1 /extSdCard
symlink /storage/sdcard1 /mnt/extSdCard
symlink /storage/usbdisk0 /usbdisk0
symlink /storage/usbdisk0 /mnt/usbdisk0
#######################################################################

Here's the storage_list.xml, I mashed some Xoom settings in there as well

Finally the vold

# external sdcard
dev_mount sdcard1 /storage/sdcard1 auto /devices/platform/omap/omap_hsmmc.0/mmc_host/mmc1

#usb host device
dev_mount usbdisk0 /storage/usbdisk0 auto /devices/platform/omap/musb-omap2430/musb-hdrc/usb1

We need to change the usb1 to usb2 but other than that the Hardware is the same it appears :good:

What this has resulting in is my external sdcard mounts at /storage/sdcard1 without any problems.

Also when I plug it into linux I get both the external and Internal storage mounted ( It seems ), but I don't know whether that's how it should be or what.... previously the external card seemed to take over as the mtp endpoint when inserted so this setup is an improvement at least

I've also notice I intermittently get strange capacity In storage but then It disappears and just gives me mount and unmount options, I'll stick my neck out and say this is probably a bug rather than something which we're causing.

So my question is this really , What are we expecting from this storage?

One more thing.... The init files are in a bad way! we are missing directory creations which is releated to the obb stuff and probably more, It's my intention the fix them up a little and sort a proper ramdisk booting. This will help by making the rootfs volatile storage. which helps the boot process as stuff like the /mnt directories will be created with the correct permissions om each boot.

I'm off to look at the GalaxyTab again ... see If I can work anything out

Later!