npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

aaptjs3

v2.0.1

Published

Node.js wrapper for Android Asset Packaging Tool 2 (aapt2), bundled with prebuilt binaries for Windows, macOS, and Linux.

Readme

aaptjs3

Node.js wrapper for aapt2 (Android Asset Packaging Tool 2). Bundles prebuilt aapt2 binaries — no Android SDK installation required.

v2.0.0 upgrades from aapt1 to aapt2. If you need aapt1, use aaptjs3@^1.0.9 or the legacy-aapt1 branch.

Platform Support

| Platform | Architecture | Status | |----------|-------------|--------| | Windows | x64 | ✅ | | macOS | x64 / ARM64 | ✅ | | Linux | x64 | ✅ |

Install

npm install aaptjs3 --save

Quick Start

const aapt = require('aaptjs3');

// Dump APK metadata
const { stdout } = await aapt.dump('app.apk', 'badging');
console.log(stdout);

// Get structured APK info
const info = await aapt.getApkInfo('app.apk');
// { package: 'com.example.app', version: '1.0.0',
//   name: 'My App', icon: 'res/mipmap/ic_launcher.png' }

// List APK contents
const { stdout: files } = await aapt.list('app.apk');

Custom Binary

Configure your own aapt binary — version auto-detected:

const aapt = require('aaptjs3');

// Use a custom aapt binary
await aapt.configure({ binPath: '/path/to/custom/aapt' });

// If the path is broken or version can't be detected,
// falls back to built-in aapt2 with a warning.

API

interface ExecResult {
  stdout: string;
  stderr: string;
}

interface PackageInfo {
  package: string;
  version: string;
  name: string;
  icon: string;
}

configure(opts: { binPath?: string }): Promise<void>

Configure a custom aapt binary. Version is auto-detected. All subsequent API calls use the configured binary. If the path is invalid or version unknown, falls back to built-in aapt2.

getBinPath(): string

Returns the currently active aapt binary path.

aapt(commandArgs: string[], maxBuffer?: number): Promise<ExecResult>

Low-level execution of the active aapt binary with arbitrary arguments.

dump(apkPath: string, value: string, extraArgs?: string[]): Promise<ExecResult>

Dump APK information. Supported subcommands: badging, strings, resources, permissions, configurations, packagename, styleparents, apc, overlayable, chunks, xmltree, xmlstrings.

// Simple dumping
await aapt.dump('app.apk', 'badging');
await aapt.dump('app.apk', 'permissions');
await aapt.dump('app.apk', 'packagename');

// xmltree/xmlstrings need --file flag
await aapt.dump('app.apk', 'xmltree', ['--file', 'AndroidManifest.xml']);

list(apkPath: string): Promise<ExecResult>

List APK contents. In aapt2 mode, reads the ZIP central directory directly.

getApkInfo(apkPath: string): Promise<PackageInfo>

Extract package name, version, app label, and icon.

Deprecated APIs (aapt1 only)

These throw errors in default aapt2 mode. They work only if you configure a custom aapt1 binary:

| Function | aapt2 Replacement | |----------|------------------| | packageCmd() | aapt2 compile + aapt2 link | | remove() | aapt2 optimize or zip tools | | add() | aapt2 compile + aapt2 link | | crunch() | aapt2 compile | | singleCrunch() | aapt2 compile |

Migration from v1.x

| v1.x | v2.x | |------|------| | dump(apk, value) | Same, or dump(apk, value, extraArgs) | | list(apk, args) | list(apk) — args ignored, reads ZIP | | getApkInfo(apk) | Same | | packageCmd() | ❌ Throws | | remove() / add() | ❌ Throws | | crunch() / singleCrunch() | ❌ Throws |

License

MIT