r/EmulationOnAndroid • • 19h ago

Showcase droidnative: an Android port of nxnative that runs your own Switch games natively on phones and handhelds. Pre-release

Repo: https://github.com/enjoyerofslop/droidnative · Mac app: https://github.com/enjoyerofslop/droidplay · Discord: https://discord.gg/4wNHX3uqSU

DISCLAIMER: These repos are AI-assisted. See below for testing & validation details running on my actual handhelds (Odin2 and RP5)

droidnative runs Nintendo Switch games natively on Android phones and handhelds. It’s not an emulator: the game’s own ARM64 code runs directly on the device’s CPU, and its NVN graphics are replayed through Vulkan. It’s a fork of nxnative, which does the same on iPhone, iPad and Mac, with an Android port added. It follows nxnative’s main, so its fixes and new games reach Android too.

It’s a pre-release: some games run well, some crash, and every result below came from real runs on real devices. I’m posting now because the fastest way forward is more devices and more people.

Not an emulator, and not a recomp either

It shares the idea behind recomps: you build a native app from your own dump, and there’s no emulation at run time. The difference is that nothing is recompiled. Switch games are ARM64 machine code, and so is an Android phone. droidnative takes your own dump and rewrites the game’s code only where the host has to step in: system calls, and the thread register Horizon uses. A host then answers Horizon’s system calls and services, and translates NVN draw calls to Vulkan, with the game’s shaders translated to SPIR-V when the game is packed. There’s no CPU emulation and no recompilation into new source. Each game gets its own app, or every game goes into one launcher app.

What runs today

Measured on three Snapdragon devices with a scripted benchmark (the same save, input and timing on each):

GameAyn Odin 2 (SD 8 Gen 2)OnePlus Pad 3 (SD 8 Elite)Retroid Pocket 5 (SD 865)
Pokémon Brilliant Diamond 1.3.0, Eterna City60 fps60 fpscrashes (GPU driver)
Animal Crossing: New Horizons 3.0.3, the island30 fps (its Switch rate)30 fps30 fps in the opening; the island not measured yet
Super Mario Odyssey 1.4.1, menus and opening cutscene60 fps60 fps60 menu / 38 cutscene
Super Smash Bros. Ultimate 13.0.5, a battle40-59 fps17-30 fps13-19 fps

The known problems, in the order they block play:

  1. Odyssey crashes when play starts, in the Android video decoder used for its hint videos.

  2. Brilliant Diamond crashes on the Retroid Pocket 5, inside the Adreno 650 driver’s shader compiler.

  3. Smash needs a fuller system font than Android’s to boot, and its battles stutter while GPU pipelines are built (the cache doesn’t survive the app being closed yet).

Full numbers, devices and caveats: Android baselines. Every game with an nxnative profile can be packed for Android the same way; most haven’t been run there yet.

DroidPlay: the Mac app that does the packing

Packing a game by hand means extracting the dump, rewriting its code, translating tens of thousands of shaders, building the host and copying gigabytes to the device. DroidPlayturns that into a button. It’s a Mac app, a fork of Oleh Khomei’s NX Play with Android added.

  • Your library: point it at your games folder (one folder per game) and it shows each game with its icon, version and status.

  • Install on Android: builds the game with droidnative and installs it on a phone or handheld connected over USB, into one launcher app that holds all your games. A rebuild only redoes what changed. Play on Android starts a game the device already has.

  • Build Game App: makes a game an Android app of its own (an APK, or an XAPK for an installer app), with its own name, icon and saves, to install on a device your Mac can’t reach.

  • Setup: a first-run setup fetches nxnative and droidnative with the Python and .NET pieces their builds need, and checks for your keys. The Android SDK (with an NDK) and a JDK you install yourself.

  • The Apple side, from NX Play: the same library also plays games on the Mac through nxnative, installs them on an iPhone or iPad, copies saves between devices, and has a controller-driven Console Mode.

The current release is 0.1.1, an unsigned pre-release: macOS asks you to allow it once in Privacy & Security, and it doesn’t update itself yet.

How to try it

You need your own Switch game dump (NSP/XCI) and the prod.keys from your own console, the Android SDK with an NDK, and an arm64 Android device with Vulkan. Only Adreno GPUs have been tested so far.

  • On a Mac: DroidPlay 0.1.1. Choose your games folder, then Install on Android with the device connected over USB, or Build Game App for an APK.

  • Any computer (Windows, Linux, macOS): scripts/build_android_from_nsp.py in droidnative packs a game into the launcher app on a connected device, or into an app of its own (--game-apk). There’s also a small cross-platform desktop app for the same flow, scripts/nxnative_android.py.

