Skip to main content

A Python implementation of ADB with shell and FileSync functionality.

Project description

https://travis-ci.com/JeffLIrion/aio_adb_shell.svg?branch=master https://coveralls.io/repos/github/JeffLIrion/aio_adb_shell/badge.svg?branch=master

Documentation for this package can be found at https://aio-adb-shell.readthedocs.io/.

This Python package implements ADB shell and FileSync functionality. It originated from python-adb.

Installation

pip install aio-adb-shell

Example Usage

(Based on androidtv/adb_manager.py)

from aio_adb_shell.adb_device import AdbDeviceTcp
from aio_adb_shell.auth.sign_pythonrsa import PythonRSASigner

# Connect (no authentication necessary)
device1 = AdbDeviceTcp('192.168.0.111', 5555, default_timeout_s=9.)
await device1.connect(auth_timeout_s=0.1)

# Connect (authentication required)
with open('path/to/adbkey') as f:
    priv = f.read()
signer = PythonRSASigner('', priv)
device2 = AdbDeviceTcp('192.168.0.222', 5555, default_timeout_s=9.)
await device2.connect(rsa_keys=[signer], auth_timeout_s=0.1)

# Send a shell command
response1 = await device1.shell('echo TEST1')
response2 = await device2.shell('echo TEST2')

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aio_adb_shell-0.0.1.tar.gz (22.5 kB view hashes)

Uploaded Source

Built Distribution

aio_adb_shell-0.0.1-py3-none-any.whl (30.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page