# asyncio version of usefuladb
## Documentation: https://github.com/hansalemaos/usefuladb
### pip install usefuladbasyncio
```python
# 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)
```
Raw data
{
"_id": null,
"home_page": "https://github.com/hansalemaos/usefuladbasyncio",
"name": "usefuladbasyncio",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "android,adb",
"author": "Johannes Fischer",
"author_email": "aulasparticularesdealemaosp@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/57/5a/78ea6d02b4a8dd6f42cbb00ef3987cc71f72615961c2ea80651b864bed57/usefuladbasyncio-0.10.tar.gz",
"platform": null,
"description": "\r\n\r\n\r\n# asyncio version of usefuladb\r\n\r\n## Documentation: https://github.com/hansalemaos/usefuladb\r\n\r\n### pip install usefuladbasyncio\r\n\r\n\r\n```python\r\n# Tested against Android 11 / Bluestacks / Python 3.11 / Windows 10\r\n\r\nfrom usefuladbasyncio import AdbAsyncIO\r\nimport time\r\n\r\nadb = AdbAsyncIO(\r\n adb_path=r\"C:\\ProgramData\\chocolatey\\lib\\adb\\tools\\platform-tools\\adb.exe\",\r\n device_serial=\"127.0.0.1:5555\",\r\n use_busybox=False,\r\n connect_to_device=True,\r\n invisible=True,\r\n print_stdout=True,\r\n print_stderr=True,\r\n limit_stdout=None,\r\n limit_stderr=None,\r\n limit_stdin=None,\r\n convert_to_83=True,\r\n wait_to_complete=15,\r\n flush_stdout_before=True,\r\n flush_stdin_before=True,\r\n flush_stderr_before=True,\r\n su=False,\r\n exitcommand=\"xxxCOMMANDxxxDONExxx\",\r\n commandtimeout=10,\r\n escape_filepath=True,\r\n capture_stdout_stderr_first=True,\r\n global_cmd=False,\r\n global_cmd_timeout=15,\r\n use_eval=False,\r\n eval_timeout=30,\r\n stdoutsleep=0.5,\r\n stderrsleep=0.5,\r\n asynciosleep=0,\r\n daemon=True,\r\n reconnect_interval=2,\r\n)\r\nwhile True:\r\n # can reconnect if the connection gets lost\r\n a, b = adb.execute_sh_command(\r\n \"ls /sdcard/ -R\",\r\n stdoutsleep=1,\r\n stderrsleep=1,\r\n asynciosleep=0,\r\n disable_print_stdout=True,\r\n disable_print_stderr=True,\r\n )\r\n c, d = adb.sh_ls_folder(\"/sdcard/\") # i haven't tested all methods of usefuladb yet\r\n print(c, d)\r\n print([a, b])\r\n time.sleep(1)\r\n\r\n```\r\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "asyncio version of usefuladb",
"version": "0.10",
"project_urls": {
"Homepage": "https://github.com/hansalemaos/usefuladbasyncio"
},
"split_keywords": [
"android",
"adb"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "a1b2aa537a87f943b98b5634bd4aa8326921d01ffe4f3b6828fc0ace89f7ac36",
"md5": "ec0f41537b9f0fee51ab7fb2336187ab",
"sha256": "b7878bb8074db301bf2eb78b692c2cf3754c088a79cecee983c937430026c45a"
},
"downloads": -1,
"filename": "usefuladbasyncio-0.10-py3-none-any.whl",
"has_sig": false,
"md5_digest": "ec0f41537b9f0fee51ab7fb2336187ab",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 8003,
"upload_time": "2024-03-14T04:05:47",
"upload_time_iso_8601": "2024-03-14T04:05:47.340984Z",
"url": "https://files.pythonhosted.org/packages/a1/b2/aa537a87f943b98b5634bd4aa8326921d01ffe4f3b6828fc0ace89f7ac36/usefuladbasyncio-0.10-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "575a78ea6d02b4a8dd6f42cbb00ef3987cc71f72615961c2ea80651b864bed57",
"md5": "61228169aaf832b70942089642efbffe",
"sha256": "9395881bc45dc05938dfd961b913eb730cebbd8d4dcf164ba8737b1ede240dc6"
},
"downloads": -1,
"filename": "usefuladbasyncio-0.10.tar.gz",
"has_sig": false,
"md5_digest": "61228169aaf832b70942089642efbffe",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 7246,
"upload_time": "2024-03-14T04:05:49",
"upload_time_iso_8601": "2024-03-14T04:05:49.488335Z",
"url": "https://files.pythonhosted.org/packages/57/5a/78ea6d02b4a8dd6f42cbb00ef3987cc71f72615961c2ea80651b864bed57/usefuladbasyncio-0.10.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-03-14 04:05:49",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "hansalemaos",
"github_project": "usefuladbasyncio",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [
{
"name": "kthread",
"specs": []
},
{
"name": "usefuladb",
"specs": []
}
],
"lcname": "usefuladbasyncio"
}