Skip to main content

HsOjo's Python3 Android Debug Bridge. Support App/File/Input/Display Operation...

Project description


This project is written with Python 3, which aims to provide a simple and practical ADB function for Python 3.


The module currently integrates the following functions:

  • Application management (installation, uninstall, start, stop, clear data, freeze, get status, etc.)
  • File management (pull, push, copy, move, delete, view and other basic functions)
  • Input control (text, key, click, slide)
  • Display management (adjust resolution, DPI, screenshot)

In the future, corresponding functions will be added according to the requirements.

How to use

As shown below.


  • Starting from version 0.0.3, the module will be uploaded to pypi. You can also install it directly using pip.
pip install OjoPyADB

Manual Installation

  1. Open the release page to find the latest version of the installation file.

  2. (Optional) download to this machine through browser, and then use pip to execute the following command to install.

pip install OjoPyADB-0.0.1-py3-none-any.whl
  • Of course, you can also directly copy the download link of the installation package and use pip for online installation. (execute the following command)
# Note: that the link here is version 0.0.1, please replace it with the latest version.
pip install

Example code

Here are some simple usage. For specific parameters, please refer to the code prompt of IDE. Try more.

from pyadb import PyADB, KeyCode

adb = PyADB()
if len(adb.devices) > 0:
    device = list(adb.devices.values())[0]
    print(, device.state)
    device.input.text('Hello World!\tThis input method is ASCII only...')
    img = device.display.screen_cap()
    logcat = device.logcat
    logcat.set_filterspecs(**{'ActivityManager': logcat.PRIORITY_INFO})


See the "pyadb/demo" directory.

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

OjoPyADB-0.2.0.tar.gz (8.9 kB view hashes)

Uploaded Source

Built Distribution

OjoPyADB-0.2.0-py3-none-any.whl (14.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