90 lines
2.2 KiB
Markdown
90 lines
2.2 KiB
Markdown
# Building ISO Droid
|
|
|
|
This document explains how to build ISO Droid from source.
|
|
|
|
## Requirements
|
|
|
|
- **Android Studio** (or command-line Gradle)
|
|
- **Android SDK** (API 26+)
|
|
- **Android NDK** (for compiling isodrive binary)
|
|
- **Git** (with submodule support)
|
|
|
|
## Building from Source
|
|
|
|
### 1. Clone with Submodules
|
|
|
|
ISO Droid uses [isodrive](https://git.shihaam.dev/shihaam/isodrive) as a git submodule. Clone with submodules:
|
|
|
|
```bash
|
|
git clone --recurse-submodules https://git.shihaam.dev/shihaam/ISODroid.git
|
|
cd ISODroid
|
|
```
|
|
|
|
Or if already cloned, initialize submodules:
|
|
|
|
```bash
|
|
git submodule update --init
|
|
```
|
|
|
|
### 2. Install Android NDK
|
|
|
|
The isodrive binary is compiled from source during the build. This requires the Android NDK.
|
|
|
|
**Android Studio:**
|
|
1. Go to **Tools → SDK Manager**
|
|
2. Click **SDK Tools** tab
|
|
3. Check **NDK (Side by side)**
|
|
4. Click **Apply**
|
|
|
|
**NixOS:**
|
|
The build automatically uses `nix-shell` to get the NDK if available.
|
|
|
|
**Manual:**
|
|
Set `ANDROID_NDK_HOME` environment variable to your NDK path.
|
|
|
|
### 3. Build
|
|
|
|
```bash
|
|
# Build debug APK
|
|
./gradlew assembleDebug
|
|
|
|
# Or build release APK (requires signing configuration)
|
|
./gradlew assembleRelease
|
|
```
|
|
|
|
The Gradle build will automatically:
|
|
- Compile isodrive for all architectures (arm64-v8a, armeabi-v7a, x86_64, x86)
|
|
- Bundle the binaries into the APK assets
|
|
- Skip compilation if binaries already exist
|
|
|
|
**Output locations:**
|
|
- Debug: `app/build/outputs/apk/debug/app-debug.apk`
|
|
- Release: `app/build/outputs/apk/release/app-release.apk`
|
|
|
|
### Build from Android Studio
|
|
|
|
1. Open the project in Android Studio
|
|
2. Ensure NDK is installed (see above)
|
|
3. Click **Build → Build Bundle(s) / APK(s) → Build APK(s)**
|
|
|
|
The isodrive binary will be compiled automatically before the APK is built.
|
|
|
|
### Manual isodrive Build (Optional)
|
|
|
|
To manually trigger isodrive compilation:
|
|
|
|
```bash
|
|
./gradlew buildIsodrive
|
|
```
|
|
|
|
To force rebuild, delete existing binaries first:
|
|
|
|
```bash
|
|
rm -rf app/src/main/assets/bin/*/isodrive
|
|
./gradlew buildIsodrive
|
|
```
|
|
|
|
## F-Droid Build
|
|
|
|
F-Droid uses `srclibs` instead of git submodules. The F-Droid metadata pre-builds isodrive before running Gradle, so the Gradle task skips compilation (binaries already exist).
|