Nintendo Games Crash

Several Nintendo games will refuse to run on Lineage OS, even if you're not rooted.

On my Mi Mix 2, with a fresh Lineage OS 15.1 install, it will pass SafetyNet. I'm able to use Google Pay and play Pokemon Go.
However, several games crash or refuse to run.

They include:

  • Super Mario Run
  • Fire Emblem Heroes
  • Animal Crossing: Pocket Camp

Why does this happen? Some games and apps check for system settings that would suggest that a non-retail build of Android was being used (such as Lineage OS).

I've seen recommendations of simply flashing Magisk to root to get the game the work. While this does work, it can introduce other issues and cause other problems. Despite it usually working with SafetyNet, many times that still fails when I have Magisk installed.

A better solution is to change the values of what the games look for. This can be done without rooting. You just need access to custom recovery (such as TWRP). If you have Lineage OS installed, you should already be familiar with custom recovery!

Just boot to Recovery and flash this with TWRP:
XdN-Debug-Patch.zip (~3 KB).

What it does:

It changes "ro.build.type" to "user".
It changes "ro.debuggable" to "0".
It creates an "addon.d" script file that will reapply the changes after a Lineage OS upgrade.

The contents of the zip are all plain-text, and can be easily reviewed.