Skip to main content

Android Asset Packaging Tool for Python3

Project description

Aapt

Android Asset Packaging Tool 2 for Python3

Install

pip3 install aapt2

Example

from aapt2 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)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aapt2-0.0.3.tar.gz (1.9 kB view details)

Uploaded Source

Built Distribution

aapt2-0.0.3-py3-none-any.whl (2.3 kB view details)

Uploaded Python 3

File details

Details for the file aapt2-0.0.3.tar.gz.

File metadata

  • Download URL: aapt2-0.0.3.tar.gz
  • Upload date:
  • Size: 1.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.6

File hashes

Hashes for aapt2-0.0.3.tar.gz
Algorithm Hash digest
SHA256 26b4024edb1e664197d4d6a68ece291b37ad03415db92f00f6accfc67636c6f7
MD5 0fa8cf1c7c2f015dbc609fe3325b84a5
BLAKE2b-256 893f7018acbd3f2b0f37ac1bed5f55175ed47f9fa1f1ea3286ee28c27d0ce17f

See more details on using hashes here.

File details

Details for the file aapt2-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: aapt2-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 2.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.6

File hashes

Hashes for aapt2-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 76707da942826ca2a363477858f63cf4194e99690a399503749781211a435a6d
MD5 bcf2ec3753dc0d2837414058b6fd107a
BLAKE2b-256 975fef4cc8cfd704c652302174d907dba10138c1b2ebc19c1d33bed1b4ff44a4

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page