1

I am trying to send some data (in the form of raw bytes ) from my device to host(connected through USB). What can be the different ways to do it ??

One idea is to write the raw bytes in one of the ring buffers (in /dev/log/) and let the logcat read it. But logcat expects the formatted strings in ring buffers, Is there a way to modify the behavior of logcat ??

or is there a way to create a tcp connection between host and device to transfer the data???

Any other suggestions ??

Thanks.

1 Answer 1

0

adb forward is your friend. You can do port forwarding and then run TCP servers on either the host or the device.

EDIT: see http://developer.android.com/guide/developing/tools/adb.html#forwardports for more detail.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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