Adbtool
A friendly android adb command-line tool
Python Requirements
- python 3.13+
- uv
- Android SDK (for APK/XAPK commands)
- HarmonyOS/OpenHarmony SDK (for HDC commands and HAP installs)
Development
uv sync
uv run pytest
uv run pytest tests/test_cmd.py
uv run ruff format adbtool tests
uv build
Commands
adbt -h
usage: adbt [options]
show android device list
options:
-h, --help show this help message and exit
-c CONFIG, --config CONFIG
global config
--version show program's version number and exit
sub commands:
{adb,hdc,devices,push,install,uninstall,apk,sign,ab,il2cpp}
adb forward adb arguments to selected devices
hdc forward hdc arguments to selected devices
devices show android device list
push push files to android device
install install apk, xapk, or hap file
uninstall uninstall apk file
apk show apk packageName/activityName
sign sign apk with android debug(only windows)
ab extract unity asset bundle information
il2cpp extract unity il2cpp information
adbt adb -- devices
adbt adb -d 1 -- shell
adbt adb -d a -- shell pwd
adbt adb -d 1 -d emulator-5554 -- shell
adbt adb -d 1,emulator-5554 -- shell
adbt adb -- -H localhost devices
adbt adb -d 1 -- -d shell
adbt adb forwards directly to native adb by default. Device selection is only performed
when -d/--devices is explicitly supplied, and adb arguments must be placed after --.
-d/--devicesbefore--belongs toadbt adb- without
-d/--devices, the command runs once without addingadb -s <serial> - repeat
-d/--devicesor separate selectors with commas to select multiple devices - everything after
--is passed to the realadbbinary without extra parsing adbt adb -hshows theadbtsubcommand helpadbt adb -- -hshows the realadbhelp
adbt adb -h
usage: adbt adb [-h] [-d [DEVICE]] -- [adb_args ...]
adbt hdc -- shell
adbt hdc -d 1 -- shell
adbt hdc -d a -- shell pwd
adbt hdc -d 1 -d serial-prefix -- shell
adbt hdc -d 1,serial-prefix -- shell
adbt hdc -- -h
adbt hdc follows the same opt-in device selection and argument forwarding rules as
adbt adb.
-d/--devicesbefore--selects HDC targets by index, serial prefix, ora- without
-d/--devices, the command runs once without addinghdc -t <serial> - repeat
-d/--devicesor separate selectors with commas to select multiple targets - everything after
--is passed to the realhdcbinary without extra parsing - each explicitly selected target is invoked as
hdc -t <serial> ... adbt hdc -hshows theadbtsubcommand helpadbt hdc -- -hshows the realhdchelp- the HDC tool directory uses the top-level
hdcsetting inadbtool.yml
adbt hdc -h
usage: adbt hdc [-h] [-d [DEVICE]] -- [hdc_args ...]
adbt devices -h
usage: adbt [options] devices [-h] [-d DEVICE] [-l]
optional arguments:
-h, --help show this help message and exit
-d DEVICE, --devices DEVICE
filter of devices, [n | serial | a]; repeat the option or separate values with commas
-l, --list show devices list
adbt push -h
usage: adbt [options] push [-h] [-r] [-n] [-j [HASHJSON]] [--hash [{sha1,mtime}]] [--localdir LOCALDIR]
[--remotedir REMOTEDIR] [--dontpush] [-d [DEVICE]]
[path [path ...]]
positional arguments:
path file or directory
optional arguments:
-h, --help show this help message and exit
-r recursion all file
-n only push new file by last modify files, see -j
-j [HASHJSON] hash json file, default: ./$deviceMode_$deviceSerial.json
--hash [{sha1,mtime}]
hash function: mtime or sha1, default:mtime
--localdir LOCALDIR local prefix and remote prefix, will replace local prefix to remote prefix
--remotedir REMOTEDIR
local prefix and remote prefix, will replace local prefix to remote prefix
--dontpush only outout json file, not really push file to remote
-d, --devices [DEVICE]
filter of devices, [a | n | serial] a: all devices n: index of devices list(start with 1)
serial: devices serial (at least 2 char); repeat the option or separate values with commas;
not argument is show device list
adbt install -h
usage: adbt [options] install [-h] [-f] [--filter FILTER] [-r] [-d [DEVICE]] [apkpath ...]
positional arguments:
apkpath apk/xapk/hap file or directory
optional arguments:
-h, --help show this help message and exit
-f, --force allow downgrade and replace existing app
--filter FILTER filter by file name; repeat the option or separate values with commas
-r, --run run app after install
-d, --devices [DEVICE]
filter of devices, [a | n | serial] a: all devices n: index of devices list(start with 1)
serial: devices serial (at least 2 char); repeat the option or separate values with commas;
not argument is show device list
installaccepts APK, XAPK, and HAP files. A directory selects the newest matching package.- multiple APK paths use
adb install-multi-package; an XAPK must be installed by itself. - XAPK split APKs use
adb install-multiple; declared OBB files are pushed to/sdcard/Android/obb/<package>/after installation. - default install mode uses
adb -r;-f/--forceupgrades it toadb -d -r. - HAP files use
hdc -t <device> install -r;-f/--forceupgrades it to-d -r. - multiple HAP paths are installed together; HAP cannot be mixed with APK/XAPK, and
--runis not supported for HAP. - configure the HDC tool directory with the top-level
hdckey inadbtool.yml. On Windows, the DevEco Studio default is checked before PATH:
hdc: C:\Program Files\Huawei\DevEco Studio\sdk\default\openharmony\toolchains
- repeat
--filteror separate filter values with commas when all terms must match.
adbt install -d a C:\path\app.apk
adbt install -d a C:\path\game.xapk
adbt install -d a C:\path\app.hap
adbt install -d 1 -d emulator-5554 C:\path\app.apk
adbt install --filter ZGame,arm64 --filter gp C:\path\builds
adbt apk -h
usage: adbt [options] apk [-h] [-r] [-d [DEVICE]] [apkpath]
positional arguments:
apkpath
optional arguments:
-h, --help show this help message and exit
-r, --run run app
-d, --devices [DEVICE]
filter of devices, [a | n | serial] a: all devices n: index of devices list(start with 1)
serial: devices serial (at least 2 char); repeat the option or separate values with commas;
not argument is show device list
Metadata
Release files for adbtool 0.0.44
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| adbtool-0.0.44.tar.gz | 1.2 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| adbtool-0.0.44-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 1.2 MB
Release files / adbtool-0.0.44.tar.gz
| Download URL | adbtool-0.0.44.tar.gz |
|---|---|
| Size | 1.2 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f48d3d923129f2a8c53cabc3ce21994688407f9701a6e3a14f6a7b58b16422fb
|
|
BLAKE2b-256 checksum How to use checksums |
a69173ae8bee6426b31931146152cbbd87d4e763dc04d0e2c16d9841832d2f08
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 20, 2026.
Transparency logRelease files / adbtool-0.0.44-py3-none-any.whl
| Download URL | adbtool-0.0.44-py3-none-any.whl |
|---|---|
| Size | 32.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d684fc80640852011c26c02dc9e1ecd8158fd56940cb96ad441b2788a42b2ac7
|
|
BLAKE2b-256 checksum How to use checksums |
79fd6ba60c45343e3748fa3ff2f42c1a22afbc7f380da27423031309d7ce43bd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 20, 2026.
Transparency log