APKVolt
APKVolt is a Python-based build system for packaging Python (Kivy) applications into Android APK files using precompiled runtime templates.
It is designed as a build toolchain that injects application code and assets into a structured APK template, then reconstructs and aligns the final package into a valid installable Android APK.
Overview
APKVolt works by:
- Using a precompiled Android runtime template
- Injecting Python application code and assets into the APK structure
- Updating APK metadata (manifest, resources, package info)
- Rebuilding ZIP/APK binary structure (Local Headers, Central Directory, EOCD)
- Applying Android-compatible alignment rules
- Optionally signing the final APK
Features
- APK binary parsing and reconstruction
- Template-based APK generation system
- Python/Kivy application packaging
- Native library (
.so) alignment support - APK metadata editing (package name, version, SDK levels)
- Asset injection (icons, splash screens, etc.)
- Secure APK signing (keystore-based, no CLI password exposure)
- CLI and Python library interface
- ZIP alignment system (zipalign-compatible behavior)
Installation
From pip:
pip install apkvolt
From source:
git clone https://github.com/euluann/apkvolt
cd apkvolt
pip install .
Requirements
Python 3.11+
Linux or Termux environment recommended
CLI Usage
Build APK
apkvolt build . \
--sign \
--ks mykeystore.keystore \
--ks-alias alias \
--app-name "My App" \
--min-sdk-version 21 \
--target-sdk-version 34 \
--app-version-code 1 \
--app-version-name 0.1 \
--app-package mypack.package.package \
--icon icon.png \
--icon-bg icon-bg.png \
--icon-fg icon-fg.png \
--splash splash.jpg \
--output myapp.apk \
--log-level info
Align APK
apkvolt align \
app.apk \
aligned-app.apk \
-a 4 \
-s 4096
Show libraries included in APK
apkvolt libs
If credentials are not provided, APKVolt will securely prompt for them using interactive input.
Python Usage
from apkvolt import build, apkforge, zipalign
build(
"/path/myproject",
keystore_path="mykeystore.keystore",
key_alias="myalias",
keystore_pass="mykeystore_pass",
key_pass="mykey_pass",
apk_sign=True,
app_name="APKVolt App",
package="mypack.package.app",
version_name="0.1",
version_code=1,
min_sdk_version=21,
target_sdk_version=34,
icon="icon.png",
icon_background="icon_bg.png",
icon_foreground="icon_fg.png",
presplash="splash.png",
output="app.apk"
)
zipalign.align(
"app.apk",
"app_aligned.apk",
alignment=4,
so_alignment=4096
)
apkforge.APK.signer(
apk_path,
keystore_path,
key_alias,
keystore_pass="mypass",
key_pass="mypass"
)
Architecture
APKVolt build pipeline:
-
Load precompiled APK runtime template
-
Inject Python application into APK structure
-
Apply application metadata (manifest, package info, SDK levels)
-
Insert assets (icons, splash screens, resources)
-
Rebuild APK binary structure
-
Apply alignment rules
-
Optionally sign APK
Limitations
Strong dependency on Python 3.11 runtime environment for compile
Not a full source-to-native compiler (template-based system)
Requires careful version management of runtime APK base
Security
No password exposure via CLI arguments
Uses secure prompt input when needed
Recommended use of environment variables in automated environments
Project Goal
APKVolt aims to simplify Android application packaging for Python developers by providing a template-based build system for generating installable APKs without requiring a full native Android build toolchain.
License
MIT License. See LICENSE file for details.
Credits
See CREDITS.md for third-party assets and contributions.
Metadata
Release files for APKVolt 1.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| apkvolt-1.0.4.tar.gz | 69.6 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| apkvolt-1.0.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 139.3 MB
Release files / apkvolt-1.0.4.tar.gz
| Download URL | apkvolt-1.0.4.tar.gz |
|---|---|
| Size | 69.6 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
207a5a74182b2905b19f2e10eeef6e50a98792b36e6be99c55232c3ced709991
|
|
BLAKE2b-256 checksum How to use checksums |
247c88a2daedd36ad48b0885ec05582d9a4a42e6debae51f616cf7106fe2d2b2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.6
|
Release files / apkvolt-1.0.4-py3-none-any.whl
| Download URL | apkvolt-1.0.4-py3-none-any.whl |
|---|---|
| Size | 69.6 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1719b6ccf6961d8986756cb142d15f96e11d05d59d0042c2db6949737cbf8a83
|
|
BLAKE2b-256 checksum How to use checksums |
1ba1811d2003e529da46b03e5d9ee708240941e2eb2a4a1aa7f73f3de0962f2c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.6
|