Resolve Android app labels to launch activities via adb and aapt
Project description
Activity Finder
Resolve Android app display names (labels) to their launch activities via adb and aapt.
Installation
pip install activity-finder
Or install from source:
git clone https://github.com/jaxonister/activity_finder.git
cd activity_finder
pip install -e .
Prerequisites
- Python >= 3.10
- Android SDK Platform Tools (
adbon PATH) - Android SDK Build Tools (
aapt). SetAAPT_PATHenv var, or ensure it's discoverable viaANDROID_HOME.
Usage
CLI
# Search by label
activity-finder "Keep"
# With custom aapt path
activity-finder --aapt /path/to/aapt "WeChat"
# Disable cache
activity-finder --no-cache "Keep"
# Verbose output
activity-finder -v "Keep"
Python API
from activity_finder import AppInfoFinder, AppCache
cache = AppCache(db_path="apps.db")
finder = AppInfoFinder(cache=cache)
# Fuzzy match: "云盘" matches "中国移动云盘", "百度网盘", etc.
results = finder.resolve_label_to_package("云盘")
for r in results:
print(f"{r['label']} {r['package']} {r['activity']}")
cache.close()
How It Works
- Lists all installed packages via
adb shell pm list packages - Pulls each APK and reads labels via
aapt dump badging - Matches labels against the keyword (substring/fuzzy match)
- Returns all matching apps with label, package name, and launch activity
- Caches results in SQLite to speed up subsequent searches
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
activity_finder-0.1.2.tar.gz
(9.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file activity_finder-0.1.2.tar.gz.
File metadata
- Download URL: activity_finder-0.1.2.tar.gz
- Upload date:
- Size: 9.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2e9624e10f2cfed2f7cb7ed26f49cc11b0e46774074feb12546cdae69c78aabb
|
|
| MD5 |
d8f18eee9b48443ce26e5316f891c954
|
|
| BLAKE2b-256 |
3eabe53887f1ba007990580d64ea8ea49b5111405c1926f477031459f76805b3
|
File details
Details for the file activity_finder-0.1.2-py3-none-any.whl.
File metadata
- Download URL: activity_finder-0.1.2-py3-none-any.whl
- Upload date:
- Size: 7.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cadbb704f88e17dfe0917474891cd438927ff8d3fe8e7893ae8fad8e9cea7ba2
|
|
| MD5 |
bfa95d6d26cdf7dadc540053892595da
|
|
| BLAKE2b-256 |
8488131190b8bd66ad67fc1706272af0dc72c3f12a4a5d5320a4cd5e3953d356
|