I have a script that I want to run on my Android phone using the ADB and SL4A. This script worked fine on my Windows machine but when I've tried it from Linux I get the following error:
Traceback (most recent call last):
File "test_device.py", line 12, in <module>
droid = android.Android()
File "device/android.py", line 34, in __init__
self.conn = socket.create_connection(addr)
File "/usr/lib/python2.7/socket.py", line 553, in create_connection
for res in getaddrinfo(host, port, 0, SOCK_STREAM):
socket.gaierror: [Errno -2] Name or service not known
The script I'm running is:
import sys
import random
import time
import redis
sys.path.append("lib")
sys.path.append("device")
import android
import instructions
droid = android.Android()
rdb = redis.Redis()
data = []
It fails when I try to setup the droid. Any help would be appreciated.