2

I am trying get Android and my Linux host talk to each other on Unix domain sockets.

I have my server on the host while the client is part of a library that emulator's software stack will make use of. The Android stack is not able to find the socket stream file that I have specified which happens to be on the host's filesystem.

Now, before you say "port forward", I have tried that and this is what I have tried based on my understanding of the abd forward command. I have not had success in this. Could you guys please point out the mistake and help me?

adb forward localfilesystem:/tmp/android_socket localfilesystem:android_socket

The path used in the host is /tmp/android_socket and that in the Android emulator is "android_socket"

4
  • development question?
    – Sid
    Jan 23, 2013 at 12:43
  • 2
    Not necessarily. IPC (inter-process communication) is useful in development, sure -- but there are certainly some "civil use-cases" as well. The question does not directly target at development, so I'd say it's valid here.
    – Izzy
    Jan 23, 2013 at 12:59
  • @Izzy That's what I thought!! :)
    – Sid
    Jan 23, 2013 at 14:07
  • 1
    Highly doubt the emulator has the capability to do just that! The Android stack is not able to find the socket stream file that I have specified which happens to be on the host's filesystem. Why not use plain old fashioned TCPIP ports instead of Unix Domain... think that's outside the scope of the emulator!
    – t0mm13b
    Jan 23, 2013 at 15:34

1 Answer 1

2

Unix domain sockets are meant to be used for interprocess communication on one host, not for inter host communication. Sockets that are located on the filesystem like you describe are not unix sockets, but named pipes, and are also limited for use on the same host.

For inter-host communication, you need to use network sockets of some kind.

1
  • 1
    +1 from me, correct, as I have commented previously above! You've confirmed it :)
    – t0mm13b
    Jan 28, 2013 at 18:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .