Using other block device when conecting Android device to computer as USB storage When I connect the device to computer, it makes sdcard available to it, as in card reader.

How to make it share not sdcard, but other block device or file?
On my device (Sony Ericsson Xperia X10) it is, for example:

echo /sdcard/debian.ext2 &gt; /sys/devices/platform/msm_hsusb/gadget/lun0/file


After it the content of file becomes available on the host. Can write to sdcard file without unmounting it from android.