A Python implementation of ADB with shell and FileSync functionality.
Project description
Documentation for this package can be found at https://adb-shell.readthedocs.io/.
This Python package implements ADB shell and FileSync functionality. It originated from python-adb.
Installation
pip install adb-shell
Example Usage
(Based on androidtv/adb_manager.py)
from adb_shell.adb_device import AdbDeviceTcp
from adb_shell.auth.sign_pythonrsa import PythonRSASigner
# Connect (no authentication necessary)
device1 = AdbDeviceTcp('192.168.0.111', 5555, default_timeout_s=9.)
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.)
device2.connect(rsa_keys=[signer], auth_timeout_s=0.1)
# Send a shell command
response1 = device1.shell('echo TEST1')
response2 = device2.shell('echo TEST2')
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
adb_shell-0.1.4.tar.gz
(23.3 kB
view hashes)
Built Distribution
adb_shell-0.1.4-py3-none-any.whl
(30.2 kB
view hashes)
Close
Hashes for adb_shell-0.1.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 17f8b67e06b1ec0a142647129f50497f3614408e563b9fc14f6c91e3261f2fc7 |
|
MD5 | d87413ca027624046fa123a28263c6d3 |
|
BLAKE2b-256 | c089a0da4365f5bd7a3dfddacc695bd4bcffb38521e439f3ea8a52acebf0a952 |