Skip to main content

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 (adb on PATH)
  • Android SDK Build Tools (aapt). Set AAPT_PATH env var, or ensure it's discoverable via ANDROID_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

  1. Lists all installed packages via adb shell pm list packages
  2. Pulls each APK and reads labels via aapt dump badging
  3. Matches labels against the keyword (substring/fuzzy match)
  4. Returns all matching apps with label, package name, and launch activity
  5. Caches results in SQLite to speed up subsequent searches

License

MIT

Release files for activity-finder 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for activity-finder 0.1.2
File Size Uploaded
activity_finder-0.1.2.tar.gz 9.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for activity-finder 0.1.2
File Interpreter ABI Platform
activity_finder-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 17.3 kB

Release files / activity_finder-0.1.2.tar.gz

Download URL activity_finder-0.1.2.tar.gz
Size 9.9 kB
Tags Source
SHA-256 checksum
How to use checksums
2e9624e10f2cfed2f7cb7ed26f49cc11b0e46774074feb12546cdae69c78aabb
BLAKE2b-256 checksum
How to use checksums
3eabe53887f1ba007990580d64ea8ea49b5111405c1926f477031459f76805b3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.11

Release files / activity_finder-0.1.2-py3-none-any.whl

Download URL activity_finder-0.1.2-py3-none-any.whl
Size 7.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cadbb704f88e17dfe0917474891cd438927ff8d3fe8e7893ae8fad8e9cea7ba2
BLAKE2b-256 checksum
How to use checksums
8488131190b8bd66ad67fc1706272af0dc72c3f12a4a5d5320a4cd5e3953d356
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.11

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page