- Android (#113, @yyan160; graphics engine and shader-bundle packer from @biglawine's HarmonyOS port): an Android app (dm/android) with a JNI host, a touch overlay on the shared touch state machine, Vulkan presentation and AAudio sound; an NVN-to-Vulkan replay engine (dm/gfx/vulkan) behind the same backend interface as Metal; the shared host now builds for Apple and Android, and the module rewriter has an Android target (DM_TARGET=android; Apple output unchanged). Measured by the authors at a median 60 fps on a Redmi K50 Ultra. - Android install with your own game files: the release APK (dm/android/tools/shell_apk.sh) contains no game content; dm/tools/d2rm_android.py makes an import pack (rewritten program, Vulkan shader bundles, touch overlay, data tables) that the App imports from Download/S2X/D2R Mobile/android with a progress screen. The shader export step (dm/gfx/tools/dmsh_vk.py) makes the 6,927 game shader bundles byte-for-byte identical to the tested set. - Android rewriter fix (#113, @yyan160): rewrite blocks no longer stash registers below sp (Android has no red zone); equiv.py checks Android outputs, structck.py recognizes the Android block shapes. Apple output unchanged. - Android touch controls drawn as on iOS (sockets, silver skill silhouettes, joystick), no map key in game state, no virtual pad buttons over panels; dm/android/tools/art_compare.sh compares the two drawings pixel by pixel. - HarmonyOS (#114, @biglawine): a HarmonyOS NEXT app (dm/harmony, ArkTS shell + N-API library) on the same shared host and Vulkan engine as Android; shared changes are behind __OHOS__ or opt-in switches (adaptive present tier, fence waits woken on completion, OHAudio, HiTrace markers, a byte-identical BC fast path). - HarmonyOS install with your own game files (@biglawine, 0.19.4 / code122): the release HAP is unsigned and contains no game content; players re-sign it with their own debug certificate and import a pack made with dm/tools/d2rm_android.py --target ohos. The registering stand-ins read the tables only when dm_derived_reload() is called (on __OHOS__); first import creates the target folders; outside a game a map toggle request is dropped before the AutoMap exists. Run by the author on a Mate 90 Pro Max: re-sign, install, import, in game, save and exit. - Vulkan: NaN-ignoring min / max / clamp as on Maxwell (#113, @yyan160), fixing one-frame black tiles on the OnePlus 13. - Xbox controllers (from #110, @rrroy5640): recognized automatically and given the PC / Xbox layout (bottom confirms, right goes back) with the game's Xbox button icons; other controllers are unchanged. The Mac-only keyboard prompt switch became a three-way prompt style (Switch / keyboard / Xbox) on every platform. - Separate base and update packages (#106, @PowerBeef): setup.sh and extract_game.sh take both packages and read the title keys from their tickets. - Mac App (#108, #109, @PowerBeef): the project's icon by default; the pointer hides after resting 3 s. - run.sh install no longer goes through the test-device battery gate (#107, @PowerBeef). - Chinese wording (#101, @zzz6519003): 「旧接口版」 and 「默认构建」 throughout. - Dynamic 3D resolution (from #113): a run of dropped frames counts only its first 3 frames unless it lasts 1 s, so one-off stalls no longer lower the resolution. - In-game Korean (#118, @soulsakura): a 한국어 column for all our UI text, a fifth option in the language row (each checkbox now sits before its name), Korean touch wording and map name plates, Korean voice when the game files carry it; a Korean system language picks Korean on first install. - iPhone Duo: in full screen the output size follows the window when the phone is unfolded or folded, up to the size the game started with; needs Xcode 27.1 for the inner screen to be filled. Test switches DM_TEST_FOLD and DM_TEST_SCREEN simulate the two screens with the iOS package on a Mac. - README: Android and HarmonyOS sections, device table and credits in all three languages; dependency list for Android. Every change was ported into the internal tree with its authors credited. For the shared files, the code changes match the pull requests' after stripping comments. Host / graphics / iOS unit tests, the full acceptance gate and the Mac smoke test passed; the rewriter's rule sets were rebuilt and passed the equivalence regression; an iOS build of this code was played on an iPhone; the Android APK with an import pack made from our own game files was played on a vivo X200 Ultra. Exported from main 8055e5212. Co-authored-by: Yuechuan Yang <22333122+yyan160@users.noreply.github.com> Co-authored-by: biglawine <26263820+biglawine@users.noreply.github.com> Co-authored-by: rrroy <hly5640@gmail.com> Co-authored-by: Patrice Déry <109446870+PowerBeef@users.noreply.github.com> Co-authored-by: Sam Snowman(赵正中) <zhengzhongzhao@gmail.com> Co-authored-by: soulsakura <74704744+soulsakura@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
6.8 KiB
Android team collaboration
中文:ANDROID_COLLABORATION.zh-CN.md
Repository responsibilities
| Repository | Ownership and purpose |
|---|---|
| biglawine/xbl-android | Our private Android development repository and daily collaboration entry point |
| biglawine/xbl-harmony | Our private HarmonyOS development repository, with separate ownership and access |
| jhaizhou-ops/d2r-mobile | The upstream project; we contribute Android and HarmonyOS changes through PRs reviewed and merged by its maintainers |
This repository preserves d2r-mobile history and its MIT license. The integrated upstream baseline is 17845634d71341cca1debf43ad79ac25c6a3a97a. The older HarmonyOS repository derives from xbl-ios; its production sources remain separate and are not overwritten by automatic synchronization.
The existing public fork biglawine/d2r-mobile is an upstream PR transport, not another product development line. This private repository is not a GitHub fork. Put reviewed commits on a topic branch in that fork when contributing upstream; do not mirror the private repository or push directly to upstream main. HarmonyOS draft PR #62 is open and unmerged. There is no Android upstream PR yet.
Getting started
- An administrator invites your GitHub account under Settings → Collaborators. Accept the invitation and clone this repository. Use your own clone or worktree.
- Read this page, the Android build guide, and upstream contribution rules. Prepare game programs, resources, shaders, and generated game data privately on your own machine.
- Use
mainas the integration baseline andandroid/<topic>branches. Before editing, identify the owner and file scope in a repository Issue. Avoid concurrent edits to the same files; coordinate native builds and device access serially. - Open a PR in this repository with the source commit, build version, device, actual test time, results, and unverified scope. Development commits may contain explicitly identified unfinished features; they do not establish playability acceptance.
- Prepare independently validated fixes as upstream PRs, following bilingual comments, localization, resource exclusions, and regression requirements. Compare upstream updates before merging; do not reset/clean or force-push over development work.
Recommended remotes: origin for this repository, read-only upstream for jhaizhou-ops/d2r-mobile, and fork for the public contribution fork. Set remote.pushDefault=origin and an unusable upstream push URL to prevent accidental upstream pushes.
Source layout
dm/android/app/: Java Activity, fullscreen Surface, floating touch controls, system input dialogs, widgets, and Gradle.dm/android/jni_android.c,text_input_jni.c,lifecycle_dispatch.h: startup, dedicated host input thread, and lifecycle dispatch.dm/android/vulkan_present.*: Android window and swapchain presentation.dm/gfx/vulkan/: NVN adaptation and Vulkan replay;engine/xbg_game.cppis the main entry point for current graphics performance and cache investigation.dm/host/,dm/i18n/: shared host and bilingual UI table; preserve upstream platform compatibility.dm/android/tests/,dm/gfx/vulkan/engine/tests/: independent Android and Vulkan regression checks.
Measured status (2026-10-16, China Standard Time)
Development build 0.1.7-dev / code8 was installed at 08:56 on vivo X200 Ultra (V2454A, Android 16/API36, Adreno 830). APK SHA256: 381514cce18027320cb6b0a5a72a83beb2cfefcbedb9bc3a9d0fb7f089cf62d0. Corresponding source commit: c7db2646eb9ff74678cd47dc3c6f87834b3852ca. This is a development baseline, not a finished release.
| Area | Actual result |
|---|---|
| Build | Current-source assembleDebug and lintDebug succeeded; localization, literal, native-widget protection, and mode registration scans passed. Apple/Metal/iOS regressions were not run on Windows |
| Install and saves | code7 and code8 were overlay-installed using automated clicks on the matching vivo app/version confirmation UI. All 42 save/save.work file hashes matched before and after code8 installation |
| Input and lifecycle | Two accepted name prompts passed in code5. Name cancellation, background cancellation during naming, and same-process resume passed in code6. Full input and long-duration stability acceptance remains incomplete |
| Flicker and black blocks | code7 cross-submit descriptor memo on→off→on reproduced the fault. code8 excludes texel-buffer bindings from memo, preventing reuse of VkBufferView objects destroyed at slot retirement, while retaining other cross-submit memo entries. Character selection, class preview, camp, and two short movement captures showed no recurrence of the large black blocks. Longer outdoor/combat validation is pending |
| FPS | Current code8 camp measurements remain 9.14–10.48 FPS (960 frames at the same workload). Recent fixed-scene GPU time was 45.66–58.85 ms/frame and presentation 1.27–1.57 ms. No stable FPS improvement is established; the system overlay's 60 is not game FPS |
| Widgets | 2×2/4×2 sources compile, providers are registered, and 27 synthetic parsing tests passed. Real launcher display/refresh and vivo platform integration remain unverified |
Remaining priorities: GPU main-pass cost, outdoor FPS and sustained graphics regression; complete NPC/combat/skills/inventory interaction; repeated lifecycle and cold-start save recovery; iOS touch details and a general import UI. Two shader SSA candidates did not establish stable gains in an original→candidate→original comparison; original shaders remain on the device.
Update 10-22: general import is done -- the release APK contains no game content; players make an import pack on a computer with dm/tools/d2rm_android.py from their own game files, and the App imports it with a progress screen when opened. The shader export step (dm/gfx/tools/dmsh_vk.py) makes all 6,927 game shader bundles byte-for-byte identical to the tested set. Touch drawing and panel states now match iOS (skill icons, button sockets, joystick, no virtual pad buttons over panels). Remaining iOS touch details: the empty-skill-slot menu, the stat-point overlay and the item image that follows the finger in a shop.
Raw logs, screenshots, private resources, save backups, and APKs remain in the maintainer's local artifacts/android-20261016 evidence directory and are not uploaded with source. Reviewed evidence summaries can be committed; access to raw material is managed separately. Automated follow-up remains paused, and old agents are not automatically resumed. Preserve device data and saves, and retain signing identity for upgrades.