Skip to main content

Build Python projects into Android APKs

Project description

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 . \
  --app-name "APKVolt App" \
  --app-package mypack.package.app \
  --app-version-name 0.1 \
  --app-version-code 1 \
  --min-sdk-version 21 \
  --target-sdk-version 34 \
  --icon icon.png \
  --splash splash.png \
  --output app.apk

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=".",
    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",
    splash="splash.png",
    output="app.apk"
)

zipalign.align(
    "app.apk",
    output="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:

  1. Load precompiled APK runtime template

  2. Inject Python application into APK structure

  3. Apply application metadata (manifest, package info, SDK levels)

  4. Insert assets (icons, splash screens, resources)

  5. Rebuild APK binary structure

  6. Apply alignment rules

  7. 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.

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

apkvolt-1.0.3.tar.gz (69.6 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

apkvolt-1.0.3-py3-none-any.whl (69.6 MB view details)

Uploaded Python 3

File details

Details for the file apkvolt-1.0.3.tar.gz.

File metadata

  • Download URL: apkvolt-1.0.3.tar.gz
  • Upload date:
  • Size: 69.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.6

File hashes

Hashes for apkvolt-1.0.3.tar.gz
Algorithm Hash digest
SHA256 099f9ec639bce6482a4dfd5f7b524b0b0f067d0143c9dac21fd646314f07b3f2
MD5 68f3091aa4ac44c9d2df4a6110c7f216
BLAKE2b-256 69d1be500fea5caf2013c0bf09dc8eea277699e7f36f5b2cb508bc25c6cfb2c0

See more details on using hashes here.

File details

Details for the file apkvolt-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: apkvolt-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 69.6 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.6

File hashes

Hashes for apkvolt-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 920d5385b9b0612c911bae6609132f7a4037d5f81853cd1de9a7110a4a6c7712
MD5 197894eee138612986396fbdc5dc7396
BLAKE2b-256 a370c10333794852dca02e8e3e1a0176d2eca67576d85f491479fec36a72b0b4

See more details on using hashes here.

Supported by

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