Here is a way to create a socket connection between Android phone and Ubuntu 14.04 desktop.
Pre-requites:
1. Android Terminal Emulator App (On Android Device)
2. Android SDK installed on host computer
create a socket on the device using nc command:
jai@jai-server:~$ adb shellThe above command could be executed on the terminal Emulator as follows:
shell@mako:/ $ nc -l -p 1234
---//
On the host machine:
jai@jai-server:~$ adb forward tcp:1235 tcp:1234Connection is established and you are good to go. Start writing on any of the device. It should be reflected on other device.
jai@jai-server:~$ nc localhost 1235
--//
Reference: http://bharathisubramanian.wordpress.com/2012/03/10/android-socket-communication-thru-adb/
No comments:
Post a Comment