Skip to content
This repository has been archived by the owner on Jan 10, 2023. It is now read-only.

socket.timeout: timed out #127

Open
ghost opened this issue Sep 27, 2018 · 0 comments
Open

socket.timeout: timed out #127

ghost opened this issue Sep 27, 2018 · 0 comments

Comments

@ghost
Copy link

ghost commented Sep 27, 2018

Traceback (most recent call last):
File "test.py", line 16, in
File "venv/lib/python3.5/site-packages/adb/adb_commands.py", line 131, in ConnectDevice
Traceback (most recent call last):
File "run2.py", line 17, in
device.ConnectDevice(serial=serial, default_timeout_ms=10000)
File "venv/lib/python3.5/site-packages/adb/adb_commands.py", line 131, in ConnectDevice
self._handle = common.TcpHandle(serial, timeout_ms=default_timeout_ms)
File "venv/lib/python3.5/site-packages/adb/common.py", line 309, in init
self._connection = socket.create_connection((host, port), timeout=timeout)
File "/usr/lib/python3.5/socket.py", line 711, in create_connection
raise err
File "/usr/lib/python3.5/socket.py", line 702, in create_connection
sock.connect(sa)
socket.timeout: timed out

my code:

import os.path as op

from adb import adb_commands
from adb import sign_m2crypto

# KitKat+ devices require authentication
signer = sign_m2crypto.M2CryptoSigner(
    op.expanduser('~/.android/adbkey'))

# Connect to the device
device = adb_commands.AdbCommands()
# device.ConnectDevice(
#     rsa_keys=[signer], serial=b'111.111.111.111:5000', default_timeout_ms=30000)

serial = '111.111.111.111:5000'.encode('utf-8')
print(serial)
device.ConnectDevice(serial=serial, default_timeout_ms=10000)
print('connected')

device.Shell('ls /sdcard')
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants