Take the 2-minute tour ×
Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. It's 100% free, no registration required.

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

1 Answer 1

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

 
discard

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.