{"id":15563986,"url":"https://github.com/jefflirion/adb_shell","last_synced_at":"2025-05-14T13:00:26.298Z","repository":{"id":38302914,"uuid":"208821897","full_name":"JeffLIrion/adb_shell","owner":"JeffLIrion","description":"A Python implementation of ADB with shell and FileSync functionality.","archived":false,"fork":false,"pushed_at":"2024-10-29T04:27:51.000Z","size":489,"stargazers_count":565,"open_issues_count":31,"forks_count":64,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-04-20T16:38:26.289Z","etag":null,"topics":["adb","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JeffLIrion.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-09-16T14:34:10.000Z","updated_at":"2025-04-19T07:57:26.000Z","dependencies_parsed_at":"2023-01-22T09:00:58.259Z","dependency_job_id":"9ac96b2d-9729-4cce-905a-50f625281df5","html_url":"https://github.com/JeffLIrion/adb_shell","commit_stats":{"total_commits":186,"total_committers":12,"mean_commits":15.5,"dds":"0.29032258064516125","last_synced_commit":"149ffbcff47b5a7fbd476cfdb26931e85be0c09c"},"previous_names":[],"tags_count":31,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JeffLIrion%2Fadb_shell","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JeffLIrion%2Fadb_shell/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JeffLIrion%2Fadb_shell/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JeffLIrion%2Fadb_shell/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JeffLIrion","download_url":"https://codeload.github.com/JeffLIrion/adb_shell/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251310851,"owners_count":21568998,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["adb","python"],"created_at":"2024-10-02T16:33:35.620Z","updated_at":"2025-04-28T11:50:28.617Z","avatar_url":"https://github.com/JeffLIrion.png","language":"Python","readme":"adb\\_shell\n==========\n\n.. image:: https://travis-ci.com/JeffLIrion/adb_shell.svg?branch=master\n   :target: https://travis-ci.com/JeffLIrion/adb_shell\n\n.. image:: https://coveralls.io/repos/github/JeffLIrion/adb_shell/badge.svg?branch=master\n   :target: https://coveralls.io/github/JeffLIrion/adb_shell?branch=master\n\n.. image:: https://pepy.tech/badge/adb-shell\n   :target: https://pepy.tech/project/adb-shell\n\n\nDocumentation for this package can be found at https://adb-shell.readthedocs.io/.\n\nPrebuilt wheel can be downloaded from `nightly.link \u003chttps://nightly.link/JeffLIrion/adb_shell/workflows/python-package/master/wheel.zip\u003e`_.\n\nThis Python package implements ADB shell and FileSync functionality.  It originated from `python-adb \u003chttps://github.com/google/python-adb\u003e`_.\n\nInstallation\n------------\n\n.. code-block::\n\n   pip install adb-shell\n\n\nAsync\n*****\n\nTo utilize the async version of this code, you must install into a Python 3.7+ environment via:\n\n.. code-block::\n\n   pip install adb-shell[async]\n\n\nUSB Support (Experimental)\n**************************\n\nTo connect to a device via USB, install this package via:\n\n.. code-block::\n\n   pip install adb-shell[usb]\n\n\nExample Usage\n-------------\n\n(Based on `androidtv/adb_manager.py \u003chttps://github.com/JeffLIrion/python-androidtv/blob/133063c8d6793a88259af405d6a69ceb301a0ca0/androidtv/adb_manager.py#L67\u003e`_)\n\n.. code-block:: python\n\n   from adb_shell.adb_device import AdbDeviceTcp, AdbDeviceUsb\n   from adb_shell.auth.sign_pythonrsa import PythonRSASigner\n\n   # Load the public and private keys\n   adbkey = 'path/to/adbkey'\n   with open(adbkey) as f:\n       priv = f.read()\n   with open(adbkey + '.pub') as f:\n        pub = f.read()\n   signer = PythonRSASigner(pub, priv)\n\n   # Connect\n   device1 = AdbDeviceTcp('192.168.0.222', 5555, default_transport_timeout_s=9.)\n   device1.connect(rsa_keys=[signer], auth_timeout_s=0.1)\n\n   # Connect via USB (package must be installed via `pip install adb-shell[usb])`\n   device2 = AdbDeviceUsb()\n   device2.connect(rsa_keys=[signer], auth_timeout_s=0.1)\n\n   # Send a shell command\n   response1 = device1.shell('echo TEST1')\n   response2 = device2.shell('echo TEST2')\n\n\nGenerate ADB Key Files\n**********************\n\nIf you need to generate a key, you can do so as follows.\n\n.. code-block:: python\n\n  from adb_shell.auth.keygen import keygen\n\n  keygen('path/to/adbkey')\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjefflirion%2Fadb_shell","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjefflirion%2Fadb_shell","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjefflirion%2Fadb_shell/lists"}