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.1.1.tar.gz
(2.8 MB
view details)
Built Distribution
aapt2-0.1.1-py3-none-any.whl
(2.8 MB
view details)
File details
Details for the file aapt2-0.1.1.tar.gz
.
File metadata
- Download URL: aapt2-0.1.1.tar.gz
- Upload date:
- Size: 2.8 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.7.9+
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2553e6dfd43e1e9d5e7bf2ce2cdda548bbebf4e79f2165ff27b578a74adad82c |
|
MD5 | f39960de1fa43e77b55a51ac441d3b76 |
|
BLAKE2b-256 | 8375ad512946fcd95ef4921d40981ad86e1ea82f62b28e08f2beec1587613c57 |
File details
Details for the file aapt2-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: aapt2-0.1.1-py3-none-any.whl
- Upload date:
- Size: 2.8 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.7.9+
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 17081271d2fd7b0835bc900256de792607f9de25fad73e7bbbf267c8a47152d4 |
|
MD5 | b67ae09761dc21d74ece241d8c2a24a7 |
|
BLAKE2b-256 | 48a959626056660faabb005a85f9c70f0ea3fa59eb2f1dbe21e2705b4b09bb8f |