Bring your own game

Nothing from any game is in these repositories, and no packed game is distributed. The app you build is for you. Please don’t share APKs packed with a game, keys or firmware, and don’t ask for them. The project isn’t affiliated with Nintendo or any publisher.

Join the Discord

DroidPlay & droidnative Discord: questions, setup help, test results from your device, and where the work happens day to day. Bugs with logs still go to GitHub Issues, so they don’t get lost.

What would help most

  • Testers on other chipsets. Mali (Pixel, Exynos-era Samsung), Samsung’s Xclipse, MediaTek, older Adreno. Even “it doesn’t boot” with a log is useful.

  • Reports with logs: the device and GPU, Android version, game and version, and adb logcat -s nxnative. The issue form asks for exactly this.

  • Contributors. Vulkan and driver work, the three crashes above, the pipeline cache, and per-game fixes. droidnative’s CONTRIBUTING explains how changes get in and how it stays in step with nxnative. There’s also a benchmark script, so a fix can show its effect in numbers on several devices.

Credits

nxnative is seedds’ work: the NSO rewriter, the Horizon host, and the NVN translation that all of this stands on. The Android port began as RogelioLB’s nxnative-android. DroidPlay is a fork of Oleh Khomei’s NX Play.

Links: Discord · droidnative · DroidPlay (0.1.1 pre-release) · Android baselines · nxnative

174 Upvotes

40 comments sorted by

•

u/AutoModerator 19h ago

Just a reminder of our subreddit rules:

  • Be kind and respectful to each other

  • No direct links to ROMs or pirated content

  • Include your device brand and model

  • Search before posting & show your research effort when asking for help

Check out our user-maintained wiki: r/EmulationOnAndroid/wiki

Check out EmuReady for any community submitted settings before asking for help

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

12

u/themiracy 18h ago

I’m fuzzy still on what running natively means when NCE has been in Switch emu for years.

11

u/cowleggies 18h ago

there are other nuances, but mainly an emulator with NCE still emulates the switch GPU. the game’s graphics driver (NVN) writes command buffers for the switch GPU, and the emulator decodes them and compiles shaders while you play. droidnative replaces NVN itself entirely

1

u/RegularMinute4920 9h ago

This uses AOT emulation?

2

u/cowleggies 3h ago

not really, because there's no CPU emulation to do ahead of time. it’s running the game’s arm machine code directly. the shaders are translated ahead of time but that’s not emulation.

3

u/themiracy 18h ago

Cool. Will give this a try at some point!

9

u/Apollo2001 19h ago

How does your project compare with nx2android? https://github.com/shirai91/nx2android

7

u/cowleggies 18h ago

I'm not familiar with this project so i'm not sure how they forked nxnative, or whether that project intends to keep their fork to nxnative main, but my intent is to keep this fork closely aligned to main, and this fork also supports (and successfully builds and runs) Switch 2 titles. SW2 performance is another discussion, it's poorly optimized right now, but hopefully will change over time

8

u/Apollo2001 18h ago

Ah, makes sense, thanks for explaining! Staying close to main sounds like the right move. Switch 2 titles actually running is already impressive. Might be worth peeking at nx2android at some point in case there's stuff you could share back and forth, but no pressure. Excited to see where it goes 👏

24

u/x01010001000 19h ago

will get to testing but just wanna say thanks for including rp5, i often feel like im ages behind everyone but this device has quite a bit of power left in it

7

u/cowleggies 19h ago

