{"id":3624,"url":"https://github.com/ashishb/adb-enhanced","last_synced_at":"2025-05-14T02:08:00.933Z","repository":{"id":16586295,"uuid":"79536820","full_name":"ashishb/adb-enhanced","owner":"ashishb","description":"🔪Swiss-army knife for Android testing and development 🔪 ⛺","archived":false,"fork":false,"pushed_at":"2025-04-28T15:40:46.000Z","size":8482,"stargazers_count":1272,"open_issues_count":3,"forks_count":83,"subscribers_count":33,"default_branch":"master","last_synced_at":"2025-05-06T09:24:31.023Z","etag":null,"topics":["adb","android","android-development","developer-tools"],"latest_commit_sha":null,"homepage":"https://ashishb.net/tech/introducing-adb-enhanced-a-swiss-army-knife-for-android-development/","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/ashishb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":"ashishb","patreon":null,"open_collective":"ashishb","ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2017-01-20T07:33:22.000Z","updated_at":"2025-05-04T12:03:30.000Z","dependencies_parsed_at":"2024-01-31T06:41:37.591Z","dependency_job_id":"4e0118e8-1be8-4b15-9c41-ab1cc453c893","html_url":"https://github.com/ashishb/adb-enhanced","commit_stats":{"total_commits":636,"total_committers":9,"mean_commits":70.66666666666667,"dds":"0.20911949685534592","last_synced_commit":"cf4c9a7f34d8a66790173a61fd15cdd471c0bc57"},"previous_names":[],"tags_count":74,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ashishb%2Fadb-enhanced","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ashishb%2Fadb-enhanced/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ashishb%2Fadb-enhanced/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ashishb%2Fadb-enhanced/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ashishb","download_url":"https://codeload.github.com/ashishb/adb-enhanced/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253468028,"owners_count":21913290,"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","android","android-development","developer-tools"],"created_at":"2024-01-05T20:16:46.752Z","updated_at":"2025-05-14T02:08:00.875Z","avatar_url":"https://github.com/ashishb.png","language":"Python","funding_links":["https://github.com/sponsors/ashishb","https://opencollective.com/ashishb"],"categories":["Libraries","Python"],"sub_categories":["Debugging Tools"],"readme":"# ADB Enhanced [![Downloads](https://static.pepy.tech/badge/adb-enhanced)](https://pepy.tech/project/adb-enhanced) [![PyPI version](https://badge.fury.io/py/adb-enhanced.svg)](https://badge.fury.io/py/adb-enhanced)\n\n![Logo](docs/logo.png)\n\nADB-Enhanced is a Swiss army knife for Android testing and development.\n\nA 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.\n\n[![Lint Python](https://github.com/ashishb/adb-enhanced/actions/workflows/lint-python.yaml/badge.svg)](https://github.com/ashishb/adb-enhanced/actions/workflows/lint-python.yaml)\n[![Lint Markdown](https://github.com/ashishb/adb-enhanced/actions/workflows/lint-markdown.yaml/badge.svg)](https://github.com/ashishb/adb-enhanced/actions/workflows/lint-markdown.yaml)\n[![Lint YAML](https://github.com/ashishb/adb-enhanced/actions/workflows/lint-yaml.yaml/badge.svg)](https://github.com/ashishb/adb-enhanced/actions/workflows/lint-yaml.yaml)\n\n[![InstallAdbeTest](https://github.com/ashishb/adb-enhanced/actions/workflows/install-adbe.yml/badge.svg)](https://github.com/ashishb/adb-enhanced/actions/workflows/install-adbe.yml)\n\n[![AdbeInstallTests](https://github.com/ashishb/adb-enhanced/actions/workflows/adbe-installtests.yml/badge.svg)](https://github.com/ashishb/adb-enhanced/actions/workflows/adbe-installtests.yml) [![AdbeUnitTests](https://github.com/ashishb/adb-enhanced/actions/workflows/adbe-unittests.yml/badge.svg)](https://github.com/ashishb/adb-enhanced/actions/workflows/adbe-unittests.yml)\n\n[![Install adb-enhanced via pip](https://github.com/ashishb/adb-enhanced/actions/workflows/install-adb-enhanced-from-pip.yml/badge.svg)](https://github.com/ashishb/adb-enhanced/actions/workflows/install-adb-enhanced-from-pip.yml) [![Install adb-enhanced via homebrew](https://github.com/ashishb/adb-enhanced/actions/workflows/install-adb-enhanced-from-homebrew.yml/badge.svg)](https://github.com/ashishb/adb-enhanced/actions/workflows/install-adb-enhanced-from-homebrew.yml)\n\n[![AdbeUnitTests-Api16](https://github.com/ashishb/adb-enhanced/actions/workflows/adbe-unittests-api16.yml/badge.svg)](https://github.com/ashishb/adb-enhanced/actions/workflows/adbe-unittests-api16.yml)\n[![AdbeUnitTests-Api21](https://github.com/ashishb/adb-enhanced/actions/workflows/adbe-unittests-api21.yml/badge.svg)](https://github.com/ashishb/adb-enhanced/actions/workflows/adbe-unittests-api21.yml)\n[![AdbeUnitTests-Api22](https://github.com/ashishb/adb-enhanced/actions/workflows/adbe-unittests-api22.yml/badge.svg)](https://github.com/ashishb/adb-enhanced/actions/workflows/adbe-unittests-api22.yml)\n[![AdbeUnitTests-Api23](https://github.com/ashishb/adb-enhanced/actions/workflows/adbe-unittests-api23.yml/badge.svg)](https://github.com/ashishb/adb-enhanced/actions/workflows/adbe-unittests-api23.yml)\n[![AdbeUnitTests-Api24](https://github.com/ashishb/adb-enhanced/actions/workflows/adbe-unittests-api24.yml/badge.svg)](https://github.com/ashishb/adb-enhanced/actions/workflows/adbe-unittests-api24.yml)\n[![AdbeUnitTests-Api25](https://github.com/ashishb/adb-enhanced/actions/workflows/adbe-unittests-api25.yml/badge.svg)](https://github.com/ashishb/adb-enhanced/actions/workflows/adbe-unittests-api25.yml)\n[![AdbeUnitTests-Api26](https://github.com/ashishb/adb-enhanced/actions/workflows/adbe-unittests-api26.yml/badge.svg)](https://github.com/ashishb/adb-enhanced/actions/workflows/adbe-unittests-api26.yml)\n[![AdbeUnitTests-Api27](https://github.com/ashishb/adb-enhanced/actions/workflows/adbe-unittests-api27.yml/badge.svg)](https://github.com/ashishb/adb-enhanced/actions/workflows/adbe-unittests-api27.yml)\n[![AdbeUnitTests-Api28](https://github.com/ashishb/adb-enhanced/actions/workflows/adbe-unittests-api28.yml/badge.svg)](https://github.com/ashishb/adb-enhanced/actions/workflows/adbe-unittests-api28.yml)\n[![AdbeUnitTests-Api29](https://github.com/ashishb/adb-enhanced/actions/workflows/adbe-unittests-api29.yml/badge.svg)](https://github.com/ashishb/adb-enhanced/actions/workflows/adbe-unittests-api29.yml)\n[![AdbeUnitTests-Api31](https://github.com/ashishb/adb-enhanced/actions/workflows/adbe-unittests-api31.yml/badge.svg)](https://github.com/ashishb/adb-enhanced/actions/workflows/adbe-unittests-api31.yml)\n[![AdbeUnitTests-Api30](https://github.com/ashishb/adb-enhanced/actions/workflows/adbe-unittests-api30.yml/badge.svg)](https://github.com/ashishb/adb-enhanced/actions/workflows/adbe-unittests-api30.yml)\n[![AdbeUnitTests-Api31](https://github.com/ashishb/adb-enhanced/actions/workflows/adbe-unittests-api31.yml/badge.svg)](https://github.com/ashishb/adb-enhanced/actions/workflows/adbe-unittests-api31.yml)\n[![AdbeUnitTests-Api32](https://github.com/ashishb/adb-enhanced/actions/workflows/adbe-unittests-api32.yml/badge.svg)](https://github.com/ashishb/adb-enhanced/actions/workflows/adbe-unittests-api32.yml)\n[![AdbeUnitTests-Api33](https://github.com/ashishb/adb-enhanced/actions/workflows/adbe-unittests-api33.yml/badge.svg)](https://github.com/ashishb/adb-enhanced/actions/workflows/adbe-unittests-api33.yml)\n[![AdbeUnitTests-Api34](https://github.com/ashishb/adb-enhanced/actions/workflows/adbe-unittests-api34.yml/badge.svg)](https://github.com/ashishb/adb-enhanced/actions/workflows/adbe-unittests-api34.yml)\n\n[![asciicast](https://asciinema.org/a/0IhbOF6QNIhBlgtO6VgzNmTbK.png)](https://asciinema.org/a/0IhbOF6QNIhBlgtO6VgzNmTbK)\n\n## Release announcement\n\nSee [Release announcement](https://ashishb.net/tech/introducing-adb-enhanced-a-swiss-army-knife-for-android-development/)\n\n## Installation\n\n### Recommended\n\n`sudo pip3 install adb-enhanced`\n\n### Alternative on Mac OS via Homebrew [![Homebrew package](https://repology.org/badge/version-for-repo/homebrew/adb-enhanced.svg)](https://formulae.brew.sh/formula/adb-enhanced)\n\n`brew install adb-enhanced`\n\n## Note\n\n1. `sudo pip install adb-enhanced` works only for Python 3. Python 2 is no longer supported.\n1. If you don't have sudo access or you are installing without sudo then `adbe` might not be configured correctly in the path.\n1. To set up bash/z-sh auto-completion, execute `sudo pip3 install infi.docopt-completion \u0026\u0026 docopt-completion $(which adbe)` after installing adb-enhanced.\n\n## Examples\n\n### Device configuration\n\n* Turn doze mode on\n\n  `adbe doze on`\n\n* Turn mobile-data off\n\n  `adbe mobile-data off`\n\n* Turn on battery saver\n\n  `adbe battery saver on`\n\n* Don't keep activities in the background\n\n  `adbe dont-keep-activities on`\n\n* Take a screenshot\n  `adbe screenshot ~/Downloads/screenshot1.png`\n\n* Take a video\n  `adbe screenrecord video.mp4 # Press ^C when finished`\n\n* Turn Wireless Debug mode on\n  `adbe enable wireless debugging`\n\n### Permissions\n\n* Grant storage-related runtime permissions\n\n  `adbe permissions grant com.example storage`\n\n* Revoke storage-related runtime permissions\n\n  `adbe permissions revoke com.example storage`\n\n### Interacting with app\n\n* Start an app\n\n  `adbe start com.example`\n\n* Kill an app\n\n  `adbe force-stop com.example`\n\n* Clear app data - equivalent of uninstall and reinstall\n\n  `adbe clear-data com.example`\n\n* ls/cat/rm any file without worrying about adding \"run-as\" or \"su root\"\n\n  `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\n\n### Device info\n\n* Detailed device info including model name, Android API version etc, device serial\n\n  ```bash\n  $ adbe devices\n  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\"\n\n  Serial ID: dcc54111\n  Manufacturer: OnePlus\n  Model: ONEPLUS A5000 (OnePlus 5T)\n  Release: 8.1.0\n  SDK version: 27\n  CPU: arm64-v8a\n\n  Serial ID: emulator-5554\n  Manufacturer: unknown\n  Model: Android SDK built for x86\n  Release: 4.4.2\n  SDK version: 19\n  CPU: x86\n  ```\n\n### App info\n\n* Detailed information about app version, target SDK version, permissions (requested, granted, denied), installer package name, etc.\n\n  ```bash\n  $ adbe app info com.google.android.youtube\n  App name: com.google.android.youtube\n  Version: 12.17.41\n  Version Code: 121741370\n  Is debuggable: False\n  Min SDK version: 21\n  Target SDK version: 26\n\n  Permissions:\n\n  Install time granted permissions:\n  com.google.android.c2dm.permission.RECEIVE\n  android.permission.USE_CREDENTIALS\n  com.google.android.providers.gsf.permission.READ_GSERVICES\n  com.google.android.youtube.permission.C2D_MESSAGE\n  android.permission.MANAGE_ACCOUNTS\n  android.permission.SYSTEM_ALERT_WINDOW\n  android.permission.NFC\n  android.permission.CHANGE_NETWORK_STATE\n  android.permission.RECEIVE_BOOT_COMPLETED\n  com.google.android.gms.permission.AD_ID_NOTIFICATION\n  android.permission.INTERNET\n  android.permission.GET_PACKAGE_SIZE\n  android.permission.ACCESS_NETWORK_STATE\n  android.permission.VIBRATE\n  android.permission.ACCESS_WIFI_STATE\n  android.permission.WAKE_LOCK\n\n  Runtime Permissions not granted and not yet requested:\n  android.permission.WRITE_EXTERNAL_STORAGE\n  android.permission.MANAGE_DOCUMENTS\n  android.permission.GET_ACCOUNTS\n  android.permission.CAMERA\n  android.permission.RECORD_AUDIO\n  android.permission.READ_CONTACTS\n  android.permission.ACCESS_FINE_LOCATION\n  android.permission.ACCESS_COARSE_LOCATION\n  android.permission.READ_PHONE_STATE\n  android.permission.SEND_SMS\n  android.permission.RECEIVE_SMS\n  com.sec.android.provider.badge.permission.READ\n  com.sec.android.provider.badge.permission.WRITE\n  com.htc.launcher.permission.READ_SETTINGS\n  com.htc.launcher.permission.UPDATE_SHORTCUT\n  com.sonyericsson.home.permission.BROADCAST_BADGE\n  com.sonymobile.home.permission.PROVIDER_INSERT_BADGE\n  android.permission.READ_EXTERNAL_STORAGE\n\n  Installer package name: None\n  ```\n\n* App backup to a tar file unlike the Android-specific .ab format\n\n  ```bash\n  $ adbe app backup com.google.android.youtube backup.tar\n  you might have to confirm the backup manually on your device's screen, enter \"00\" as password...\n  Successfully backed up data of app com.google.android.youtube to backup.tar\n  ```\n\n### Usage\n\n```bash\nadbe [options] airplane (on | off)\nadbe [options] alarm (all | top | pending | history)\nadbe [options] animations (on | off)\nadbe [options] app backup \u003capp_name\u003e [\u003cbackup_tar_file_path\u003e]\nadbe [options] app info \u003capp_name\u003e\nadbe [options] app path \u003capp_name\u003e\nadbe [options] app signature \u003capp_name\u003e\nadbe [options] apps list (all | system | third-party | debug | backup-enabled)\nadbe [options] battery level \u003cpercentage\u003e\nadbe [options] battery reset\nadbe [options] battery saver (on | off)\nadbe [options] cat \u003cfile_path\u003e\nadbe [options] clear-data \u003capp_name\u003e\nadbe [options] dark mode (on | off)\nadbe [options] devices\nadbe [options] (enable | disable) wireless debugging\nadbe [options] dont-keep-activities (on | off)\nadbe [options] doze (on | off)\nadbe [options] dump-ui \u003cxml_file\u003e\nadbe [options] force-stop \u003capp_name\u003e\nadbe [options] gfx (on | off | lines)\nadbe [options] input-text \u003ctext\u003e\nadbe [options] install \u003cfile_path\u003e\nadbe [options] jank \u003capp_name\u003e\nadbe [options] layout (on | off)\nadbe [options] location (on | off)\nadbe [options] ls [-a] [-l] [-R|-r] \u003cfile_path\u003e\nadbe [options] mobile-data (on | off)\nadbe [options] mobile-data saver (on | off)\nadbe [options] mv [-f] \u003csrc_path\u003e \u003cdest_path\u003e\nadbe [options] notifications list\nadbe [options] open-url \u003curl\u003e\nadbe [options] overdraw (on | off | deut)\nadbe [options] permission-groups list all\nadbe [options] permissions (grant | revoke) \u003capp_name\u003e (calendar | camera | contacts | location | microphone | notifications | phone | sensors | sms | storage)\nadbe [options] permissions list (all | dangerous)\nadbe [options] press back\nadbe [options] pull [-a] \u003cfile_path_on_android\u003e\nadbe [options] pull [-a] \u003cfile_path_on_android\u003e \u003cfile_path_on_machine\u003e\nadbe [options] push \u003cfile_path_on_machine\u003e \u003cfile_path_on_android\u003e\nadbe [options] restart \u003capp_name\u003e\nadbe [options] restrict-background (true | false) \u003capp_name\u003e\nadbe [options] rm [-f] [-R|-r] \u003cfile_path\u003e\nadbe [options] rotate (landscape | portrait | left | right)\nadbe [options] rtl (on | off)\nadbe [options] screen (on | off | toggle)\nadbe [options] screenrecord \u003cfilename.mp4\u003e\nadbe [options] screenshot \u003cfilename.png\u003e\nadbe [options] show-taps (on | off)\nadbe [options] standby-bucket get \u003capp_name\u003e\nadbe [options] standby-bucket set \u003capp_name\u003e (active | working_set | frequent | rare)\nadbe [options] start \u003capp_name\u003e\nadbe [options] stay-awake-while-charging (on | off)\nadbe [options] stop \u003capp_name\u003e\nadbe [options] top-activity\nadbe [options] uninstall [--first-user] \u003capp_name\u003e\nadbe [options] wifi (on | off)\n```\n\n### Options\n\n```bash\n-e, --emulator          directs the command to the only running emulator\n-d, --device            directs the command to the only connected \"USB\" device\n-s, --serial SERIAL     directs the command to the device or emulator with the given serial number or qualifier.\n                        Overrides ANDROID_SERIAL environment variable.\n-l                      For long list format, only valid for \"ls\" command\n-R                      For recursive directory listing, only valid for \"ls\" and \"rm\" command\n-r                      For delete file, only valid for \"ls\" and \"rm\" command\n-f                      For forced deletion of a file, only valid for \"rm\" command\n-v, --verbose           Verbose mode\n```\n\n## Python3 migration timeline\n\n* Nov 27, 2017 - Code is Python3 compatible\n* Jan 18, 2018 - pip (python package manager) has the updated version which is Python3 compatible\n* Nov 15, 2018 - Python2 based installation discouraged. Python3 is recommended.\n* Dec 31, 2018 - Python2 will not be officially supported after Dec 31, 2018.\n* May 7, 2020 - Python2 no longer works with the current master branch\n\n## Testing\n\n```bash\nmake lint\nmake test\n```\n\n## Release a new build\n\nA new build can be released using [`release/release.py`](https://github.com/ashishb/adb-enhanced/blob/master/release/release.py) script.\nBuild a test release via `make release_debug`.\nBuild a production release via `make release_production`\n\n## Updating docs for ReadTheDocs\n\n```bash\nmake documentation\n```\n\nNote that this happens automatically during `make release_production`.\n\nYou will have to do `brew install pandoc` if you are missing pandoc.\n\nNote: The inspiration for this project came from [android-scripts](https://github.com/dhelleberg/android-scripts).\n\n[![Packaging status](https://repology.org/badge/vertical-allrepos/python:adb-enhanced.svg)](https://repology.org/project/python:adb-enhanced/versions)\n\n## Contributors\n\n![GitHub contributors](https://contrib.rocks/image?repo=ashishb/adb-enhanced)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fashishb%2Fadb-enhanced","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fashishb%2Fadb-enhanced","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fashishb%2Fadb-enhanced/lists"}