
android-build
Use when building Android apps (Gradle CLI) or ROMs (AOSP, LineageOS). Triggers on "gradle build", "assemble", "AOSP", "LineageOS", "lunch", "mka", "breakfast", "brunch", "compile android", "device tree", "kernel build".
- Installs
- 267
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/hyperb1iss/hyperdroid-skill --skill android-build- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads android-build automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
Android Build Systems
This skill covers building Android apps via Gradle CLI and building custom ROMs via AOSP/LineageOS.
App Building (Gradle CLI)
Essential Commands
./gradlew tasks # List available tasks
./gradlew assembleDebug # Build debug APK
./gradlew assembleRelease # Build release APK
./gradlew installDebug # Build + install to device
./gradlew bundleRelease # Build AAB (App Bundle)
# APK output location
# app/build/outputs/apk/debug/app-debug.apk
# app/build/outputs/apk/release/app-release.apk
Build Variants
./gradlew assembleFreeDebug # Flavor + build type
./gradlew assemblePaidRelease
./gradlew assembleDebug --info # Verbose output
./gradlew assembleRelease -x test # Skip tests
Testing
./gradlew test # Unit tests
./gradlew testDebugUnitTest # Debug unit tests only
./gradlew connectedAndroidTest # Instrumented tests
./gradlew connectedCheck # All connected tests
# Run specific test
./gradlew test --tests "*.MyTestClass"
Linting & Analysis
./gradlew lint # Run lint
./gradlew lintDebug # Debug only (faster)
./gradlew ktlintCheck # Kotlin style (if configured)
./gradlew detekt # Detekt analysis (if configured)
Clean & Refresh
./gradlew clean # Clean build
./gradlew clean assembleDebug # Clean + build
./gradlew --refresh-dependencies # Force dependency refresh
./gradlew --stop # Stop Gradle daemon
Dependencies
./gradlew dependencies # All dependencies
./gradlew app:dependencies # Module dependencies
./gradlew dependencyInsight --dependency <name>
Signing
Debug keystore location:
- Linux:
~/.android/debug.keystore - macOS:
~/.android/debug.keystore - Windows:
C:\Users\<user>\.android\debug.keystore
Password: android, Alias: androiddebugkey
# Create release keystore
keytool -genkey -v -keystore release.keystore \
-alias my-key-alias -keyalg RSA -keysize 2048 -validity 10000
Performance
./gradlew assembleDebug --parallel # Parallel builds
./gradlew assembleDebug --build-cache # Use cache
./gradlew assembleDebug --offline # Offline mode
./gradlew --scan # Build scan (uploads data)
./gradlew --profile # Local profile report
gradle.properties Optimization
org.gradle.jvmargs=-Xmx4g -XX:+HeapDumpOnOutOfMemoryError
org.gradle.parallel=true
org.gradle.caching=true
org.gradle.configuration-cache=true
android.useAndroidX=true
SDK Management
sdkmanager
sdkmanager --list # List available packages
sdkmanager --list | grep system # Filter system images
sdkmanager "platform-tools" # Install package
sdkmanager "platforms;android-34" # Install platform
sdkmanager "system-images;android-34;google_apis;x86_64"
sdkmanager --update # Update all
sdkmanager --licenses # Accept licenses
avdmanager
avdmanager list device # List device profiles
avdmanager list avd # List created AVDs
# Create AVD
avdmanager create avd -n my_avd \
-k "system-images;android-34;google_apis;x86_64" \
-d pixel_6
avdmanager delete avd -n my_avd
Emulator CLI
emulator -list-avds # List AVDs
emulator @my_avd # Start AVD
emulator @my_avd -no-snapshot # Fresh boot
emulator @my_avd -no-window # Headless
emulator @my_avd -wipe-data # Factory reset
ROM Building (AOSP/LineageOS)
Environment Setup
# Install repo tool
mkdir -p ~/.bin
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/.bin/repo
chmod a+x ~/.bin/repo
export PATH="$HOME/.bin:$PATH"
# Initialize repo
mkdir android && cd android
repo init -u https://github.com/LineageOS/android.git -b lineage-21.0
# Or AOSP: repo init -u https://android.googlesource.com/platform/manifest
# Sync source
repo sync -c -j$(nproc) --force-sync --no-tags --no-clone-bundle
Build Commands
# Setup environment
source build/envsetup.sh
# Select device
lunch <device>-userdebug # AOSP
breakfast <device> # LineageOS
# Build
m # Full build
mka bacon # LineageOS (with flashable zip)
mka bootimage # Just boot.img
mka systemimage # Just system
# Parallel build
m -j$(nproc)
Build Variants
| Variant | Purpose |
|---|---|
user | Production, no root, limited debugging |
userdebug | Like user + root + debugging |
eng | Development, all debug tools |
Common Targets
m bootimage # Kernel + ramdisk
m systemimage # System partition
m vendorimage # Vendor partition
m otapackage # OTA zip
mka bacon # LineageOS flashable zip
# Module-specific
m Settings # Just Settings app
mm # Build current directory
mmm packages/apps/Settings # Build specific path
LineageOS Specifics
breakfast <device> # Setup + sync device deps
brunch <device> # breakfast + mka bacon
# Cherry-pick from Gerrit
repopick <change_number>
repopick -t <topic>
# Sync specific project
repo sync packages/apps/Settings
Build Output
out/target/product/<device>/
├── boot.img # Kernel + ramdisk
├── system.img # System partition
├── vendor.img # Vendor partition
├── lineage-*.zip # Flashable zip (LineageOS)
└── recovery.img # Recovery (non-A/B)
Device Trees
Structure
device/<vendor>/<device>/
├── AndroidProducts.mk # Product makefiles list
├── BoardConfig.mk # Board configuration
├── device.mk # Device makefile
├── lineage_<device>.mk # LineageOS product
├── extract-files.sh # Vendor blob extraction
├── proprietary-files.txt # Blob list
├── sepolicy/ # SELinux policies
└── overlay/ # Resource overlays
Key Files
BoardConfig.mk - Hardware configuration:
TARGET_ARCH := arm64
TARGET_BOARD_PLATFORM := <platform>
TARGET_BOOTLOADER_BOARD_NAME := <device>
BOARD_KERNEL_CMDLINE := ...
BOARD_BOOT_HEADER_VERSION := 4
device.mk - Device packages:
PRODUCT_PACKAGES += \
android.hardware.audio@7.0-impl \
audio.primary.$(TARGET_BOARD_PLATFORM)
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/configs/audio_policy.conf:...
Kernel Building
Standalone
# Setup
export ARCH=arm64
export CROSS_COMPILE=aarch64-linux-gnu-
# Or for Clang:
export CC=clang
export CLANG_TRIPLE=aarch64-linux-gnu-
# Configure
make <device>_defconfig
# Build
make -j$(nproc)
# Output
arch/arm64/boot/Image.gz
In AOSP Tree
# In BoardConfig.mk
TARGET_KERNEL_SOURCE := kernel/<vendor>/<device>
TARGET_KERNEL_CONFIG := <device>_defconfig
TARGET_KERNEL_CLANG_COMPILE := true
Troubleshooting
Common Gradle Issues
# OOM
export GRADLE_OPTS="-Xmx4g"
# Daemon issues
./gradlew --stop
rm -rf ~/.gradle/daemon
# Cache issues
./gradlew clean --refresh-dependencies
Common AOSP Issues
# Ninja error - usually dependency issue
m clean && m
# Jack server (old builds)
./prebuilts/sdk/tools/jack-admin kill-server
./prebuilts/sdk/tools/jack-admin start-server
# SELinux issues
audit2allow -i audit.log
Build Logs
# Gradle
./gradlew assembleDebug --stacktrace
./gradlew assembleDebug --info
# AOSP
m 2>&1 | tee build.log
Quick Reference
Gradle
| Task | Command |
|---|---|
| Build debug | ./gradlew assembleDebug |
| Build release | ./gradlew assembleRelease |
| Install | ./gradlew installDebug |
| Test | ./gradlew test |
| Lint | ./gradlew lint |
| Clean | ./gradlew clean |
| Dependencies | ./gradlew dependencies |
AOSP/LineageOS
| Task | Command |
|---|---|
| Setup env | source build/envsetup.sh |
| Select device | lunch <device>-userdebug |
| Full build | m |
| LineageOS zip | mka bacon |
| Just boot | mka bootimage |
| Sync | repo sync -c -j$(nproc) |
FAQ
What does the android-build skill do?
Use when building Android apps (Gradle CLI) or ROMs (AOSP, LineageOS). Triggers on "gradle build", "assemble", "AOSP", "LineageOS", "lunch", "mka", "breakfast", "brunch", "compile android", "device tree", "kernel build".
How do I install android-build?
Run npx skills add https://github.com/hyperb1iss/hyperdroid-skill --skill android-build in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/android-build/ (personal) or .claude/skills/android-build/ (project).
Which AI agents can use android-build?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is android-build safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains android-build?
It is published by hyperb1iss in hyperb1iss/hyperdroid-skill. It has 267 recorded installs.
More from hyperb1iss/hyperdroid-skill
android
hyperb1iss/hyperdroid-skill
Use when working with Android devices via ADB - connecting devices, running shell commands, installing apps, debugging, taking screenshots, UI automation, viewing logs, analyzing crashes, or exploring system internals. Triggers on "adb", "logcat", "install apk", "debug android", "android device", "shell command", "screenshot", "dumpsys", "crash", "ANR".
android-fastboot
hyperb1iss/hyperdroid-skill
Open the skill to read its SKILL.md instructions.
Popular mobile skills
design-mobile-apps
designed-by-ai/skills
Design mobile app screens with Sleek, edit Sleek projects, and implement their designs in React Native or HTML.
ios-design
uizze.sh
Design and review iOS UI/UX for iPhone apps in SwiftUI, UIKit, or React Native. Use for mobile app design, screen redesigns, navigation flows, typography, forms, keyboard and safe-area layout, and accessibility checks. Apply Apple Human Interface Guidelines and consult real product references through the optional Uizze connection.
vercel-react-native-skills
vercel-labs/agent-skills
React Native and Expo best practices for building performant mobile apps. Use when building React Native components, optimizing list performance, implementing animations, or working with native modules. Triggers on tasks involving React Native, Expo, mobile performance, or native platform APIs.
animate-expo
emilkowalski/skills
Build animations in React Native and Expo, making the decisions in the order that determines whether they feel right — should it animate, which thread it runs on, which properties, spring or timing, how the gesture hands off, how it degrades. Writes the implementation with Reanimated, Gesture Handler, Expo Router and expo-haptics. Use when animating anything in an Expo app, adding gestures, sheets, screen transitions, press feedback or haptics, or fixing motion that stutters on device. For web animation use animate.
xcode-project-setup
firebase/agent-skills
Safely modifies Xcode projects (.pbxproj) to add Swift Packages and link files. Use this skill whenever an iOS project needs dependencies installed (e.g. Firebase, Alamofire).
firebase-remote-config-basics
firebase/agent-skills
Manages Firebase Remote Config templates, feature flags, loading strategies, and SDKs (Android, iOS). Use when downloading/deploying remoteconfig JSON templates, managing version history/feature flags, setting in-app defaults, fetchAndActivate(), real-time listeners, or SDK setup. Don't use for Firebase Hosting, Auth, Firestore, Data Connect, Crashlytics, or App Hosting.