I have a rooted Sony Tablet S, and one of my issues with it is that there is little onboard storage. The Sony-recommended way of dealing with this is to transfer files between internal and external storage, as many apps do not have access to the external storage.
Having rooted the device, however, I am able to use mount -o bind /mnt/sdcard2 /mnt/sdcard/2
to mount this. I was then intending to rename the media folder on my external sdcard to .media, and use mount -o bind /mnt/sdcard2/.media/$F /mnt/sdcard/media/$F/external
for each folder $F
in that directory. The problem with this is that on removal of the external sdcard, or on reboot, these mounts are lost.
On my Maemo phone I did something similar, and was able to have this mount behaviour occur when the external storage was attached. As Maemo5 is a truly open OS I was able to do this fairly easily, and there was a lot of community support.
When trying to do the same under Android I have come across an app called Tasker that performs actions as I would need, however this is paid software and I would prefer not to have to install something that performs actions which should be build into the operating system.
TLDR;
I'd like to know what is actually happening on my device when an SDcard is inserted - are scripts run? Are signals sent which could be used to trigger scripts? Has anyone attempted to do similar (I don't understand why this would not be the default behaviour to be honest - the fact that external storage is hidden from apps is frustrating to say the least)