[Xiaomi Mi A2 / 6X Guides, News, & Discussion] Double_A_92:
Reasonable Stock ROM Replacement

​

Since our Xiaomi Mi A2 is probably going to reach its end of life soon, I tried to find a suitable replacement for the stock ROM which is as unbiased and official as possible.

This post will not be a detailed step-by-step tutorial, but a list of my findings with links to the official tutorials of each individial product.

My goal is it to create a ressource which will not get out-of-date and get slowly riddled with link rot of custom hosted files!

LineageOS

As the backbone of this "build" I chose LineageOS since it seems the most stable and official custom ROM available, with the highest chance of getting regular updates in the long term.

It also provides good tutorials on how to get started with custom ROMs in general, which can be found here:

ROM: https://download.lineageos.org/jasmine_sprout​

Installation Guide: https://wiki.lineageos.org/devices/jasmine_sprout/install​

Recovery

For the recovery I would just stick to the default that lineage uses.

( Some people recommend alternatives like TWRP, but in this case that is not really needed and for me it actually seemed to cause various random problems. )

Google Apps

If you need the Google apps it's reasonable to stick to the version that lineage recommends: https://wiki.lineageos.org/gapps.html

Another good version that I recommend is NikGApps, which is usually more up-to-date and offers extra functions (e.g. Youtube Vanced and AdAway): https://nikgapps.com/

Magisk

Magisk is the best way to root your phone and more importantly to restore the SafetyNet status.

If you google for it you will find many sketchy download sites, so make sure to download it from the official github site: https://github.com/topjohnwu/Magisk/releases

Install it according to the official guide that can be found here: https://topjohnwu.github.io/Magisk/install.html

The proper way is the "Patching Images" way. Do that with the lineage recovery image that you used earlier and just reflash it again via fastboot.

( You will find many other tutorials telling you to do the "Custom Recovery" way, but that is outdated, not recommended and didn't actually seem to work for me. )

Passing SafetyNet

Once you have Magisk installed, the first step is to make sure to enable "MagiskHide" in the Magisk settings.

After that you need to install "MagiskHide Props Config" which can be found in the default modules of Magisk.

Follow the official guide with the goal of installing a certified fingerprint for the Xiaomi Mi A2: https://github.com/Magisk-Modules-Repo/MagiskHidePropsConf/blob/master/README.md#installation

Google Camera

Since there sadly isn't a port of the stock camera app for custom ROMs, the best alternative is a Google Camera mod.

Stable versions can be found here: https://www.celsoazevedo.com/files/android/google-camera/dev-suggested/

It seems to be a bit random which version works best or at least doesn't instantly crash, so try out a couple of the newest ones.

For me personally the most stable one seems to be Nikita's 7.4 v2.0 with the correct config file loaded.

Updating LineageOS

LineageOS offers an integrated update function ( see: https://wiki.lineageos.org/devices/jasmine_sprout/update ) which works pretty well.

However sometimes the second phase of the installation ( "Finalizing package installation" ) seems to get stuck at 0%, but it's not stuck it just takes a while (~15 mins).

After the update is completed do not press the “Restart now” or “Reboot” button!

You first need to also re-install Magisk (Magisk app → Install → Install to Inactive Slot (After OTA)).