# aab-parser

> Parser for Android app bundles

Latest version **1.0.1** (published 2022-03-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install aab-parser
pnpm add aab-parser
yarn add aab-parser
bun add aab-parser
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2022-03-03 |
| First published | 2021-08-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 27.1 KB |
| Known vulnerabilities | 0 (+11 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 1 |
| Author | qucumbah |
| Maintainers | qucumbah |
| Keywords | android, aab, parser |

## Links

- npm: https://www.npmjs.com/package/aab-parser
- Repository: https://github.com/qucumbah/aab-parser
- Homepage: https://github.com/qucumbah/aab-parser#readme
- Issues: https://github.com/qucumbah/aab-parser/issues
- npm.io page: https://npm.io/package/aab-parser

## Dependencies (2)

- [jszip](https://npm.io/package/jszip.md) ^3.7.1
- [protobufjs](https://npm.io/package/protobufjs.md) ^6.11.2

## Alternatives

- [babylon](https://npm.io/package/babylon.md) — 5.1M weekly downloads
- [csscolorparser](https://npm.io/package/csscolorparser.md) — 3.7M weekly downloads
- [expr-eval-fork](https://npm.io/package/expr-eval-fork.md) — 1.5M weekly downloads
- [@leeoniya/ufuzzy](https://npm.io/package/@leeoniya/ufuzzy.md) — 247.7K weekly downloads
- [xml-parser](https://npm.io/package/xml-parser.md) — 78.4K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2022-03-03
- 1.0.0 — 2021-08-24

## README

# aab-parser

A lightweight Android app bundle parser written in Typescript with asynchronous interface. Works on pure Node JS, doesn't require additional installation of JDK.

## API

### `Manifest` type

This interface represents a subset of AAB attributes.
Only these fields are represented:
| Attribute | Description | Type |
| --- | --- | --- |
| versionCode | A positive integer used as an internal version number | number |
| versionName | A string used as the version number shown to users | string |
| packageName | A unique application ID, such as com.example.myapp | string |
| compiledSdkVersion | Which Android SDK version was used to compile the app | number |
| compiledSdkVersionCodename | Target Android version | number |

### `parseAabManifest` function

This function accepts either a path to the aab, or a buffer with app bundle content.

Asynchronously parses the app bundle manifest and returns it as an instance of `Manifest`.

### `parseAabManifestJSON` function

This function accepts either a path to the aab, or a buffer with app bundle content.

Asynchronously parses the app bundle manifest and returns it a plain JSON object. This object contains more fields compared to an instance of `Manifest`, but it's not typed.

## Usage example

```ts
const aabParser = require('aab-parser');

const manifest: aabParser.Manifest = await aabParser.parseAabManifest('./bundle.aab');

console.log(manifest);
```

Result:
```
{
  versionCode: 3830,
  versionName: '1.0.0',
  packageName: 'com.abtt.testandroidapp',
  compiledSdkVersion: 29,
  compiledSdkVersionCodename: 10
}
```

---
_Source: https://npm.io/package/aab-parser · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
