# ANGRecompAndroid A work-in-progress Android port of **Drakengard** (PS2, USA, SLUS-20732, version 1.00), built by statically recompiling the game executable with [PS2Recomp](https://github.com/malvino11-28/PS2Recomp). This alpha is for testing the Android launcher and runner. Use your own dumped disc image. Build preparation generates native code for the supported ELF. The repository and APK omit the original disc files, BIOS and saves. ## Requirements - Android 9 or later (API 28) on an ARM64 device (`arm64-v8a`). - A local Drakengard USA 1.00 ISO. - For building on Windows, Python 3.10 or newer, Git Bash with GNU Make, and JDK 17 or 21. - Android Studio or Gradle 8.9, Android SDK 34, NDK 28.2.13676358, and SDK CMake 3.22.1. Initial preparation downloads build tools and dependencies. ## Preparing and building Check out the Android branch with its pinned submodule, then run the preparation script from the Android project directory. ```powershell git clone --recurse-submodules --branch android-port https://github.com/malvino11-28/ANGRecompAndroid.git cd ANGRecompAndroid/external/PS2Recomp/android python prepare_game.py --iso "D:/path/to/Drakengard.iso" ``` Preparation verifies the game executable, extracts the disc to `build/game/iso_extracted`, and generates the EE and VU sources. From the same directory in Git Bash, build the MPEG-2 decoder with the NDK used by Gradle. ```bash bash prepare_ffmpeg.sh /path/to/Android/Sdk/ndk/28.2.13676358 ``` Run `gradle :app:assembleRelease` from the Android project directory, or build the Release variant in Android Studio. The APK is at `external/PS2Recomp/android/app/build/outputs/apk/release/app-release.apk` relative to the repository root. See the [Android build notes](external/PS2Recomp/android/README.md) for logging and tracing. ## Preparing game files on Android Install the APK and place your uncompressed Drakengard USA 1.00 ISO somewhere the Android file picker can open it, such as Downloads. Open **Settings > Files > Import ISO**, select the image, and wait for **Game files ready**. The APK already contains the recompiled code. The launcher validates the ELF SHA-256 and extracts the 18 required disc files. Keep about 4.1 GiB plus a small reserve free while importing. If the provider can only stream the ISO, the launcher asks before making a temporary local copy, which requires additional space equal to the size of the ISO. Providers that cannot report the size of a stream require a local copy first. Close the game before using **Settings > Files > Delete game files**. The launcher asks for confirmation and estimates the space it will free. This removes the known disc files and leaves the source ISO, saves, memory cards and launcher preferences in place. You can import the ISO again at any time after the operation finishes. ### Manual installation with ADB Connect the phone with USB debugging enabled. From the Android project directory, install the APK and copy the disc files prepared above into the app's external files directory. For the downloadable APK, substitute its path in the install command. ```powershell $disc = 'build/game/iso_extracted' $gameFiles = '/sdcard/Android/data/com.ps2x.runner/files' adb install -r app/build/outputs/apk/release/app-release.apk adb shell mkdir -p $gameFiles $files = 'SLUS_207.32', 'SYSTEM.CNF', 'FACEUC.BIN', 'IMAGE.BIN', 'MOVIE0UC.BIN', 'MOVIE1UC.BIN', 'SNDIMGUC.BIN', 'VOICEUC.BIN', 'MODULES' foreach ($file in $files) { adb push "$disc/$file" "$gameFiles/" } ``` The launcher verifies the ELF's SHA-256 and checks the expected disc files for readability and size. Use **Check Files** if the launcher was open during copying. **Play** becomes available once the check passes. ## Launcher options - The launcher, settings and game open in landscape. - The launcher defaults to Portuguese and remembers a switch to English. The choice applies to launcher text and touch labels. - Video offers **Sharp** (default) and **Smooth** (experimental). Smooth uses bilinear filtering on the final image. Both use 4:3 with the same internal resolution. - Touch controls are enabled by default. The left stick sends analog movement. Square attacks, Cross confirms in menus, and Start sends the PS2 Start command. The overlay can be disabled in Controls. - Audio and Saved Games are placeholders. ## Known limitations Earlier builds reached gameplay and decoded MPEG-2 scenes on the Galaxy A54 (SM-A546E, Mali). Recorded gameplay averaged about 2–3 guest VSync/s, with severe audio dropouts caused by low sample production. ISO import and deletion in alpha.2 were tested successfully on the Galaxy A54 (SM-A546E, Mali-G68). Snapdragon devices, including the Galaxy S23, have not been tested. ## Credits and license - **Berry** and contributors for the [original Drakengard-PC port](https://github.com/Berry-Wilson/Drakengard-PC). - [PS2Recomp](https://github.com/ran-j/PS2Recomp) by ran-j and contributors. - [raylib](https://www.raylib.com/) for the Android window and audio backend. - [FFmpeg 7.1.5 source](https://ffmpeg.org/releases/ffmpeg-7.1.5.tar.xz) for the statically linked LGPL MPEG-2 decoder and pixel conversion. Its version, checksum and build configuration are in [prepare_ffmpeg.sh](external/PS2Recomp/android/prepare_ffmpeg.sh). GPL-3.0. See [LICENSE](LICENSE).