# Contributing to OpenClaw on Android Thanks for your interest in contributing! This guide will help you get started. ## First-Time Contributors Welcome — contributions of all sizes are valued. If this is your first contribution: 1. **Find an issue.** Look for issues labeled [`good first issue`](https://github.com/AidanPark/openclaw-android/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) — these are scoped for newcomers. 2. **Pick a scope.** Good first contributions include: - Typo and documentation fixes - Shell script improvements - Bug fixes with clear reproduction steps 3. **Follow the fork → PR workflow** described below. ## Development Setup ### Shell Scripts (installer, updater, patches) ```bash # Clone the repo git clone https://github.com/AidanPark/openclaw-android.git cd openclaw-android # Validate shell scripts bash -n install.sh bash -n update-core.sh bash -n oa.sh ``` Shell scripts follow POSIX-compatible style with 4-space indentation. See `scripts/lib.sh` for shared conventions. ### Android App ```bash cd android # Build APK ./gradlew assembleDebug # Run lint checks ./gradlew ktlintCheck ./gradlew detekt # Format code ./gradlew ktlintFormat ``` **Prerequisites**: JDK 21, Android SDK (API 28+), NDK 28+, Node.js 22+ (for WebView UI). ### WebView UI ```bash cd android/www npm install npm run build ``` ### Enable Git Hooks ```bash git config core.hooksPath .githooks ``` This enables the pre-commit hook that automatically runs before every commit: - **Kotlin**: ktlint (formatting) + detekt (static analysis) - **Shell scripts**: shellcheck (requires `shellcheck` installed) - **Markdown**: markdownlint (requires `markdownlint-cli2` installed) - **WebView**: ESLint on TypeScript/React files in `android/www/` - **Sync check**: Verifies `post-setup.sh` root and app assets are identical ## How to Contribute ### 1. Fork and Clone ```bash git clone https://github.com//openclaw-android.git cd openclaw-android ``` ### 2. Make Your Changes All work happens on `main` — we use a single-branch workflow with no prefixes. ### 3. Test Your Changes - **Shell scripts**: Run `bash -n