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.

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"

share|improve this question
    
development question? –  Sid Jan 23 '13 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 '13 at 12:59
    
@Izzy That's what I thought!! :) –  Sid Jan 23 '13 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 '13 at 15:34
add comment

1 Answer

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.

share|improve this answer
1  
+1 from me, correct, as I have commented previously above! You've confirmed it :) –  t0mm13b Jan 28 '13 at 18:22
add comment

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.