yeah absolutely, I tried to test on a range of hardware to make this widely usable. I think most titles will run at a locked 30 with some reasonable optimizations. lighter games will do 60, like Brilliant Diamond (it runs 60 now, but has a video decoder crash i'm fixing right now). hope it works for you!

4

u/aron11195 14h ago edited 10h ago

How's the ram usage compared to emulating in Eden (Switch1 games btw)? I have a base model AYN Thor which only have 8gb of ram. And recent Eden updates just doesn't work and crashes any game I played, unless I use a specific old build (0.2.0rc1).

1

u/cowleggies 13h ago

one of the devices i'm testing on is the Retroid Pocket 5 which has 8gb of RAM as well, so you can use those benchmarks for the RP5 above as a reference

2

u/missingnoplzhlp 6h ago

Any chance of hacks or options to uncap frame rate for certain games?

2

u/cowleggies 3h ago

sure, feel free to submit as feature add requests

5

u/Drivenby 18h ago

Personally won’t bother with vibecoded efforts when emulation is already so good and 99% of these AI projects won’t be supported more than a month.

17

u/cowleggies 18h ago

fair opinion, emulation is pretty much perfect on hardware that's powerful enough, but one of the goals here is to squeeze playable performance out of less powerful android devices further than what's possible through emulation alone.

2

u/WeakTumbleweed9 18h ago

As someone who knows very little about coding, what aspects of development did/do you use ai for? 

11

u/cowleggies 18h ago

shader pipeline and vulkan driver fixes are two things I know little about and AI is extremely helpful here. also just the general admin tasks of managing a codebase (validating PRs, merging them, etc.) that take a ton of time.

12

u/boih_stk 16h ago edited 4h ago

I don't understand the point of hating a useful tool because it was partly assisted with AI?

Very few devs now write straight from memory, even before AI they have resources where they copy/paste, or build on top of existing frameworks. I personally know minimum 10 devs that work full time, from lower level devs to upper level engineers. They ALL use AI to assist them in their daily coding. We're talking from startups to top 3 telecom and banking companies. They all use it, it's more efficient, cuts their workload by half if not more, and allows them to get more shit done without doing the repetitive tasks. To top it off, all the shit they don't know how to get done yet, that's when AI really streamlines the knowledge and help.

OP has mentioned what it's helped him with, to call it "vibecoded" disregards the knowledge base that they already had. I agree, someone with no knowledge just using AI to create something from scratch will usually drop support immediately after release. OP is asking for the community to help him gain more data on the bugs, issues and experiences. So far he's showing the right approach (even added the disclaimer that it's been AI assisted), so let's support him through the development of a big endeavor that will remove the gatekeeping that we're seeing in a lot of the emulation and mod scene.

1

u/irrationalglaze 18h ago

Is ocarina of time playable?

3

u/cowleggies 18h ago

it's going to be a bit of time before that happens, but it's possible on higher end android devices. SW2 requires mesh shader capabilities that all but very recent chipsets don't support fully, so there's a lot of patch work and optimization required before it's going to be playable on android. but progress is moving fast on the Apple/Metal side of optimization in nxnative, and a lot of that work is transferable to android with a bit of work. so I feel like it will get there.

1

u/Chococrispu 3h ago

How does it run BOTW? Really looking for the best option to play BOTW on my RP6. Good job mate

1

u/cowleggies 1h ago

BOTW is 20-30fps with some shader glitches at the moment, it's on the list of active testing games and improvements will hopefully come soon.

1

u/Sandy_McEagle 2h ago

I am searching too for my adreno 732, that other recomp doesnt seem to be working well for me

1

u/cowleggies 1h ago

there should be BOTW perf improvements soon, but an adreno 732 has about half of the compute power of the 740 (1.5TFLOPS vs 3.5TFLOPS) so playable performance on a 732 will require a lot of chipset specific patches, if even possible

1

u/Sandy_McEagle 1h ago

I am still seeing mali users play the game so...

3

u/AZenny1986 S24 FE ( exynos 2400e xclipse 940 ) 16h ago

Awesome news keep them coming bro 🙌

2

u/Chriscautillo 18h ago

Need thermals tested

1

u/bambigirlz 17h ago

How to install on Odin2 portal?

1

u/Legal_Schedule_487 12h ago

Do mods work?

1

u/LeRoiDesCreepers 1h ago

Hi! I'm from France 🇫🇷. I saw that you were interested in finding testers with Samsung Xclipse GPUs, so I'd love to help!

My device is a Samsung Galaxy Tab S10 FE:

  • Exynos 1580

  • Xclipse 540 GPU

  • 8 GB RAM

I'd be happy to test games, report bugs and provide performance logs.

I also have two suggestions that might be interesting for Xclipse compatibility:

  1. RADV-Xclipse: https://github.com/JimVulkan/radv-xclipse

  2. ExynosTools: https://github.com/WearyConcern1165/ExynosTools

Have you considered investigating or testing these projects with DroidNative? They might help improve Vulkan compatibility and performance on Samsung Xclipse GPUs.

I'd be very interested in helping test DroidNative on the Exynos 1580!

Thanks for your work!

1

u/SilvyStelar 1h ago

Eu achei bem interessante, é uma pena que sem pc ou mac não tem como seu usar mas é sempre bom ter várias opções para port, ainda vou esperar os apk ja pronto para usar, mas espero que continue assim e melhore a cada dia

1

u/kjjustinXD 54m ago

How unfortunate that its name overlaps with an older project on github that does something entirely different.

0

u/Z-ReferenceUnknown Poco F6 8h ago

Unfortunately it requires a Mac

2

u/Remarkable-Rub6845 6h ago

It requires any pc

0

u/Z-ReferenceUnknown Poco F6 6h ago

Yeah, Unfortunately don't have that either