aapt_dart library

A Dart library for interacting with AAPT (Android Asset Packaging Tool).

This library provides a simple and efficient way to extract information from APK files using AAPT.

Features

  • Extract APK metadata (package name, version, labels)
  • Retrieve permissions and features
  • Get activities and services information
  • Access native libraries and locale information
  • Custom logging support

Usage

import 'package:aapt_dart/aapt_dart.dart';

void main() async {
  final aapt = AaptClient(
    aaptExecutablePath: '/path/to/aapt',
  );

  final apkInfo = await aapt.getApkInfo('/path/to/app.apk');
  print('Package: ${apkInfo.packageName}');
  print('Version: ${apkInfo.versionName}');
}

Classes

AaptClient
Client for interacting with AAPT (Android Asset Packaging Tool).
AaptLogger
Abstract logger interface for AAPT operations.
ApkInfo
Represents comprehensive information about an APK file.
DefaultAaptLogger
Default implementation of AaptLogger that prints to console.

Exceptions / Errors

AaptException
Base exception for all AAPT-related errors.
AaptNotFoundException
Exception thrown when the AAPT executable is not found.
ApkNotFoundException
Exception thrown when an APK file is not found.
ApkParsingException
Exception thrown when parsing APK information fails.