[Redmi Note 9 Guides, News, & Discussion] UwU nyaa~~!:
A long time ago, I posted in a forum thread about my difficulty in trying to revive my M2003J15SG and after having my ethereal Windows install bricked. I switched to Fedora and tried my hand there, where surprisingly, things worked very well. I'm not calling this a guide because I'm basically piecing this together from my bash_history and recollection. I have used the word guide too many times to keep that sentence but yeah, it may be shaky in some places.

Disclaimer​

/*
* Your warranty is... still valid?
*
* I am not responsible for bricked devices, dead SD cards,
* thermonuclear war, or you getting fired because the alarm app failed. Please
* do some research if you have any concerns.
*
* I have removed the part about laughing at you because I'm not a meanie :3
*
* But yeah, this text is as-is. We provide this work to you without
* warranty of any kind, express or implied and in no event shall the authors
* be liable for any claim, damages or other liability in any way, shape or form,
* arising from, out of, in connection with the work
*
*/

A few things to note​

Ingredients​

a) Preparing the computer​

Step 0: Extract all ingredients and put them into one directory for ease of access

Step 1: Install all the dependencies you'll need

sudo dnf install android-tools git libusb-devel python3 python3-pip systemd-udev

Step 2: Prevent Linux from interfering with MediaTek serial connections

sudo touch /etc/udev/rules.d/20-mm-blacklist-mtk.rules
echo "ATTRS{idVendor}==\"0e8d\", ENV{ID_MM_DEVICE_IGNORE}=\"1\"" | sudo tee /etc/udev/rules.d/20-mm-blacklist-mtk.rules
echo "ATTRS{idVendor}==\"6000\", ENV{ID_MM_DEVICE_IGNORE}=\"1\"" | sudo tee -a /etc/udev/rules.d/20-mm-blacklist-mtk.rules

Step 3: Clone mtkclient and install its dependencies

git clone https://github.com/bkerler/mtkclient
cd mtkclient
pip3 install -r requirements.txt
python3 setup.py build
sudo python3 setup.py install

Step 4: Install mtkclient's bundled udev rules

sudo usermod -a -G dialout $USER
sudo cp Setup/Linux/*.rules /etc/udev/rules.d

Step 5: Reload udev rules

sudo udevadm control --reload-rules
sudo udevadm trigger

Step 6: Return to previous directory

cd ..

b) Preparing the device​

c) Backing everything up​

Alongside ROM and userdata, your EMMC contains your IEMI, your bootloader lock state, MAC addresses, calibration data, the whole nine yards. It's always a good idea to back things up before we get started.

Step 1: Copy readback_ui_bak.xml to the SP Flash Tool directory

cp ./readback_ui_bak.xml ./SP_Flash_Tool_v5.2020_Linux/readback_ui_bak.xml

Step 2: Connecting your device and applying the exploit

Step 3: Open SP Flash Tool

Step 4: Load the Download Agent (DA)

Step 5: Configure SP Flash Tool

Step 6: Backup device contents

d) Flashing stock firmware​

Step 1: Copy scatterfiles to ROM directory

cp ./MT6768_Android_scatter--V11.0.5.0.QJOMIXM--boundary_false.txt ./merlin_global_images_V11.0.5.0.QJOMIXM_20200609.0000.00_10.0_global/images/MT6768_Android_scatter--V11.0.5.0.QJOMIXM--boundary_false.txt
cp ./MT6768_Android_scatter--V11.0.5.0.QJOMIXM--download_true--boundary_false.txt ./merlin_global_images_V11.0.5.0.QJOMIXM_20200609.0000.00_10.0_global/images/MT6768_Android_scatter--V11.0.5.0.QJOMIXM--download_true--boundary_false.txt

Step 2: Flash the firmware

Step 3: Restore bootloader status (optional)

In case you had an unlocked bootloader before imploding your phone and don't want to bother with Xiaomi's rigmarole, then by restoring seccfg, you should get it back.

Step 4: Reconnect your battery and first boot

e) Packing it up​