Skip to main content

asyncio version of usefuladb

Project description

asyncio version of usefuladb

Documentation: https://github.com/hansalemaos/usefuladb

pip install usefuladbasyncio

# Tested against Android 11 / Bluestacks / Python 3.11 / Windows 10

from usefuladbasyncio import AdbAsyncIO
import time

adb = AdbAsyncIO(
    adb_path=r"C:\ProgramData\chocolatey\lib\adb\tools\platform-tools\adb.exe",
    device_serial="127.0.0.1:5555",
    use_busybox=False,
    connect_to_device=True,
    invisible=True,
    print_stdout=True,
    print_stderr=True,
    limit_stdout=None,
    limit_stderr=None,
    limit_stdin=None,
    convert_to_83=True,
    wait_to_complete=15,
    flush_stdout_before=True,
    flush_stdin_before=True,
    flush_stderr_before=True,
    su=False,
    exitcommand="xxxCOMMANDxxxDONExxx",
    commandtimeout=10,
    escape_filepath=True,
    capture_stdout_stderr_first=True,
    global_cmd=False,
    global_cmd_timeout=15,
    use_eval=False,
    eval_timeout=30,
    stdoutsleep=0.5,
    stderrsleep=0.5,
    asynciosleep=0,
    daemon=True,
    reconnect_interval=2,
)
while True:
    # can reconnect if the connection gets lost
    a, b = adb.execute_sh_command(
        "ls /sdcard/ -R",
        stdoutsleep=1,
        stderrsleep=1,
        asynciosleep=0,
        disable_print_stdout=True,
        disable_print_stderr=True,
    )
    c, d = adb.sh_ls_folder("/sdcard/") # i haven't tested all methods of usefuladb yet
    print(c, d)
    print([a, b])
    time.sleep(1)

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

usefuladbasyncio-0.10.tar.gz (7.2 kB view details)

Uploaded Source

Built Distribution

usefuladbasyncio-0.10-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

Details for the file usefuladbasyncio-0.10.tar.gz.

File metadata

  • Download URL: usefuladbasyncio-0.10.tar.gz
  • Upload date:
  • Size: 7.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for usefuladbasyncio-0.10.tar.gz
Algorithm Hash digest
SHA256 9395881bc45dc05938dfd961b913eb730cebbd8d4dcf164ba8737b1ede240dc6
MD5 61228169aaf832b70942089642efbffe
BLAKE2b-256 575a78ea6d02b4a8dd6f42cbb00ef3987cc71f72615961c2ea80651b864bed57

See more details on using hashes here.

File details

Details for the file usefuladbasyncio-0.10-py3-none-any.whl.

File metadata

File hashes

Hashes for usefuladbasyncio-0.10-py3-none-any.whl
Algorithm Hash digest
SHA256 b7878bb8074db301bf2eb78b692c2cf3754c088a79cecee983c937430026c45a
MD5 ec0f41537b9f0fee51ab7fb2336187ab
BLAKE2b-256 a1b2aa537a87f943b98b5634bd4aa8326921d01ffe4f3b6828fc0ace89f7ac36

See more details on using hashes here.

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