Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
A

adb-enhanced

> 测试质量
Open source

Swiss-army knife for Android testing and development ⛺

1.4K stars0 likes4 views
WebsiteGitHub

About

Swiss-army knife for Android testing and development ⛺

ADB Enhanced

ADB-Enhanced is a Swiss army knife for Android testing and development.

A command-line interface to trigger various scenarios like screen rotation, battery saver mode, data saver mode, doze mode, and permission grant/revocation. It's a wrapper around adb and not a replacement.

Release announcement

See Release announcement

Installation

Recommended

sudo pip3 install adb-enhanced

Alternative on Mac OS via Homebrew

brew install adb-enhanced

Note

  1. sudo pip install adb-enhanced works only for Python 3. Python 2 is no longer supported.
  2. If you don't have sudo access or you are installing without sudo then adbe might not be configured correctly in the path.
  3. To set up bash/z-sh auto-completion, execute sudo pip3 install infi.docopt-completion && docopt-completion $(which adbe) after installing adb-enhanced.

Examples

Device configuration

  • Turn doze mode on

    adbe doze on

  • Turn mobile-data off

    adbe mobile-data off

  • Turn on battery saver

    adbe battery saver on

  • Don't keep activities in the background

    adbe dont-keep-activities on

  • Take a screenshot adbe screenshot ~/Downloads/screenshot1.png

  • Take a video adbe screenrecord video.mp4 # Press ^C when finished

  • Turn Wireless Debug mode on adbe enable wireless debugging

  • Switch between gesture and button navigation (Android 10 and above)

    bash
    $ adbe navigation
    threebutton
    $ adbe navigation gestural
    "Navigation mode" state changed from "threebutton" -> "gestural"

Permissions

  • Grant storage-related runtime permissions

    adbe permissions grant com.example storage

  • Revoke storage-related runtime permissions

    adbe permissions revoke com.example storage

Interacting with app

  • Start an app

    adbe start com.example

  • Kill an app

    adbe force-stop com.example

  • Clear app data - equivalent of uninstall and reinstall

    adbe clear-data com.example

  • ls/cat/rm any file without worrying about adding "run-as" or "su root"

    adbe ls /data/data/com.example/databases # Works as long as com.example is a debuggable package or shell has the root permission or directory has been made publicly accessible

Device info

  • Detailed device info including model name, Android API version etc, device serial

    bash
    $ adbe devices
    Unlock Device "dcc54112" and give USB debugging access to this PC/Laptop by unlocking and reconnecting the device. More info about this device: "unauthorized usb:339869696X transport_id:17"
    
    Serial ID: dcc54111
    Manufacturer: OnePlus
    Model: ONEPLUS A5000 (OnePlus 5T)
    Release: 8.1.0
    SDK version: 27
    CPU: arm64-v8a
    
    Serial ID: emulator-5554
    Manufacturer: unknown
    Model: Android SDK built for x86
    Release: 4.4.2
    SDK version: 19
    CPU: x86

App info

  • Detailed information about app version, target SDK version, permissions (requested, granted, denied), installer package name, etc.
…
  • App backup to a tar file unlike the Android-specific .ab format

    bash
    $ adbe app backup com.google.android.youtube backup.tar
    you might have to confirm the backup manually on your device's screen, enter "00" as password...
    Successfully backed up data of app com.google.android.youtube to backup.tar

Usage

…

Options

…

Python3 migration timeline

  • Nov 27, 2017 - Code is Python3 compatible
  • Jan 18, 2018 - pip (python package manager) has the updated version which is Python3 compatible
  • Nov 15, 2018 - Python2 based installation discouraged. Python3 is recommended.
  • Dec 31, 2018 - Python2 will not be officially supported after Dec 31, 2018.
  • May 7, 2020 - Python2 no longer works with the current master branch

Testing

bash
make lint
make test

Release a new build

A new build can be released using release/release.py script. Build a test release via make release_debug. Build a production release via make release_production

Updating docs for ReadTheDocs

bash
make documentation

Note that this happens automatically during make release_production.

You will have to do brew install pandoc if you are missing pandoc.

Note: The inspiration for this project came from android-scripts.

Contributors

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Pythonadbandroidandroid-developmentdeveloper-tools

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category测试质量
PricingOpen source

> Related tools

J
Jest
JavaScript 测试框架
P
Playwright
现代端到端测试框架
E
eslint-plugin-test-selectors
Enforces that data-test-id attributes are added to interactive DOM elements (JSX) to help with UI testing. JSX only.