Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
I would assume that this is highly hardware dependent and impossible without writing and replacing drivers, at best. – Matthew Read Nov 15 '11 at 20:47
How it works? How to make "Use USB connection to transfer files" action manually, from console? – Vi0 Nov 17 '11 at 8:16
up vote 0 down vote accepted

On my device (Sony Ericsson Xperia X10) it is, for example:

echo /sdcard/debian.ext2 > /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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.