项目的 README,来自 github.com/jhaizhou-ops/d2r-mobile。合并为一个 markdown 文件:README.md。
An open-source compatibility layer for Diablo II: Resurrected with the Reign of the Warlock expansion, for iOS, macOS, Android and HarmonyOS. It brings the Nintendo Switch release you bought, expansion included, to iPhone, iPad and Mac in full: the original game code runs natively, every control is rebuilt for touch, the frame rate holds at 60 fps, and you are in a game one second after the main menu. There is now a native macOS version as well (first version): on an Apple silicon Mac it starts on double-click and works with keyboard, mouse and gamepad. Since v2.0 there is an Android version (community port): the same game program executes natively on ARM64 Android phones, with the graphics reimplemented on Vulkan; on a Snapdragon 8+ Gen 1 phone the camp and the Den of Evil and Cow Level fights all run at a median 60 fps (see "Android" below); a HarmonyOS version runs on the same engine (community port: an unsigned shell from the Releases page that you re-sign yourself, nothing to build; see "HarmonyOS"). Apple TV 4K (3rd generation, A15) has a community port (developer preview) that has reached the character-selection screen only on its author's device; see the device table below.
This is not a tech demo that "sort of runs". It is a mobile version polished for daily play, from your first character all the way through the endgame.
Platforms: iPhone / iPad (iOS 26 and later; iOS 18 – 25 with the older-API build) · Mac (Apple silicon, macOS 26 or later; macOS 15 – 25 with the older-API build) · Apple TV 4K (3rd generation, A15; community port, developer preview) · Android phones (ARM64, Android 12 or later, Vulkan 1.1; community port) · HarmonyOS phones (HarmonyOS NEXT; community port, unsigned shell from the Releases page that you re-sign yourself) · Game version: Switch release with Reign of the Warlock, 1.0.34.0 (corresponds to PC version 3.3.94012) · English / 中文 / Español / Русский / 한국어 · License: MIT · Bring your own game files
中文: README.zh-CN.md · Español: README.es.md
| 100% | 60 fps | about 1 s | about 3.8 W |
|---|---|---|---|
| The original gameplay, because it is the original program | Steady, with no drops once the device warms up | From the main menu into a game | Whole-device power draw at 60 fps |
It is:
It is not:
All 44 iPhones and iPads in the closed beta — 35 devices registered for direct install (25 iPhones and 10 iPads), plus 9 TestFlight accounts with one device each — completed Normal, Nightmare and Hell with multiple characters, and the experience was excellent. From an iPhone 14 Pro Max with 6 GB of memory to the latest iPad Pro, not one device fell behind.
| Models | |
|---|---|
| iPhone | 14 Pro Max, 15, 15 Pro, 15 Pro Max, 16 Plus, 16 Pro, 16 Pro Max, 17 Pro Max and more |
| iPad | iPad Air, iPad mini, iPad Pro 11-inch and 12.9 / 13-inch (including M2 and M4) and more |
| Lowest model tested | iPhone 14 Pro Max (A16, 6 GB): a flawless 60 fps |
iPhone and iPad share a single install package.
Measured on a real device (iPhone 17 Pro Max):
| Item | Reading |
|---|---|
| In-game frame rate | 60 fps, steady, with no drops once the device warms up |
| App launch | 0.15 s |
| To the main menu | about 1 s |
| From the main menu into a game | about 1 s |
| Quick Restart, back in a game | about 1.2 s |
| Longest frame when changing acts | about 0.1 s |
| Whole-device power, 60 fps | about 3.8 W (in camp, 50% brightness): nearly 5 hours of continuous play on a full charge |
| Whole-device power, power saver mode at 30 fps | about 1.85 W, about half the 60 fps figure, for about twice the battery life |
Measurement conditions: power is whole-device power measured on 2026-10-10 on an iPhone 17 Pro Max, standing in the Act I camp at 50% brightness, with 60 fps and power saver mode measured in the same scene; battery life is calculated from the measured power and the battery capacity, not by playing from full to empty. Launch and game-entry times were measured on the same model in 2026-10; frame rate and act-change readings were taken on the same model on 2026-10-12 while moving through areas and changing acts after entering a game.
The install package is only a little over 100 MB. The game resources (about 5.6 GB) are placed on the phone separately, and updating the app touches neither your saves nor the resources.
Why it is this fast: the program executes natively, and not a single instruction goes through emulation; graphics go straight to Metal; every shader is translated offline and compiled ahead of time, so nothing is compiled when you enter a new scene. Older chips (A16 and earlier, such as the iPhone 14 family and iPhone 15) do not support the game's original compressed texture format; they need an extra texture pack made from your own game files, and then run at full frame rate too — see docs/LEGACY_DEVICES.md.
This is not a gamepad pasted onto the screen. Every panel and every action was rebuilt for fingers under one design principle: keep the original interface language, and use gestures instead of adding buttons to the screen. Text sizes and tap targets are sized for fingers. You know how to play the moment you pick it up, and it stays comfortable over long sessions.
Connect a controller and press any button: the interface switches to the original controller layout, with button prompts at the bottom of every panel. Touch the screen and you are back in the touch interface instantly. Inventory, stash, skill tree, Chronicle and settings are fully controller-navigable, with the same button mapping as on Switch. With an Xbox controller the layout switches automatically to the PC / Xbox one (bottom confirms, right goes back) and the prompts show Xbox button icons; there is nothing to turn on. With a PlayStation controller (DualSense or DualShock 4) the prompts switch to the game's own PlayStation button icons (✕ confirms, ○ goes back), contributed by @Ti800 (#119).
Finishing the original game is only the beginning. Without touching the original rules, we added a full set of endgame content that keeps you farming.
Enter through the red portal in Harrogath after completing Hell. There are 100 levels, and the monsters grow stronger with each one; fill the progress bar and slay the Rift Guardian within 15 minutes to clear a level. Every 2 levels cleared grants +1 Skill Point and +5 Stat Points, and the skill level cap rises from 20 to 40. Every 10 levels has a first-clear reward, and clearing level 10 unlocks six new equipment slots for your mercenary.
| Auto-recast buffs | Buff skills you have learned do not need a slot on the skill bar: when a buff runs out, it is recast the moment you stand still; buffs that come from your secondary weapons (such as Battle Orders from Call to Arms) swap weapons, recast and swap back on their own |
| Potions and belt | Auto-drink has two tiers: a healing potion below 50% Life, a rejuvenation potion below 30%; your mercenary is fed automatically by the same rule. Potions on the ground are picked up automatically when the belt has room; double-tap an empty belt slot to refill the whole belt |
| Loot filter | From Nightmare on, the original loot filter is switched on automatically to hide clutter: light filtering in Nightmare, heavy in Hell |
| Auto-pickup | Low runes and gems go straight into the Pouch; the high ones are left for you to pick up yourself |
| Valuable drop alerts | High runes and Unique items raise a light beam and land with a different drop sound; the phone vibrates at one of three strengths — light, medium or heavy — according to value |
| Runeword helper | Long-press a socketed base to list the Runewords it can make and their stats; once you have the runes, socket them all in one tap |
| Minimap guidance | Every map marks its Waypoint and exits, labelled "Waypoint" and with the name of the area each entrance leads to (iOS / Mac); every quest goal is on the map; when a target is off screen, its name is written along the screen edge |
| Chores removed | Free identification, free Town Portal with no scrolls needed, spawning right beside the Waypoint, Quick Restart, refreshable vendor stock, free and unlimited respecs at Akara |
| Saves | Saved immediately when you switch apps, swipe the app away or quit; iCloud sync across devices (requires signing with a paid developer account) |
| Entertainment mode (experimental) | Over-the-shoulder and first-person camera: drag the right half to look around, arrows for monsters off the picture, a facing pointer on the map (details; contributed with @yyan160, #165) |
Most features can be toggled one by one in game under Options → Custom.
The whole game switches between English, Chinese, Spanish, Russian, Korean and Portuguese under Options → Custom (six options in two rows of three); after a restart, the interface is in the language you chose. On first launch it follows your device language (Spanish from Spain uses the game's esES text, other Spanish regions use the Latin American esMX text; Portuguese uses the game's ptBR text). In English, Spanish, Russian, Korean and Portuguese, items, skills and monsters use the original Diablo II wording, and everything we added — Greater Rift, Chronicle, the settings page, gesture prompts, map name plates — is translated too (item notes are translated for Chinese and Spanish only). Russian is the game's single ruRU text, Korean its koKR text and Portuguese its ptBR (Brazilian) text, with no regional variants. Voice acting: Chinese UI gets Chinese voices; Russian, Korean and Portuguese get the original voices when your game files include them (a package built from the complete game data does), otherwise English; everything else is English. Korean was contributed by @soulsakura (#118).
flowchart LR
G["Your game files<br/>(program + resources)"] --> P["Rewriter<br/>changes only a few instructions"]
G --> S["Shader translation<br/>original → Metal"]
P --> H["Host<br/>system services"]
S --> X["Graphics layer<br/>the graphics API on Metal"]
H --> A["iOS app<br/>touch and interface"]
X --> A
| Part | Where | What it does |
|---|---|---|
| Program rewriter | dm/tools/patch_nso.py |
Rewrites only the few instructions that cannot run unchanged under Apple's kernel (thread-pointer registers, system calls, timers) and leaves the rest of the program byte-for-byte as shipped |
| Host | dm/host |
Loads the rewritten program and provides the platform services it calls |
| Graphics | dm/gfx |
Implements the game's graphics API on Metal; shaders are translated offline from the game's originals |
| iOS app | dm/ios |
The app shell, touch controls and interface |
| Android app | dm/android |
The Android shell, touch overlay and Vulkan presentation |
| HarmonyOS app | dm/harmony |
The HarmonyOS shell (ArkTS + N-API), sharing the host and the Vulkan engine with Android |
| Vulkan graphics | dm/gfx/vulkan |
The same graphics API on Vulkan (shared by Android and HarmonyOS; the engine comes from the HarmonyOS port) |
| Verification | dm/verify |
Checks that the rewritten code behaves exactly like the original, plus the regression gates every change goes through |
Why you can trust it: the stability is not luck. The test and verification tooling is part of the project — unit tests for the host and graphics layers, an equivalence check for every rewritten instruction, scripted walkthrough regression for the touch interface, and on-device smoke tests. Start with make -C dm/host/tests run, make -C dm/gfx/tests run and dm/verify/regress.sh (run them inside the Python environment prepared in step 2 below; regress.sh also needs brew install llvm). How to contribute is in CONTRIBUTING.md.
Android phones use ARM64 processors just like the Switch, so, as on Apple devices, the game's own program executes directly on the phone with no CPU emulation. This release brings the whole host — system calls, file system, audio, input, saves — to Android unchanged and swaps the graphics layer for Vulkan: the NVN-to-Vulkan replay engine comes from @biglawine's HarmonyOS port, and the Android app, touch controls, Vulkan presentation and a full round of performance work, each step measured on a phone, are by @yyan160 (#113). The Apple and Android versions share the same host code, so future changes benefit both.
Measured by the port's authors on their phones (product defaults: 3D render scale capped at 0.85 and lowered dynamically when frames drop):
| Phone | Result |
|---|---|
| Redmi K50 Ultra (Snapdragon 8+ Gen 1, Adreno 730, Android 15) | Camp, Den of Evil fight, Cow Level fight: median 60 fps, GPU about 14–15 ms a frame |
| OnePlus 13 (Adreno 830) | Playable; when one particular light effect appears in the camp, small black squares occasionally flash for an instant (under investigation) |
Minimum: ARM64, Android 12 (API 31) or later, and a GPU with Vulkan 1.1.
How to use it today: install D2RMobile-android.apk from the release page (it contains no game content). On a computer, run python3 dm/tools/d2rm_android.py <Update directory> <output directory> on your own game files to make the import pack (an android folder with the rewritten game program, every Vulkan shader bundle, the touch overlay and a few data tables), and copy it together with your game resources (the data folder) to Download/S2X/D2R Mobile/ on the phone. The App imports it with a progress screen when you open it. No adb, and no need to build the APK yourself. The full steps are in docs/ANDROID.md. The touch controls are drawn the same way as on iPhone (button sockets, silver skill silhouettes, joystick), and no virtual pad buttons cover open panels. Compared with the iOS version, a few touch details are still unfinished: the empty-skill-slot menu, the stat-point overlay, and the item image that follows your finger while dragging in a shop.
Progress, the measurements from every round and the remaining work are in docs/ANDROID_COLLABORATION.md and docs/android-notes/. The HarmonyOS version is in the next section.
The HarmonyOS NEXT app (dm/harmony) is by @biglawine (#114) and uses the same host and the same Vulkan engine as Android. Measured by the author on a Mate 90 Pro Max (Maleoon 955): 59.7 fps holding the joystick in the Rogue Encampment, display interval p50 16.6 / p99 18.1 ms.
How to use it: the same idea as the iOS shell. The Releases page has an unsigned install package that contains no game content (D2RMobile-harmony-shell-unsigned.hap). HarmonyOS NEXT only installs apps signed with your own developer certificate, so you re-sign it with your own debug certificate and install it; you do not build the app yourself. Then, on a computer, run python3 dm/tools/d2rm_android.py --target ohos <Update folder> <output folder> on your own game files to make the runtime pack, put it with the game resources in a "D2R Mobile" folder on the phone, open the app and pick that folder to import. The full steps are in docs/HARMONYOS.md. The author ran the whole chain (re-sign → install → first import → into a game → save and exit) on a Mate 90 Pro Max, with three cold starts in a row working; you need a Huawei developer account (DevEco Studio can generate the debug certificate and register the device for you).
Minimum: an A14 / M1 chip or later — the graphics layer needs Metal 3, which Apple supports from A14 / M1 on (see Apple's Metal support on Apple devices and Metal Feature Set Tables).
| Device | Playable? | How | How sure we are |
|---|---|---|---|
| iPhone / iPad, A17 Pro and later (iPhone 15 Pro and later, iPhone 16 and later, iPads with M-series chips) | Yes | iOS 26 or later: the default shell / default build; iOS 18 – 25: the iOS 18 shell / older-API build | Main devices, played daily |
| iPhone Duo (foldable) | Yes; the picture resizes when you unfold or fold | The shells on the Releases page are built with Xcode 27.1; when building with Xcode yourself, use 27.1 so the inner screen is filled (see docs/DEPENDENCIES.md) | Supported since v2.0. Checked on a Mac switching between the outer and inner screen sizes taken from the iPhone Duo simulator (the simulator itself cannot run the game's graphics). We will test on a real iPhone Duo as soon as we have one; if you have the phone, please tell us how it goes in an Issue |
| iPhone / iPad, A16 and earlier (all iPhone 14 models, iPhone 15 / 15 Plus, iPhone 13 series and so on) | Yes, with one extra step | Make a Legacy Device Pack from your own game files as in docs/LEGACY_DEVICES.md and include it when making the install package; the system split is the same as the row above | Played by players: iPhone 14 Pro Max (A16, 6 GB) at 60 fps; iPhone 13 Pro Max (A15, 6 GB) in the 30 fps mode |
| Devices with 4 GB of RAM (such as the 6th-generation iPad mini or the 4th-generation iPad Air) | Runs, but memory is very tight (we are still reducing memory use) | Same as the A16-and-earlier row (with the Legacy Device Pack) | Tested by a player: on an iPad mini 6 (A15, 4 GB, iPadOS 27) a few minutes of Act I ran at 50–58 fps after automatic quality reduction, with constant system memory warnings and only about 560 MB below the system memory limit — busy scenes with many monsters and effects may be ended by the system; on an earlier version an iPad Air 4 (A14, 4 GB) was ended by the system a few seconds after launch |
| A14 chips with 6 GB of RAM or more (such as iPhone 12 Pro / 12 Pro Max) | No reports yet | Same as the A16-and-earlier row | If you have tried, please open an Issue and tell us |
| A13 and earlier chips (such as the iPhone 11 series and the 2020 iPad Pro) | Not supported | — | The graphics chip does not support Metal 3 (tested by a player on an iPad Pro with A12Z; Apple's references are above the table); the app says so at launch instead of crashing |
| Mac, Apple silicon | Yes (native macOS App) | macOS 26 or later: the default build; macOS 15 – 25: the older-API build. Keyboard, mouse and gamepad all work; what each can do is in docs/MAC.md | A player has played the older-API build on macOS 15.7.7 |
| Apple TV 4K (3rd generation, A15) | Community port (@yinqingyan, contributed under the MIT License with the author's consent), developer preview | Build as in dm/tvos/README.md and copy the game files and the Legacy Device Pack into the app; real hardware only, the Simulator cannot run it; saves live in the Caches directory, which the system may purge | Reached the character-selection screen on real hardware; entering the game, full controller mapping and saves are not verified yet, and the maintainers have not tested it on real hardware |
| HarmonyOS phones (HarmonyOS NEXT, API 26) | Playable (community port) | The unsigned shell from the Releases page, re-signed with your own debug certificate, plus a runtime pack made from your own game files, see docs/HARMONYOS.md | Verified by the author on a Mate 90 Pro Max: re-sign, install, import, into a game, save and exit |
| Android phones (ARM64, Android 12 or later, Vulkan 1.1) | Playable (community port) | The release page's APK + an import pack made from your own game files, see docs/ANDROID.md | Measured by the port's authors: Redmi K50 Ultra median 60 fps; OnePlus 13 playable, with occasional black squares flashing for an instant; played on a vivo X200 Ultra |
| Intel Macs | Not supported | — | — |
What the dialogs in the App mean
What a package you build yourself does not have, compared with our test-group builds: the public version can be built and installed with a free Apple ID. Three things in our test-group builds are not in it: iCloud save sync (the App needs the iCloud signing entitlement, which a self-signed package does not have), downloading packs and resources inside the App, and new-version notices (these two use our own server). The game itself and the features we added are the same.
Whatever device you play on, you start with the files of the game you bought: the Switch release of Diablo II: Resurrected plus the Reign of the Warlock expansion, updated to 1.0.34.0 (the version the console shows; it corresponds to PC version 3.3.94012, and the directory names and tools in this repository use the latter number). This project is built for the version with that expansion; using it without the expansion is not supported and has not been verified. How to prepare them is in docs/GAME_FILES.md.
This project provides only tools and an install shell that contains no game content. We do not distribute or endorse, and are not responsible for, any third party distributing game assets, game executables or install packages that contain game content. Please use only game files you legally own.
This project is implemented and verified on the Switch release 1.0.34.0 (which corresponds to PC version 3.3.94012), and by default the tools accept only that version. Community users have reported adapting other versions on their own by following the structure of this repository, and running them successfully. The rule tables are grouped by game version (in dm/tools/patch_nso.py, keyed by the build ID of the main program); you are welcome to contribute the version you adapted.
Check your device first and find your section in the table below; the "Which devices are supported" table above tells you which build to use on Apple devices and whether you also need a Legacy Device Pack.
| Your device | How | Steps |
|---|---|---|
| iPhone / iPad, with an Apple silicon Mac (easiest) | One-click packing and install with S2Arm | "Easiest: one click with S2Arm" below |
| iPhone / iPad, with an Apple silicon Mac | A full build from source | "With a Mac: three steps" below |
| iPhone / iPad, without a Mac | Download a shell with no game content and add your game content on Windows / Linux | "Without a Mac" below and docs/NO_XCODE.md |
| Mac (Apple silicon) | Build a native macOS App | "Playing directly on a Mac" below and docs/MAC.md |
| Android phone | Install the release page's APK and copy an import pack made on a computer to the phone | "Android" below and docs/ANDROID.md |
| HarmonyOS phone | Re-sign the unsigned shell from the Releases page with your own debug certificate, make a runtime pack on a computer and copy it to the phone | "HarmonyOS" below and docs/HARMONYOS.md |
The two routes for iPhone / iPad compared:
| With a Mac | Without a Mac | |
|---|---|---|
| Computer | An Apple silicon Mac with Xcode installed | Windows / Linux / a Mac without Xcode |
| Method | A full build from source | Download a "shell" with no game content, use the packaging tool to add your own game content, then install it with a sideloading tool |
| Status | The main route; everything above comes from it | Works end to end on Windows, from making the package to playing on a device, and the game program produced on the two systems is byte-for-byte identical; the one step nobody has tried yet is signing with a sideloading tool — try it and tell us |
| Instructions | The three steps below | docs/NO_XCODE.md |
The Apple account used for signing: a paid developer account gives you everything; a free Apple ID works too (no iCloud save sync, and the app has to be re-signed and reinstalled every 7 days). The full list of dependencies is in docs/DEPENDENCIES.md.
S2Arm is our general Switch porting launcher, and D2R Mobile is the first "downstream deep port" registered in it: when you export this game in S2Arm, it asks whether to use the D2R Mobile route; once chosen, the packing underneath is this repository, and importing, packing, installing and pushing the game resources are all buttons in S2Arm — no terminal, no packing tools to install yourself.
Status: iPhone / iPad on iOS 26 and later works end to end (packed on a Mac, installed on an iPhone over Wi-Fi, in game); the older-API build for iOS 18 – 25 is not in S2Arm yet. Android, HarmonyOS, the native Mac version and S2Arm on Windows are not connected yet; use the sections below. S2Arm uses the D2RMobile-s2arm-bundle.zip attached to every release of this repository; the contract between the two is in docs/S2ARM.md.
Put your game files in the workspace (default ~/dm-work, or set DM_ROOT):
~/dm-work/data/switch/3.3.94012/Update/ExeFS/ main, sdk, subsdk0
~/dm-work/data/switch/3.3.94012/Update/RomFS/ data/…
Prepare the workspace. This checks your tools, rewrites the game program, and translates the game's shaders to Metal. The first run takes a while; later runs skip what is already done.
./setup.sh
source ~/dm-work/build/cache/dm/venv/bin/activate # run everything after this inside the Python environment setup prepared; if you changed DM_ROOT, use it in place of ~/dm-work
Fill in your signing details and build the app:
cp dm/ios/local.env.example dm/ios/local.env # set DM_TEAM_ID and DM_BUNDLE_ID; with a free Apple ID also set DM_FREE_ACCOUNT=1 and DM_IOS_UDID, and keep the phone connected while building
cd dm/ios && ./run.sh build # targets both iPhone and iPad by default; for iPhone only: DM_DEVICE_FAMILY=1 ./run.sh build
The first time you open the app on your phone, it asks for the "game resource folder" — the 18 resource archives from your game files. Where to put them is in the section "The "game resource folder" that goes on the phone" of docs/GAME_FILES.md.
./setup.sh check is a health check: it reports the state of this computer, the tools, the game files and the signing configuration item by item, and for everything missing it says where to get it and which command to run next; it changes nothing. If what you have is a whole game package (.xci / .nsp), ./setup.sh <game package> <prod.keys> first extracts the game files into place and then carries on (install hactool first); if the base game and the update are separate packages, give both: ./setup.sh <base game> <update> <prod.keys>. Run ./setup.sh again after every update to a new commit: it rebuilds the patched binaries and the shader library for the current sources (steps that are already up to date are skipped). It also rewrites three files in the repository that change with your local tool fingerprints (dm/gfx/tools/dmsh_chain.lock, dm/gfx/nvn/dmsh_chain.h, dm/gfx/nvn/c1_full.tsv); that is expected, do not commit them.
After the same ./setup.sh, one more command builds a native macOS App that starts on double-click and works with keyboard, mouse and gamepad, with no developer account:
source ~/dm-work/build/cache/dm/venv/bin/activate
dm/tools/mac_app.sh # macOS 26 or later: produces ~/dm-work/out/macapp/D2R Mobile.app
DM_MAC_M3=1 dm/tools/mac_app.sh # macOS 15 – 25: produces D2R Mobile M3.app
The interface is the original's gamepad interface. Keyboard: Space confirms, Esc goes back, Return, the = key opens the menu / a new character, W A S D moves, and every other gamepad button has a key. Mouse: clicking a monster, NPC or object walks over and interacts, and the skill slots, potion cells and key hints at the bottom, buttons and tabs in panels, the class figures when creating a character and the minimap can all be clicked; clicking empty ground walks there and holding keeps walking, clicking a monster attacks it, and items take double clicks and drags. With a keyboard, the prompts on screen show keyboard keys. Saves stay on this Mac (iCloud sync needs a paid developer account and a build with DM_MAC_ICLOUD=1, see docs/MAC.md) and can be imported by hand from an iPhone / iPad. The key table, how to create a character, what the mouse can do, the import steps and the known shortcomings are in docs/MAC.md. Keyboard and a physical gamepad have not been operated by a person yet — if you try it, please tell us how it went.
No Mac, no adb and no building the APK yourself; any Windows / Linux / Mac computer will do (it has been run through on a Mac so far). The full steps, the tools to install and what to do when something goes wrong are in docs/ANDROID.md.
Prepare your game files, the same as for Apple devices (docs/GAME_FILES.md).
Make the import pack on a computer:
python3 dm/tools/d2rm_android.py <Update directory of your game files> <output directory>
Over USB, copy the android folder it made and the game resource folder data to Download/S2X/D2R Mobile/ on the phone.
Download D2RMobile-android.apk from the Releases page, install it, open it and allow "All files access"; the App imports the pack and starts the game.
The source must be from the same release as the APK; for a new release, replace both the APK and the import pack, and your saves stay. To build the APK yourself from source, see dm/android/README.md.
You do not build the app yourself. You need a Huawei developer account and DevEco Studio (for its signing tool and hdc; it can also generate the debug certificate and register the phone). The full steps, commands and what to do when something fails are in docs/HARMONYOS.md.
Prepare your game files, the same as for Apple devices (docs/GAME_FILES.md).
Download the unsigned shell D2RMobile-harmony-shell-unsigned.hap from the Releases page, re-sign it with your own debug certificate and profile (hap-sign-tool sign-app), then install it on the phone with hdc install -r.
Make the runtime pack on a computer:
python3 dm/tools/d2rm_android.py --target ohos <Update folder of your game files> <output folder>
On the phone, make a "D2R Mobile" folder with the game resources in data/ and the runtime pack from the previous step in dm/, open the app, tap Import and pick that folder.
The source must be from the same release as the shell. For a new release, re-sign the new shell with the same signing and install it over the old one; your saves are kept. The author ran these steps on a Mate 90 Pro Max.
Download our prebuilt "shell" package (D2RMobile-shell-build-input.zip; D2RMobile-shell-ios18-build-input.zip for iOS 18 – 25), which contains no game content, from this repository's Releases page, add your own game files, make the install package on Windows or Linux, then sign and install it with a sideloading tool. The shell is build input, not an app to install (installed as is, it only shows a dialog and does not start the game); when you move to a new release, make the install package again with the new shell. On this route only, because the computer making the package has no Apple shader compiler, the first launch on the phone spends about 7 minutes compiling shaders (once, with a progress bar); a package built with Xcode has no such step. The steps, and how far each one has been verified, are in docs/NO_XCODE.md.
| Item | Status |
|---|---|
| Online play | Out of scope; fully offline |
| Android version | A few iOS touch details (empty-skill-slot menu, stat-point overlay, the item image that follows your finger in a shop) are unfinished; see "Android" above |
.nsp / .xci game packages |
The tools only check the version of the main program and do not distinguish package formats; we ran the whole path with an .xci ourselves, and users have reported that .nsp packages work perfectly as well |
| Signing and installing with a sideloading tool (Sideloadly, AltStore and the like) | Not verified; open an issue and tell us how it went |
| Making the package on Linux | Not verified (verified on Windows and Mac) |
| Devices that have not moved to iOS 26 / macOS 26 | Playable with the older-API build (minimum iOS 18.0 / macOS 15.0): docs/OLDER_SYSTEMS.md; the full device table is under "Which devices are supported" above |
| A16 and earlier devices (iPhone 14 family, iPhone 15 / 15 Plus and so on) | Playable; they need a Legacy Device Pack and an App built with it: docs/LEGACY_DEVICES.md. "One More Step for This Device" (older versions say "Device Not Supported") in the App means this step is missing |
| The "one-line verdict" and "legacy Chinese name" entries in item notes | These two content tables are not shipped with the repository; you can supply your own, see dm/ios/tools/annot/README.md |
Taking it to other platforms: this approach is not limited to iPhone and iPad. Apple silicon Macs already have a native version (see "Playing directly on a Mac" above), built from the same game program and the same host; Apple TV also has a community port (developer preview, see the device table). Android has been reached too: since v2.0 there is a community-ported Android version (see "Android" above) built on the same host, with only the graphics layer swapped for Vulkan; a HarmonyOS version has arrived too (see "HarmonyOS" above), sharing the same Vulkan engine.
Taking it to other games: someone has already tried other Switch games on the same host. The host has some behaviour that is on by default on iOS and was written for this one game; another game runs into these first, so turn them off or move them out before you start:
dm/host/hle_oe.c: the 3D render scale defaults to 0.75 on phones (the Android app sets 0.85), and scale3d_tick rewrites it at offsets inside this game's renderer — with another game that is a wild pointer.dm/host/hle_fs.c: seeding the shared stash on first launch (DM_STASH_SEED) and the touch-layout default settings (DM_TOUCH_DEFAULTS) are on by default on iOS.dm/host/main.c: the save-flush throttle patches a constant at a fixed address in the game program; argv[0] is hard-coded to "D2R".dm/host/hle_time.c: the fixed-time test switch recognises a fixed address in the game program.front_game_res in dm/host/front_mac.m: the docked / handheld resolutions are hard-coded to 1600×900 / 1280×720.dm/host/dm_cloudsync.c: character directories are recognised by .d2s.dm/host/dm_cursor.c and dm/host/dm_world.c: the whole files are specific to this game.The cleaner arrangement is to move these defaults into per-game configuration and keep the host free of game-specific defaults; pull requests in that direction are welcome.
| Document | Covers |
|---|---|
| dm/README.md | How the whole thing works, directory layout, common commands, the host's source files |
| dm/gfx/README.md | The graphics layer and the shader translation chain |
| dm/ios/README.md | The iOS shell, building and smoke testing |
| dm/verify/README.md | What each verification tool checks and what it needs |
| docs/GAME_FILES.md | Game files: which ones you need, how to get them from your own console, where to put them |
| docs/DEPENDENCIES.md | Dependencies and third-party licenses |
| docs/NO_XCODE.md | Building without Xcode and without a Mac |
| docs/MAC.md | Playing on a Mac: building the macOS App, key mapping, known gaps |
| docs/LEGACY_DEVICES.md | Older devices (A16 and earlier): making the texture pack and putting it on the phone |
| docs/OLDER_SYSTEMS.md | Older systems (iOS 18 – 25, macOS 15 – 25): building the older-API version and combining it with the Legacy Device Pack |
| docs/qa-rift-pet-life.md | Regression checklist for minion life in Greater Rifts (what has been run and what has not; additions welcome) |
| docs/DERIVED.md | Game-related material in this repository: what is here, what is not, and why |
| docs/ANDROID.md | Playing on an Android phone: installing the APK, making the import pack, new releases, troubleshooting |
| docs/HARMONYOS.md | Playing on a HarmonyOS phone: re-signing the unsigned shell, making the runtime pack, importing, troubleshooting |
| dm/harmony/README.md | HarmonyOS: source layout, build commands, defaults and measurements |
| dm/android/README.md | Android: source layout, building, the files to put on the phone, the acceptance checklist |
| dm/gfx/vulkan/INTEGRATION.md | How the Vulkan graphics layer plugs into the shared graphics API |
| docs/ANDROID_COLLABORATION.md | Android / HarmonyOS collaboration: who works where, how to take part, measured status and remaining work; the notes from every round are in docs/android-notes/ |
You must own the game, including the Reign of the Warlock expansion. This is an independent, non-commercial project. It is not affiliated with, endorsed by, or sponsored by Blizzard Entertainment or Nintendo. Diablo and Blizzard Entertainment are trademarks of Blizzard Entertainment, Inc.; Nintendo Switch is a trademark of Nintendo. Use it only with a copy of the game that you own.
The Android version in v2.0 comes from three community authors. Special thanks to:
This project stands on the open-source work below. Thank you to its authors and maintainers.
dm/third_party/ryujinx bundles its shader translator unchanged (the Ryujinx.Graphics.Shader, Spv.Generator and Ryujinx.Common projects), which translates the Switch game's shaders to SPIR-V. During development we also ran the original game in a patched Ryujinx as the reference for comparing pictures and game state (see dm/verify/README.md; the scripts that build and drive it are not in this repository).dm/gfx/nvn/nvn_tex.c is ported from it.dm/gfx/nvn/include/nvn.h.dm/tools/patch_nso.py that let the game run offline come from this community patch. We have no reliable record of where it was first published or who wrote it; if you know, please open an Issue.MIT, see LICENSE. Third-party code keeps its own license in its own directory; see docs/DEPENDENCIES.md.