npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

x2y-android-runtime

v0.2.1

Published

A next-generation software development kit that provides direct, programmatic control over Android native toolchains—including ADB, Gradle, JDK, and APK signing—enabling full automation of Android project creation, build, deployment, and device interactio

Readme

x2y-Android-Runtime: Unleashing Lean, Command-Line Android Automation

License: MIT Maintenance npm version

x2y-Android-Runtime by x2y dev tools is a powerful, self-contained Android automation runtime meticulously crafted for developers who prioritize precision, efficiency, and programmatic control over the complexities and overhead of traditional IDEs. Say goodbye to the need for Android Studio for every build, test, or deployment task.

This runtime liberates your development workflow, enabling you to generate, build, sign, and manage Android applications entirely from the Command Line Interface (CLI) or through JavaScript APIs. It provides a direct, unencumbered pathway to the real Android toolchain, putting full control at your fingertips.


Why Choose x2y-Android-Runtime?

We believe in empowering developers with tools that are powerful without being bloated. x2y-Android-Runtime is built on this philosophy, offering:

  • IDE-Free Development: Perform critical Android development tasks without opening Android Studio, perfect for lightweight scripting and server environments.
  • Full Programmatic Access: Control every stage of your app's lifecycle with robust CLI commands or integrate seamlessly into custom JavaScript pipelines.
  • Official Toolchain Reliability: Directly leverages the trusted, official Android system tools (adb, gradlew, keytool, apksigner, zipalign) ensuring compatibility, performance, and security, just like Android Studio does under the hood. No custom compilers or non-standard build processes.
  • Streamlined Automation: Designed from the ground up for integration into Continuous Integration/Continuous Deployment (CI/CD) pipelines, custom build systems, or simple automation scripts.

Core Capabilities:

With x2y-Android-Runtime, you gain comprehensive control over your Android projects:

  • Project Generation: Swiftly scaffold complete Android application projects, including Java source files, AndroidManifest.xml, and essential resources.
  • Robust Building: Compile and assemble installable APKs using the official Gradle Wrapper, ensuring standard and reliable build processes.
  • Secure Signing: Effortlessly sign your APKs using your established production keystores or automatically generate debug keystores for rapid development and testing.
  • Build Optimization: Enhance your application's performance and reduce file size with integrated zipalign optimization.
  • Device Management: Interact with connected Android devices and emulators, enabling installation, debugging, and other ADB operations.
  • End-to-End Automation: Automate the entire app build and deployment cycle, making it ideal for CI/CD environments and bespoke development workflows.

x2y-Android-Runtime is your go-to solution for agile, precise, and automated Android application development. Dive in and experience a new level of control over your Android builds.

📖 Table of Contents

✨ Features

x2y-Android-Runtime provides a robust set of features for command-line and programmatic Android automation:

  • IDE-Free Workflow: Develop, build, and deploy Android apps without needing Android Studio.
  • Comprehensive Programmatic Control: Utilize CLI commands or JavaScript APIs for full lifecycle management.
  • Official Android Toolchain Integration: Leverages adb, gradlew, keytool, apksigner, and zipalign for reliability and compatibility.
  • CI/CD Ready: Designed for seamless integration into automated build and deployment pipelines.
  • Project Scaffolding: Quickly generate new Android projects with standard structure.
  • APK Building: Compile and assemble APKs using Gradle.
  • Flexible Signing: Support for both debug and production keystore signing.
  • APK Optimization: Automatic zipalign for optimized APKs.
  • Device Interaction: Manage connected devices and emulators via ADB operations.
  • End-to-End Automation: Automate the entire app build and deployment cycle.

🚀 Technologies Used

This project leverages the following key technologies and tools:

  • Node.js: The primary runtime environment for x2y-Android-Runtime.
  • Java Development Kit (JDK): Essential for compiling Java code and using tools like keytool.
  • Android SDK: Provides core Android development tools, including:
    • Android Build Tools: For compiling and packaging Android applications.
    • Android Platform Tools: Includes adb (Android Debug Bridge) for device interaction.
  • Gradle: The build automation system used for Android projects.
  • Official Android Toolchain:
    • gradlew (Gradle Wrapper)
    • keytool
    • apksigner
    • zipalign

⚙️ Requirements

To get started with x2y-Android-Runtime, ensure you have the following installed:

