Skip to main content

Aapt

Android Asset Packaging Tool for Python3

Example

import aapt

help = aapt.aapt('--help')
print(help)

ls = aapt.ls('./xx.apk')
print(ls)

apk_info = aapt.get_apk_info('./xxx.apk')
print(apk_info)

# save icon
from PIL import Image
apk_info = aapt.get_apk_and_icon('./xxx.apk')
byte_stream = io.BytesIO(apk_info['icon_byte_value'])
img = Image.open(byte_stream)
img.save('./1.png')

# upload file

requests.post(url, files={'file': apk_info['icon_byte_value']})

API

  • aapt(args)
  • ls(file_path)
  • dump(file_path, values)
  • packagecmd(file_path, command)
  • remove(file_path, files)
  • add(file_path, files)
  • crunch(resource, output_folder)
  • single_crunch(input_file, output_file):
  • version()
  • get_apk_info(file_path)

Metadata

Release files for aapt 1.0.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 aapt 1.0.2
File Size Uploaded Provenance Actions
aapt-1.0.2.tar.gz 1.6 kB Without provenance Details for aapt-1.0.2.tar.gz

Release files / aapt-1.0.2.tar.gz

Download URL aapt-1.0.2.tar.gz
Size 1.6 kB
Tags Source
SHA-256 checksum
How to use checksums
f989a77d4d6b4ac077525807c823708899e916142a8b37a21b04a1ff220242f1
BLAKE2b-256 checksum
How to use checksums
e427ddfa92fc0b4ec3d155c6673b67d8ff1b28b0415456dcd1585dba32844f9b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3

Security for aapt 1.0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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