[Xiaomi Mi Max 3 Guides, News, & Discussion] svbarbosa:
Ok. I plan to start a thread similar to the one I had for my previous daily driver - the venerable Samsung Galaxy Note 3. :)

But the Xiaomi is my new daily driver for only one week, Too soon now.

So I will list below the steps I used in my installation.

I assume those who will try to follow these steps have already an unlocked bootloader and a custom recovery installed. Plenty of guides on XDA for this.

My recovery of choice is Orange Fox. Thanks [MENTION=5850987]DarthJabba9[/MENTION] and his team for providing us this fantastic recovery.

Here is the Max 3 Orange Fox XDA thread:

[OFFICIAL][TWRP][TREBLE] OrangeFox Recovery Project

.

Before you start make sure you download the necessary files:

Your GSI of choice system.img - in my case I am using AOSiP - highly recommended. I have also booted successfully ArrowOS, DotOS, phh Pie and Descendant.

My flashable MIUI China Developers vendor/firmware zip file. Download it from

here

. I am on 9.3.7, but 9.3.14 should also work fine. If you´re brave at heart try it and let me know how it goes.

Universal Verity and Encryption disabler. There are many verity zips floating around, but the really safe and reliable one you will find in this thread:

Universal DM-Verity, ForceEncrypt, Disk Quota Disablers

Open Gapps arm64 package. My recommendation is nano (with Google Assistant) or pico (without assistant). Get it from

https://opengapps.org/

.

Lastest Magisk stable. Get zip and apk from official thread:

Magisk - Root & Universal Systemless Interface

.

Latest Migrate app, if you plan to backup/restore your apps/data. Get it from official thread:

[APP][ROOT][5.0+] Migrate - custom ROM migration tool

Your choice of GSI fixes for the Max 3. I am using All-In-One fix by [MENTION=2087636]lkmn[/MENTION]Arief

Now follow the steps:

If you want to backup/restore apps and data install migrate apk and run it to create the backup zip file. After successful creation copy the zip file to a safe place outside Internal Storage. This is a must if you need to format data. Also it is wise to keep a copy somewhere else just in case...

Reboot into recovery.

Make a nandroid backup (better safe than sorry!).

If your data partition is encrypted you will have to format data. In this case make also a backup of whatever you need to save from your Internal Storage partition. This is where Orange Fox comes handy. It allows you to make a nandroid backup of Internal Storage. Of course you will need a external sdcard with enough space.

If you need to format data, from recovery main menu select Wipe, push the "Format Data" button and type "YES". Then reboot recovery.

Select Wipe, Advanced Wipe, select System, Data and Cache, and swipe to wipe.

Flash my vendor/firmware zip.

Flash the Disable_Dm-Verity_ForceEncrypt_02.04.2019.zip.

Flash your GSI of choice - latest AOSiP highly recommend, DotOS and Arrow are good alternatives

Now a crucial step that is almost never mentioned: From recovery main menu select "Wipe", "Advanced Wipe", select System, push the "Partition Options" button, push the "Resize FS" button and swipe to resize. If there is an error message (very likely on first try) push the "Back" button and resize again until there is no error message.

Flash your gapps of choice (optional).

Flash latest Magisk stable (right now 18.1).

Flash the GSI fixes of your choice. I am on All-In-One fix by [MENTION=2087636]lkmn[/MENTION]Arief.

DO NOT wipe anything!

Cross your fingers and reboot. Your GSI rom should boot and you may set it up. Once you are happy reboot into recovery and flash migrate backup zip.

A few important words:

Although these steps have worked for me, there is no guarantee they will work for you.

If they do work, GPS may not be the greatest, specially if you are not in China. I am working on it. I plan to optimize gps.conf and release a flashable zip to fix it. In the mean time, if GPS is taking forever to get a lock for you, you may download the attached gps.zip (not flashable!), unzip gps.conf and copy it over the one in /vendor/etc using any root file manager. After copying you should change its permissions to rw-r--r-- (chmod 644) and reboot. GPS lock times should improve no matter where you are.