Skip to content

About

apkgen – CLI tool for Termux to generate Android APKs from a template: clone, rename package, restructure source, build debug/release.

Resources

Stars

18 stars

Watchers

0 watching

Forks

Latest commit

 

History

17 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

apkgen-cli

⚡ A CLI tool to quickly generate Android APKs from local templates

📖 Table of Contents


📋 Prerequisites

Before using apkgen-cli, ensure your environment meets these requirements:

  • Termux installed from F-Droid (recommended) or GitHub
  • TermuxVoid repository configured
  • Android 7+ with ~1GB free storage
  • Working internet connection for initial setup

🚀 Installation

Getting started is seamless. Run the following in your Termux terminal:

apt install apkgen-cli -y

Tip

After installation, run apkgen help to verify everything is working correctly.


⚡ Quick Start

# Open the interactive menu
apkgen

# Or run commands directly:

# Scaffold a new Java project
apkgen create myapp

# Enter the project directory
cd myapp

# Build a debug APK
apkgen build debug

# Output: app/build/outputs/apk/debug/app-debug.apk

🔧 Commands

apkgen

Launches an interactive menu for creating, building and cleaning projects. If there is no TTY (or gum is unavailable), it prints help instead, so scripts never get stuck in a prompt.

apkgen

create <directory> [--kotlin|--flutter|--nativec|--nativecpp]

Clones the project template into a new directory and prompts for app name and package name. Defaults to Java if no flag is specified.

# Java project (default)
apkgen create myapp

# Kotlin project
apkgen create myapp --kotlin

# Flutter project
apkgen create myapp --flutter

# Native C++ project
apkgen create myapp --nativecpp

# Native C project
apkgen create myapp --nativec

build debug

Compiles a debug APK. The project type is auto-detected: Flutter projects get split ABI outputs, everything else uses Gradle.

apkgen build debug

build release

Compiles a release APK. Flutter projects produce a universal APK signed with the debug key (testing only); Gradle projects produce an unsigned APK you sign manually with apksigner or jarsigner.

apkgen build release

build flutter

Legacy alias for Flutter projects. Defaults to debug; accepts debug or release.

apkgen build flutter
apkgen build flutter release

clean

Removes all build artifacts from the project directory.

apkgen clean

version

Prints the apkgen version.

apkgen version

help

Prints usage information.

apkgen help

📊 Command Reference

Command Description
apkgen Open the interactive menu
create <dir> Scaffold Java project (default)
create <dir> --kotlin Scaffold Kotlin project
create <dir> --flutter Scaffold Flutter project
create <dir> --nativecpp Scaffold Native C++ project
create <dir> --nativec Scaffold Native C project
build debug Build debug APK (auto-detects Flutter/Gradle)
build release Build release APK (auto-detects Flutter/Gradle)
build flutter Legacy Flutter alias (debug by default)
clean Remove build outputs
version Show the apkgen version
help Show help text

📂 Output

Android (Java/Kotlin/Native C/C++)

Built APKs are placed in:

app/build/outputs/apk/
├── debug/app-debug.apk
└── release/app-release-unsigned.apk

Flutter

build/app/outputs/flutter-apk/
├── app-<abi>-debug.apk   # one per ABI (debug)
└── app-release.apk       # universal (release, debug-signed)

💡 Examples

# Create and build a Java app
apkgen create myapp
cd myapp && apkgen build debug

# Create and build a Kotlin app
apkgen create myapp --kotlin
cd myapp && apkgen build debug

# Create and build a Flutter app
apkgen create myflutter --flutter
cd myflutter && apkgen build debug
cd myflutter && apkgen build release

# Create a Native C++ app
apkgen create myapp --nativecpp
cd myapp && apkgen build debug

# Create a Native C app
apkgen create myapp --nativec
cd myapp && apkgen build debug

# Clean build artifacts
apkgen clean

🌐 Support & Community

Join the TermuxVoid community for support and updates.


Built with ❤️ for security researchers by Alienkrishn | Termux-optimized builds

About

apkgen – CLI tool for Termux to generate Android APKs from a template: clone, rename package, restructure source, build debug/release.

Resources

Stars

18 stars

Watchers

0 watching

Forks

Releases

Sponsor this project

Packages

Contributors

Languages