Skip to content

Installation

apk-info ships as three packages built from the same Rust core:

Package For Install
apk-info CLI the terminal Homebrew, Nix or cargo install apk-info-cli
apk-info on PyPI Python 3.11+ pip install apk-info
apk-info crate Rust cargo add apk-info

CLI

brew install delvinru/tap/apk-info

Try it without installing:

nix run github:delvinru/apk-info -- show app.apk

Install it into your profile (newer Nix calls the command nix profile add):

nix profile install github:delvinru/apk-info

Or add the flake to a NixOS or home-manager configuration:

# flake.nix
inputs.apk-info.url = "github:delvinru/apk-info";

# configuration.nix, or home.packages for home-manager
environment.systemPackages = [
  inputs.apk-info.packages.${pkgs.stdenv.hostPlatform.system}.default
];

The flake builds the CLI from source and installs its shell completion. It needs flakes enabled.

cargo install apk-info-cli

Requires Rust 1.95 or newer.

Download an archive for your platform from GitHub Releases. Each release has builds for:

  • Linux (static musl): x86_64-unknown-linux-musl, aarch64-unknown-linux-musl
  • macOS: x86_64-apple-darwin, aarch64-apple-darwin
  • Windows: x86_64-pc-windows-msvc
  • Android (e.g. Termux or adb shell): aarch64-linux-android

Check that it works:

apk-info --version

Shell completion

apk-info completion <SHELL> prints a completion script for bash, elvish, fish, powershell or zsh. The Homebrew and Nix packages install it for bash, fish and zsh already (for Homebrew, see Shell Completion if zsh doesn't pick it up). Otherwise:

mkdir -p ~/.zfunc
apk-info completion zsh > ~/.zfunc/_apk-info

Then add fpath=(~/.zfunc $fpath) to ~/.zshrc, before compinit runs.

mkdir -p ~/.local/share/bash-completion/completions
apk-info completion bash > ~/.local/share/bash-completion/completions/apk-info
mkdir -p ~/.config/fish/completions
apk-info completion fish > ~/.config/fish/completions/apk-info.fish
New-Item -ItemType Directory -Force (Split-Path $PROFILE) | Out-Null
apk-info completion powershell >> $PROFILE

Python

PyPI has wheels for Linux, macOS and Windows. You need CPython 3.11 or newer.

uv add apk-info
pip install apk-info

The package includes type stubs, so editors and type checkers see the full API.

from apk_info import APK

apk = APK("app.apk")
print(apk.get_package_name())

Rust

cargo add apk-info

The apk-info crate re-exports the lower-level crates. If you need only one part of the parser, depend on that crate:

Crate What it does
apk-info high-level Apk API: manifest, resources, signatures, containers
apk-info-zip malware-tolerant zip reader and APK Signing Block parser
apk-info-axml Android binary XML (AXML) and resource table (ARSC) parsers
apk-info-xml XML element tree used by the AXML parser