2025-12-03 06:40:11 +01:00
# Android
2025-09-08 19:21:38 +02:00
## Dependencies
2025-12-03 06:40:11 +01:00
2025-09-08 19:21:38 +02:00
* [Android Studio ](https://developer.android.com/studio )
2025-09-18 02:37:02 +02:00
* [NDK 27+ and CMake 3.22.1 ](https://developer.android.com/studio/projects/install-ndk#default-version )
2025-09-08 19:21:38 +02:00
* [Git ](https://git-scm.com/download )
2025-12-03 06:40:11 +01:00
## WINDOWS ONLY - Additional Dependencies
* **[Visual Studio 2022 Community ](https://visualstudio.microsoft.com/downloads/ )** - **Make sure to select "Desktop development with C++" support in the installer. Make sure to update to the latest version if already installed. **
* **[Vulkan SDK ](https://vulkan.lunarg.com/sdk/home#windows )** - **Make sure to select Latest SDK. **
* A convenience script to install the latest SDK is provided in `.ci\windows\install-vulkan-sdk.ps1` .
2025-09-08 19:21:38 +02:00
## Cloning Eden with Git
2025-12-03 06:40:11 +01:00
``` sh
2025-09-08 19:21:38 +02:00
git clone --recursive https://git.eden-emu.dev/eden-emu/eden.git
```
2025-12-03 06:40:11 +01:00
Eden by default will be cloned into:
2025-09-08 19:21:38 +02:00
* `C:\Users\<user-name>\eden` on Windows
2025-09-18 02:37:02 +02:00
* `~/eden` on Linux and macOS
2025-09-08 19:21:38 +02:00
## Building
2025-12-03 06:40:11 +01:00
2025-09-08 19:21:38 +02:00
1. Start Android Studio, on the startup dialog select `Open` .
2. Navigate to the `eden/src/android` directory and click on `OK` .
3. In `Build > Select Build Variant` , select `release` or `relWithDebInfo` as the "Active build variant".
4. Build the project with `Build > Make Project` or run it on an Android device with `Run > Run 'app'` .
## Building with Terminal
2025-12-03 06:40:11 +01:00
2025-09-08 19:21:38 +02:00
1. Download the SDK and NDK from Android Studio.
2. Navigate to SDK and NDK paths.
3. Then set ANDROID_SDK_ROOT and ANDROID_NDK_ROOT in terminal via
`export ANDROID_SDK_ROOT=path/to/sdk`
`export ANDROID_NDK_ROOT=path/to/ndk` .
4. Navigate to `eden/src/android` .
2025-09-18 02:37:02 +02:00
5. Then Build with `./gradlew assembleRelWithDebInfo` .
2025-09-08 19:21:38 +02:00
6. To build the optimised build use `./gradlew assembleGenshinSpoofRelWithDebInfo` .
2025-10-08 01:04:18 +02:00
7. You can pass extra variables to cmake via `-PYUZU_ANDROID_ARGS="-D..."`
2025-09-08 19:21:38 +02:00
2025-10-20 14:25:03 +02:00
Remember to have a Java SDK installed if not already, on Debian and similar this is done with `sudo apt install openjdk-17-jdk` .
2025-09-08 19:21:38 +02:00
### Script
2025-12-03 06:40:11 +01:00
A convenience script for building is provided in `.ci/android/build.sh` . On Windows, this must be run in Git Bash or MSYS2. This script provides the following options:
``` txt
Usage: build.sh [-c|--chromeos] [-t|--target FLAVOR] [-b|--build-type BUILD_TYPE]
[-h|--help] [-r|--release] [extra options]
Build script for Android.
Associated variables can be set outside the script,
and will apply both to this script and the packaging script.
bool values are "true" or "false"
Options:
-c, --chromeos Build for ChromeOS (x86_64) (variable: CHROMEOS, bool)
Default: false
-r, --release Enable update checker. If set, sets the DEVEL bool variable to false.
By default, DEVEL is true.
-t, --target <FLAVOR> Build flavor (variable: TARGET)
Valid values are: legacy, optimized, standard
Default: standard
-b, --build-type <TYPE> Build type (variable: TYPE)
Valid values are: Release, RelWithDebInfo, Debug
Default: Debug
Extra arguments are passed to CMake (e.g. -DCMAKE_OPTION_NAME=VALUE)
Set the CCACHE variable to "true" to enable build caching.
The APK and AAB will be output into "artifacts".
```
Examples:
2026-01-03 01:38:45 +01:00
* Build legacy release with update checker:
* `.ci/android/build.sh -r -t legacy`
2025-12-03 06:40:11 +01:00
* Build standard release with debug info without update checker for phones:
* `.ci/android/build.sh -b RelWithDebInfo`
2026-01-03 01:38:45 +01:00
* Build optimized release with update checker for ChromeOS:
* `.ci/android/build.sh -c -r -t optimized`
2025-09-08 19:21:38 +02:00
### Additional Resources
2025-12-03 06:40:11 +01:00
<https://developer.android.com/studio/intro>