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?

  • 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

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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