| Tool | Version | Installation Guide | | :-------------------- | :---------- | :------------------------------------------------------- | | Node.js | v18+ | https://nodejs.org | | JDK 17 (Temurin) | 17 | https://adoptium.net/temurin/releases/?version=17 | | Android SDK | + build-tools | Required - Install via Android Studio or CLI tools |

After installation, confirm everything works by running:

keytool -help
adb version

📦 Installation

Global CLI:

To install x2y-android-runtime globally and use its CLI commands:

npm install -g x2y-android-runtime

Local Project Use:

To install x2y-android-runtime as a dependency in your local project:

npm install x2y-android-runtime

🛠️ Usage

CLI Usage

x2y-android-runtime provides a powerful Command Line Interface for direct interaction.

1. List Connected Devices

x2y-android devices

Example output:

Connected devices:
emulator-5554 (device)
ABC123DEF456 (offline)

2. Build a Real APK

This command builds, signs, and optimizes an Android application.

x2y-android build \
  -p ./my-app \
  -n "My Awesome App" \
  -k ./my-release.keystore \
  -K "keystore_password" \
  -a "my-key-alias" \
  -A "key_password"

If no keystore is provided, a debug keystore is generated automatically (JDK required).

On success:

Build successful.
APK: C:\path\to\my-app\app\build\outputs\apk\debug\app-debug.apk

JavaScript Usage

Integrate x2y-android-runtime directly into your Node.js scripts for custom automation pipelines:

const { build } = require('x2y-android-runtime');

(async () => {
  try {
    const apkPath = await build.buildAndroidApp({
      projectPath: './my-app',
      appName: 'MyApp',
      keystorePath: './debug.keystore', // Optional: if omitted, debug keystore is auto-generated
      keystorePassword: 'android',
      keyAlias: 'androiddebugkey',
      keyPassword: 'android'
    });

    console.log('APK ready:', apkPath);
  } catch (err) {
    console.error('Build failed:', err.message);
  }
})();

Auto-Generated Project Structure

When you create a new project using x2y-android-runtime, it generates a standard Android project structure:

my-app/
├── app/
│   ├── build.gradle
│   ├── src/main/
│   │   ├── AndroidManifest.xml
│   │   ├── java/com/x2y/myapp/MainActivity.java
│   │   └── res/
├── gradlew.bat
├── gradle/
│   └── wrapper/
│       └── gradle-wrapper.properties
├── build.gradle
└── settings.gradle

This structure is fully compatible with Android Studio, allowing you to seamlessly transition between command-line automation and graphical development as needed.

Signing & Security

x2y-android-runtime adheres to standard Android signing practices:

  • Debug Builds: Automatically use the default Android debug keystore for development and testing.
  • Production Builds: Require you to provide your own release keystore for secure signing.
  • Official Tooling: All signing operations are performed using the official apksigner tool, ensuring industry-standard security.

❗ Troubleshooting

Encountering issues? Here are some common problems and their solutions:

| Error | Fix | | :-------------------------------- | :----------------------------------------------------------------------- | | Build failed: Command failed | Ensure Android build-tools are installed as part of your Android SDK. | | Gradle wrapper not found | You likely need to create an Android project first using x2y-android create or ensure you're in the correct project directory. | | adb is not recognized | Install Android Platform-Tools and ensure its platform-tools directory is in your system's PATH environment variable. | | keytool is not recognized | Install JDK 17 (or compatible) and add its bin directory to your system's PATH environment variable. |

If you're still facing issues, please refer to the official Android documentation or open an issue on our GitHub repository.

🤝 Contributing

We welcome contributions to x2y-Android-Runtime! If you're interested in improving the project, please follow these guidelines:

  1. Fork the repository.
  2. Create a new branch for your feature or bug fix (git checkout -b feature/your-feature-name).
  3. Make your changes and ensure they adhere to our coding standards.
  4. Write comprehensive tests for your changes.
  5. Commit your changes with a clear and descriptive message.
  6. Push your branch to your forked repository.
  7. Open a Pull Request to the main branch of the original repository.

Please ensure your code is well-documented and your pull request description clearly explains the problem it solves or the feature it adds.

📜 License

This project is released under the MIT License – feel free to use, modify, and distribute it as you wish. See the LICENSE file for more details.

📞 Contact

For questions, feedback, or support, please reach out to:

x2y dev tools https://x2ydevs.xyz

Building powerful, open Android automation tools for developers.