[GUIDES & FAQ][Merlin] Bootloader, Magisk, EdXposed, SafetyNet, GSI/Treble ROMs

Search This thread

Communos

Senior Member
Oct 28, 2019
243
171
Paris
Xiaomi Redmi 5
Google Pixel 3 XL
  • Like
Reactions: meruem56

Jhon_Locke

Senior Member
May 16, 2015
95
8
Is there another place to grab official firmware? Mine is not there, the version I have is 11.0.8.0(QJOLMCR), I can't find it.
 

n4xiii

Member
Mar 11, 2021
10
0
DISCLAIMERS (please read !)
  • This thread is made for the Redmi Note 9, also known as Redmi 10X 4G.
  • This device's codename is Merlin.
  • I will not be held responsible if you brick your device.
  • Follow the instructions shown in this thread at your own risks.
  • Follow the steps and ask questions below when unsure, everything will be fine!
  • No files will be directly provided. Do not use pre-created/re-uploaded files.

Prerequisites for most manipulations
  • Your phone, well charged if possible
  • The USB cable used to link your phone to your computer (the one on your charger works just fine)
  • A computer, with recent ADB & Fastboot (Platform Tools)
  • Some time, patience, and the ability to read and follow instructions!

Tutorials

Step 1
Make sure you have a Mi Account ready.
You should've created one when first setting up your phone, with your phone number and a password.

- If you have it: Double-check you have access to it by attempting to connect on Xiaomi's official website (Login page).
- If you don't: Create one with the Create an account button below the password form (same link as above), then connect to it.

Step 2
On your PC, go to Xiaomi's unlock page and click the colored Download Mi Unlock button.

j8fgLYw.jpg

Step 3
A download should start. Wait for it to finish, move the archive to your desktop and extract its content.

fOlOpW1.jpg

Step 4
Inside the extracted folder, double click the file called miflash_unlock.exe to start Xiaomi's Unlocking program.

NqDFN3F.jpg

Step 5
Read Xiaomi's Disclaimer then agree to their terms, or stop here and leave this thread if you don't.

7LDJov0.jpg

Step 6
Sign in to your Mi Account we talked about in Step 1.

Zx6fr6T.jpg

Step 7
Let's get your phone ready for unlocking.
  • Go to your phone's Settings > Mi Account and make sure you're logged in.
  • Now Settings > About Phone and tap the "MIUI Version" box multiple times until it says You are now a developer!
  • And finally Settings > Additional Settings > Developer Options

Enable the following settings inside Developer Options, and click Accept when warnings pop-up:
  • OEM Unlocking
  • USB Debugging
Still in Developer Options, check your Mi Unlock status and click the Add account and device button at the bottom if present.
Make sure to backup your phone's data before continuing on with this tutorial, as unlocking will make it factory reset (wipe)!

Step 8
Alright, all backed up? Confident? Let's get going with the final steps.
  • Turn off your phone.
  • Turn it back on into fastboot mode by holding down the Power button AND Volume Down together until it vibrates, you may then let go of the Power Button, but keep Volume Down held until you see the fastboot image on your phone.
82hjtTV.jpg
  • Connect your phone to your computer with the USB Cable.
  • Xiaomi's Software should detect it. If not, click on the cog-wheel in the top right, click the Check button to install the driver and follow instructions, then keep going.
  • Click Unlock, and follow the instructions!
Now there are two possible scenarios
  • Either you've done all this before and can have your phone unlocked right away.
  • Or this is the first time and at the end of the progress it'll ask you to wait ~7days, and, well, there's no way around that, so come back in 7 days and start from Step 8 again.
And there you go! Your phone will reboot and you can set it all up again, with the ability to follow the rooting tutorial below, and you can also install custom ROMs/recovery!
Step 1
Download the latest Magisk Manager on your phone.
Go to the link above, click the latest MagiskManager-vX.X.X.apk you see in the list to start the download, open the file and install.

Step 2
Go to the download page for the MIUI Official Rom for your region, make sure to get the fastboot version.
OR (if you don't want/can't download 3gb of ROM)
Follow DavitidzeSh's instructions on how to gather the boot.img and vbmeta.img files and SKIP to Step 5.

Step 3
Take the file you downloaded above, it should be a .tgz archive.
Extract it, you'll get a .tar achive.
Extract that one again.

Step 4
You should now have a folder similar to the one below

d1H2K4g.jpg

Go inside the images folder

KQ7GB7S.jpg

Step 5
Grab the the vbmeta.img file and copy it to your ADB & Fastboot (Platform Tools) folder.
Grab the boot.img file and copy it to your phone's /sdcard/ folder.
(where the Android, DCIM, Download, and more are present, just drop it in there)

Here's how it should look inside your phone's storage in the end.

uiusbXG.jpg

Step 6
On your phone, open up Magisk Manager.
  • Click the Magisk Install button as shown below.
  • Then Select and Patch a File.
  • Go look for your boot.img you previously copied to your phone and pick it.
  • Click Let's go! and wait for Magisk to complete the process!

Z8o3ai9.jpg

Step 7
Link your phone to your PC, grab the file made by Magisk Manager.
It's located in your phone's downloads folder, called magisk_patched.img.
Copy and paste it where your ADB & Fastboot (Platform Tools) are located.

You should now have a folder structure like this:
  • adb.exe
  • fastboot.exe
  • magisk_patched.img
  • vbmeta.img
  • Extra files from the platform tools

epfTRVa.jpg

Step 8
Alright, we're ready to root!
Turn off your phone, then get in fastboot mode.
(Power + Volume Down, like the unlocking tutorial)

Step 9
Link your phone to your PC with the USB cable if not done already.

Step 10
Shift + Right click in an empty space inside the folder we prepared in Step 7,
And click Open PowerShell window here.

Inside the PowerShell window, input the following commands line by line, in order.



Make sure your device shows up, should be a bunch of numbers and letters, a couple spaces, and fastboot.
If nothing does, go back to Step 8 and try again.




Z5zUaGR.jpg

Note: Your PowerShell window will look different, I'm using a different program, don't worry

Your phone will reboot.
Open up Magisk Manager, and double check that it's installed.


0nEL6dO.jpg

You're done!
That said, you will have issues with certain apps leaving it like this.
You should to hide the fact that your phone is rooted.

Check out the Passing SafetyNet tutorial further down below!
I very much discourage to EdXposed your phone unless you have a very good reason for it.
It's a pain to pass SafetyNet.
It doesn't get updated often.
It has very niche use cases for which it's actually worth it.


That said, I explain it here for people who know what they're getting into and want instructions on how to do it.

This procedure requires to be rooted with Magisk.

Step 1
Inside Magisk Manager, go to the Modules tab.
Click the search button (bottom right) and search Riru.
Install the Riru module by Rikka.
Activate it and Reboot.

TllFEIp.jpg

smEPpXN.jpg

Step 2
Download and install the latest EdXposed Manager, the same way you did with Magisk Manager when rooting.

Step 3
Open it up, go to the ALPHA tab and click install/update.
It'll start a file download.

1GF2hIW.jpg

Step 4
Go back to Magisk Manager, Modules tab, except this time click Install from Storage.
Point to the .zip
file you just got, located in the Downloads folder of your phone.
At the end of the installation, click reboot.


Step 5
Let's double check your installation is operational.
Go to EdXposed Manager, first tab.
It should say EdXposed Framework is active.


JvuOjMg.jpg

You're done!
You should now be able to install EdXposed modules.
That said, you will have issues with certain apps leaving it like this.
You should to hide the fact that your phone is EdXposed.
Check out the Passing SafetyNet tutorial further down below!
For Magisk Rooted Phones
Enable Magisk Hide inside Magisk Manager's settings.

For EdXposed Phones
Again, I highly recommend not EdXposing your phone and sticking to just Magisk if you can help it.
You should also know that this method will show you're passing SafetyNet inside Magisk but it's a pain to do and isn't as well hidden as Magisk alone.
Step 1
- Do the step for Rooted phones listed above if not done already.
Step 2 - In EdXposed Manager, get the HiddenCore Module and activate it.
Step 3 - Now, in the side-menu: Compat List > tick HiddenCore Module.
Step 4 - Then, go to Settings > Framework > Enable "App List mode".
Step 5 - Finally, Applications(Black List) and tick: Android Services Library, Chrome, Google Play services, Google Play Store, Google Services Framework

Reboot and enjoy! You're all set and SafetyNet should pass.
Step 1
Pick your poison in the Treble Forums!
My recommendations are in the Extras section of this post.

Step 2
Download the chosen ROM's A/B Arm64 version
It should be an .img.xz file
Extract it and you'll get an .img file.

You're almost ready to flash.
Make sure to backup your phone's data.
Continuing this tutorial will wipe your phone!

Step 3

Put your phone into fastboot mode.
(Power + Volume Down)
Connect it to your PC.

Step 4
Move the .img file you downloaded to your ADB & Fastboot (Platform Tools) folder.
Rename it to system.img

Step 5
Shift + Right click in an empty space inside the folder,
And click Open PowerShell window here.

Inside the PowerShell window, input the following commands line by line, in order.



Your phone will now reboot on its own.
Set it all up and enjoy!
That said, depending on how old the GSI you picked is, you MAY have issues leaving it at that.
Therefore, I highly recommend checking out the next tutorial section about Fixing GSI Issues.
I have worked together with a developer to bring fixes for our device to every custom GSI rom out there.
The most recent GSI's shouldn't need the fixes listed below.


Older GSI (treble) roms have two known bugs that we can fix:
  • The brightness slider being misscalibrated, and therefore auto-brightness broken too.
  • The headphone jack not working.
You need to be rooted to do so.

Step 1 - Get yourself a Terminal Emulator, I recommend Termux
Step 2 - Type the following commands inside of it, line by line, in order:


You're done! Brightness should be fine, headphones get detected, enjoy!
Backup all the data you might have on your phone to restore it after the manipulation!

Step 1
Download the fastboot ROM corresponding to your region here.
(The same one used to grab the boot.img and vbmeta.img when rooting)
And extract it.

Step 2
Download the latest MiFlashTool.
(Uploaded on my Google drive, it's a little hard to find)
And extract it.

Step 3
Put your device in fastboot mode.
(Power + Vol Down, refer to the rooting tutorial for a more info)
And connect it to your computer via USB.

Step 4
Open MiFlashTool (XiaoMiFlash.exe), your device should appear in the list.

Step 5
Click the Select button in the top left,
And point to your fastboot ROM's folder
(The one containing the "AP", "BP", "BP_IN", "images" folders and a bunch of files)

Step 6
At the bottom right of the software, choose if you either want to just:
clean all
(wipe and re-install)
OR
clean all and lock

(wipe, reinstall and re-lock your bootloader)

Note: If you re-lock your bootloader but wish to unlock it again later, you won't have to wait the 7 days again.


Step 7
Finally, in the top right, click the flash button.

Now just wait a while, your phone will reboot on the stock rom and you're good to go!

Extras

All my recommendation's latest releases contain fixes for our device.

Ordered by personal preference:
Q: Will unlocking my bootloader void my warranty?
A: No, it will not, it's easily reversable too, check the "Resetting your phone" tutorial.

Q
: I rooted/EdXposed my phone and now Netflix won't even open, or doesn't work properly, what's up with that?
A: There's an easy fix if you have Magisk. Install the liboemcrypto disabler Magisk module, activate it and reboot.

Q
: I tried unlocking my bootloader but, Mi Flash Unlock doesn't detect my phone, even though it's in fastboot mode and connected. Help?
A: Here are some things you can try:
  • Try another USB port.
  • Try another USB cable.
  • Install the Mi USB Drivers manually, they're included in the MiFlashUnlock folder.
    Run the driver_install_64.exe, OR go to the driver folder, then the folder corresponding to your windows version, right click the android_winusb.inf and click Install.
  • In the Device Manager, check that the driver provider is Xiaomi.
    If not, uninstall it and restart your computer.

WmkBs0W.jpg

D:\idm\platform-tools_r30.0.4-windows\platform-tools>.\fastboot.exe devices
INAMKBWSTS5.... fastboot

D:\idm\platform-tools_r30.0.4-windows\platform-tools>.\fastboot.exe --disable-ve
rity --disable-verification flash vbmeta vbmeta.img
Rewriting vbmeta struct at offset: 0
Sending 'vbmeta' (4 KB) OKAY [ 0.006s]
Writing 'vbmeta' OKAY [ 0.003s]
Finished. Total time: 0.062s

D:\idm\platform-tools_r30.0.4-windows\platform-tools>.\fastboot.exe flash boot .
\magisk_patched_FH7ms.img
Sending 'boot' (65536 KB) OKAY [ 1.946s]
Writing 'boot' OKAY [ 0.849s]
Finished. Total time: 2.815s

D:\idm\platform-tools_r30.0.4-windows\platform-tools>.\fastboot.exe reboot
Rebooting OKAY [ 0.001s]
Finished. Total time: 0.006s

D:\idm\platform-tools_r30.0.4-windows\platform-tools>



Phone rebooted but when i check on root checker , , it says ur phone is not properly rooted? i didn't missed any step can u help?
 

Akitake

Senior Member
Jan 20, 2018
117
47
D:\idm\platform-tools_r30.0.4-windows\platform-tools>.\fastboot.exe devices
INAMKBWSTS5.... fastboot

D:\idm\platform-tools_r30.0.4-windows\platform-tools>.\fastboot.exe --disable-ve
rity --disable-verification flash vbmeta vbmeta.img
Rewriting vbmeta struct at offset: 0
Sending 'vbmeta' (4 KB) OKAY [ 0.006s]
Writing 'vbmeta' OKAY [ 0.003s]
Finished. Total time: 0.062s

D:\idm\platform-tools_r30.0.4-windows\platform-tools>.\fastboot.exe flash boot .
\magisk_patched_FH7ms.img
Sending 'boot' (65536 KB) OKAY [ 1.946s]
Writing 'boot' OKAY [ 0.849s]
Finished. Total time: 2.815s

D:\idm\platform-tools_r30.0.4-windows\platform-tools>.\fastboot.exe reboot
Rebooting OKAY [ 0.001s]
Finished. Total time: 0.006s

D:\idm\platform-tools_r30.0.4-windows\platform-tools>



Phone rebooted but when i check on root checker , , it says ur phone is not properly rooted? i didn't missed any step can u help?

Don't use Root checker.
Use Magisk Manager, it will tell you if Magisk has been installed.
 
Mar 19, 2021
8
0
Redmi Note 9
Not working for me. I pasted .\fastboot.exe reboot fastboot this command in powershell, after that it reboots into fastbootd and the powershell says: Waiting for any devices, and i cant do anything? any solutions?
 

n4xiii

Member
Mar 11, 2021
10
0
this is my version
cattail_in_global_images_V12.0.1.0.QCTINXM redmi 9
i followed this video -
but nothing happens , even my bootloader is unlocked
 

Jonmore

New member
Apr 15, 2021
1
0
Hi ! Thanks a lot for your guide, it was really helpful.

However, I didn't manage to pass SafetyNet.

I'm using the latest release of CAOS (v303) and the latest version of Magisk (v20.1), I activated MagiskHide, and already tried erasing userdata and cache through fastboot.

Is there something I'm missing, or should I use older version of CAOS and/or Magisk ? In that case, what version do you recommand ?

Thanks for your help.
 

Bharath kota

Member
Feb 24, 2021
8
1
Redmi Note 9
DISCLAIMERS (please read !)
  • This thread is made for the Redmi Note 9, also known as Redmi 10X 4G.
  • This device's codename is Merlin.
  • I will not be held responsible if you brick your device.
  • Follow the instructions shown in this thread at your own risks.
  • Follow the steps and ask questions below when unsure, everything will be fine!
  • No files will be directly provided. Do not use pre-created/re-uploaded files.
  • Feel free to cite parts of this thread in your own, just make sure to give credit where it's due.

Prerequisites for most manipulations
  • Your phone, well charged if possible
  • The USB cable used to link your phone to your computer (the one on your charger works just fine)
  • A computer, with recent ADB & Fastboot (Platform Tools)
  • Some time, patience, and the ability to read and follow instructions!

Tutorials

Step 1
Make sure you have a Mi Account ready.
You should've created one when first setting up your phone, with your phone number and a password.

- If you have it: Double-check you have access to it by attempting to connect on Xiaomi's official website (Login page).
- If you don't: Create one with the Create an account button below the password form (same link as above), then connect to it.

Step 2
On your PC, go to Xiaomi's unlock page and click the colored Download Mi Unlock button.

j8fgLYw.jpg

Step 3
A download should start. Wait for it to finish, move the archive to your desktop and extract its content.

fOlOpW1.jpg

Step 4
Inside the extracted folder, double click the file called miflash_unlock.exe to start Xiaomi's Unlocking program.

NqDFN3F.jpg

Step 5
Read Xiaomi's Disclaimer then agree to their terms, or stop here and leave this thread if you don't.

7LDJov0.jpg

Step 6
Sign in to your Mi Account we talked about in Step 1.

Zx6fr6T.jpg

Step 7
Let's get your phone ready for unlocking.
  • Go to your phone's Settings > Mi Account and make sure you're logged in.
  • Now Settings > About Phone and tap the "MIUI Version" box multiple times until it says You are now a developer!
  • And finally Settings > Additional Settings > Developer Options

Enable the following settings inside Developer Options, and click Accept when warnings pop-up:
  • OEM Unlocking
  • USB Debugging
Still in Developer Options, check your Mi Unlock status and click the Add account and device button at the bottom if present.
Make sure to backup your phone's data before continuing on with this tutorial, as unlocking will make it factory reset (wipe)!

Step 8
Alright, all backed up? Confident? Let's get going with the final steps.
  • Turn off your phone.
  • Turn it back on into fastboot mode by holding down the Power button AND Volume Down together until it vibrates, you may then let go of the Power Button, but keep Volume Down held until you see the fastboot image on your phone.
82hjtTV.jpg
  • Connect your phone to your computer with the USB Cable.
  • Xiaomi's Software should detect it. If not, click on the cog-wheel in the top right, click the Check button to install the driver and follow instructions, then keep going.
  • Click Unlock, and follow the instructions!
Now there are two possible scenarios
  • Either you've done all this before and can have your phone unlocked right away.
  • Or this is the first time and at the end of the progress it'll ask you to wait ~7days, and, well, there's no way around that, so come back in 7 days and start from Step 8 again.
And there you go! Your phone will reboot and you can set it all up again, with the ability to follow the rooting tutorial below, and you can also install custom ROMs/recovery!
Step 1
Download the latest Magisk Manager on your phone.
Go to the link above, click the latest MagiskManager-vX.X.X.apk you see in the list to start the download, open the file and install.

Step 2
Go to the download page for the MIUI Official Rom for your region, make sure to get the fastboot version.
OR (if you don't want/can't download 3gb of ROM)
Follow DavitidzeSh's instructions on how to gather the boot.img and vbmeta.img files and SKIP to Step 5.

Step 3
Take the file you downloaded above, it should be a .tgz archive.
Extract it, you'll get a .tar achive.
Extract that one again.

Step 4
You should now have a folder similar to the one below

d1H2K4g.jpg

Go inside the images folder

KQ7GB7S.jpg

Step 5
Grab the the vbmeta.img file and copy it to your ADB & Fastboot (Platform Tools) folder.
Grab the boot.img file and copy it to your phone's /sdcard/ folder.
(where the Android, DCIM, Download, and more are present, just drop it in there)

Here's how it should look inside your phone's storage in the end.

uiusbXG.jpg

Step 6
On your phone, open up Magisk Manager.
  • Click the Magisk Install button as shown below.
  • Then Select and Patch a File.
  • Go look for your boot.img you previously copied to your phone and pick it.
  • Click Let's go! and wait for Magisk to complete the process!

Z8o3ai9.jpg

Step 7
Link your phone to your PC, grab the file made by Magisk Manager.
It's located in your phone's downloads folder, called magisk_patched.img.
Copy and paste it where your ADB & Fastboot (Platform Tools) are located.

You should now have a folder structure like this:
  • adb.exe
  • fastboot.exe
  • magisk_patched.img
  • vbmeta.img
  • Extra files from the platform tools

epfTRVa.jpg

Step 8
Alright, we're ready to root!
Turn off your phone, then get in fastboot mode.
(Power + Volume Down, like the unlocking tutorial)

Step 9
Link your phone to your PC with the USB cable if not done already.

Step 10
Shift + Right click in an empty space inside the folder we prepared in Step 7,
And click Open PowerShell window here.

Inside the PowerShell window, input the following commands line by line, in order.



Make sure your device shows up, should be a bunch of numbers and letters, a couple spaces, and fastboot.
If nothing does, go back to Step 8 and try again.




Z5zUaGR.jpg

Note: Your PowerShell window will look different, I'm using a different program, don't worry

Your phone will reboot.
Open up Magisk Manager, and double check that it's installed.


0nEL6dO.jpg

You're done!
That said, you will have issues with certain apps leaving it like this.
You should to hide the fact that your phone is rooted.

Check out the Passing SafetyNet tutorial further down below!
I very much discourage to EdXposed your phone unless you have a very good reason for it.
It's a pain to pass SafetyNet.
It doesn't get updated often.
It has very niche use cases for which it's actually worth it.


That said, I explain it here for people who know what they're getting into and want instructions on how to do it.

This procedure requires to be rooted with Magisk.

Step 1
Inside Magisk Manager, go to the Modules tab.
Click the search button (bottom right) and search Riru.
Install the Riru module by Rikka.
Activate it and Reboot.

TllFEIp.jpg

smEPpXN.jpg

Step 2
Download and install the latest EdXposed Manager, the same way you did with Magisk Manager when rooting.

Step 3
Open it up, go to the ALPHA tab and click install/update.
It'll start a file download.

1GF2hIW.jpg

Step 4
Go back to Magisk Manager, Modules tab, except this time click Install from Storage.
Point to the .zip
file you just got, located in the Downloads folder of your phone.
At the end of the installation, click reboot.


Step 5
Let's double check your installation is operational.
Go to EdXposed Manager, first tab.
It should say EdXposed Framework is active.


JvuOjMg.jpg

You're done!
You should now be able to install EdXposed modules.
That said, you will have issues with certain apps leaving it like this.
You should to hide the fact that your phone is EdXposed.
Check out the Passing SafetyNet tutorial further down below!
For Magisk Rooted Phones
Enable Magisk Hide inside Magisk Manager's settings.

For EdXposed Phones
Again, I highly recommend not EdXposing your phone and sticking to just Magisk if you can help it.
You should also know that this method will show you're passing SafetyNet inside Magisk but it's a pain to do and isn't as well hidden as Magisk alone.
Step 1
- Do the step for Rooted phones listed above if not done already.
Step 2 - In EdXposed Manager, get the HiddenCore Module and activate it.
Step 3 - Now, in the side-menu: Compat List > tick HiddenCore Module.
Step 4 - Then, go to Settings > Framework > Enable "App List mode".
Step 5 - Finally, Applications(Black List) and tick: Android Services Library, Chrome, Google Play services, Google Play Store, Google Services Framework

Reboot and enjoy! You're all set and SafetyNet should pass.
Step 1
Pick your poison in the Treble Forums!
My recommendations are in the Extras section of this post.

Step 2
Download the chosen ROM's A/B Arm64 version
It should be an .img.xz file
Extract it and you'll get an .img file.

You're almost ready to flash.
Make sure to backup your phone's data.
Continuing this tutorial will wipe your phone!

Step 3

Put your phone into fastboot mode.
(Power + Volume Down)
Connect it to your PC.

Step 4
Move the .img file you downloaded to your ADB & Fastboot (Platform Tools) folder.
Rename it to system.img

Step 5
Shift + Right click in an empty space inside the folder,
And click Open PowerShell window here.

Inside the PowerShell window, input the following commands line by line, in order.



Your phone will now reboot on its own.
Set it all up and enjoy!
That said, depending on how old the GSI you picked is, you MAY have issues leaving it at that.
Therefore, I highly recommend checking out the next tutorial section about Fixing GSI Issues.
I have worked together with a developer to bring fixes for our device to every custom GSI rom out there.
The most recent GSI's shouldn't need the fixes listed below.


Older GSI (treble) roms have two known bugs that we can fix:
  • The brightness slider being misscalibrated, and therefore auto-brightness broken too.
  • The headphone jack not working.
You need to be rooted to do so.

Step 1 - Get yourself a Terminal Emulator, I recommend Termux
Step 2 - Type the following commands inside of it, line by line, in order:


You're done! Brightness should be fine, headphones get detected, enjoy!
Backup all the data you might have on your phone to restore it after the manipulation!

Step 1
Download the fastboot ROM corresponding to your region here.
(The same one used to grab the boot.img and vbmeta.img when rooting)
And extract it.

Step 2
Download the latest MiFlashTool.
(Uploaded on my Google drive, it's a little hard to find)
And extract it.

Step 3
Put your device in fastboot mode.
(Power + Vol Down, refer to the rooting tutorial for a more info)
And connect it to your computer via USB.

Step 4
Open MiFlashTool (XiaoMiFlash.exe), your device should appear in the list.

Step 5
Click the Select button in the top left,
And point to your fastboot ROM's folder
(The one containing the "AP", "BP", "BP_IN", "images" folders and a bunch of files)

Step 6
At the bottom right of the software, choose if you either want to just:
clean all
(wipe and re-install)
OR
clean all and lock

(wipe, reinstall and re-lock your bootloader)

Note: If you re-lock your bootloader but wish to unlock it again later, you won't have to wait the 7 days again.


Step 7
Finally, in the top right, click the flash button.

Now just wait a while, your phone will reboot on the stock rom and you're good to go!

Extras

All my recommendation's latest releases contain fixes for our device.

Ordered by personal preference:
Q: Will unlocking my bootloader void my warranty?
A: No, it will not, it's easily reversable too, check the "Resetting your phone" tutorial.

Q
: I rooted/EdXposed my phone and now Netflix won't even open, or doesn't work properly, what's up with that?
A: There's an easy fix if you have Magisk. Install the liboemcrypto disabler Magisk module, activate it and reboot.

Q
: I tried unlocking my bootloader but, Mi Flash Unlock doesn't detect my phone, even though it's in fastboot mode and connected. Help?
A: Here are some things you can try:
  • Try another USB port.
  • Try another USB cable.
  • Install the Mi USB Drivers manually, they're included in the MiFlashUnlock folder.
    Run the driver_install_64.exe, OR go to the driver folder, then the folder corresponding to your windows version, right click the android_winusb.inf and click Install.
  • In the Device Manager, check that the driver provider is Xiaomi.
    If not, uninstall it and restart your computer.

WmkBs0W.jpg
Hi, your method did not involve using twrp, but since it's the best method to get out of a bootloop without deleting all modules. So can you please tell how to get that working?
 

George528

Member
Apr 24, 2021
38
13
Redmi Note 9
I did everything as you said on the root part but my device doesn't seem to be rooted, I installed the app called root checker and it says:
Sorry! Root access is not properly installed on this device
I have to mention that something went wrong during flashing at step 10, here is what I got:

Untitled.png

did something get wrong?
 
Last edited:

Bharath kota

Member
Feb 24, 2021
8
1
Redmi Note 9
I did everything as you said on the root part but my device doesn't seem to be rooted, I installed the app called root checker and it says:
Sorry! Root access is not properly installed on this device
I have to mention that something went wrong during flashing at step 10, here is what I got:

View attachment 5297987
did something get wrong?
Hey, I got the problem at first too. The problem is simple, when you patch the boot image with magisk manager in your phone, it gives you a magisk patch img, this is the file to be flashed. But this file name initially has some numbers in it's name, unlike the command which simply says 'magisk_patched.img'. So you either have to enter it's full name instead of 'magisk_patched.img',pr you can simply rename your magisk patch img to the name mentioned in the commands.
 

Akitake

Senior Member
Jan 20, 2018
117
47
I did everything as you said on the root part but my device doesn't seem to be rooted, I installed the app called root checker and it says:
Sorry! Root access is not properly installed on this device
I have to mention that something went wrong during flashing at step 10, here is what I got:

View attachment 5297987
did something get wrong?
You don't need external tools to check your root, just open magisk manager and it'll say Installed: XX.X (version number)
Also, did you follow the steps properly, as in, did you put the proper boot.img in your phone, patch it with the manager, transferred the patched file back to your pc, then used that to flash boot ?
 

George528

Member
Apr 24, 2021
38
13
Redmi Note 9
Hey, I got the problem at first too. The problem is simple, when you patch the boot image with magisk manager in your phone, it gives you a magisk patch img, this is the file to be flashed. But this file name initially has some numbers in it's name, so you either have to enter it's full name instead of 'magisk_patched.img',pr you can simply rename your magisk patch img to the name mentioned in the commands.
thanks for the reply

yes, notice how I specified magisk_patched.img 's full name sthe second time
Untitled.png
 

George528

Member
Apr 24, 2021
38
13
Redmi Note 9
You don't need external tools to check your root, just open magisk manager and it'll say Installed: XX.X (version number)
Also, did you follow the steps properly, as in, did you put the proper boot.img in your phone, patch it with the manager, transferred the patched file back to your pc, then used that to flash boot ?
yes, did exactly that

here is my magisk manager app
IMG_20210503_123751.jpg


was the install successful?

also i atteched the log file of magisk installation, hope it helps
 

Attachments

  • magisk_log_2021-05-03T125950Z.log
    47.8 KB · Views: 7
Last edited:
  • Like
Reactions: Akitake

Bharath kota

Member
Feb 24, 2021
8
1
Redmi Note 9
yes, did exactly that

here is my magisk manager app
View attachment 5298019

was the install successful?
Does it got something to do with enabling USB
DISCLAIMERS (please read !)
  • This thread is made for the Redmi Note 9, also known as Redmi 10X 4G.
  • This device's codename is Merlin.
  • I will not be held responsible if you brick your device.
  • Follow the instructions shown in this thread at your own risks.
  • Follow the steps and ask questions below when unsure, everything will be fine!
  • No files will be directly provided. Do not use pre-created/re-uploaded files.
  • Feel free to cite parts of this thread in your own, just make sure to give credit where it's due.

Prerequisites for most manipulations
  • Your phone, well charged if possible
  • The USB cable used to link your phone to your computer (the one on your charger works just fine)
  • A computer, with recent ADB & Fastboot (Platform Tools)
  • Some time, patience, and the ability to read and follow instructions!

Tutorials

Step 1
Make sure you have a Mi Account ready.
You should've created one when first setting up your phone, with your phone number and a password.

- If you have it: Double-check you have access to it by attempting to connect on Xiaomi's official website (Login page).
- If you don't: Create one with the Create an account button below the password form (same link as above), then connect to it.

Step 2
On your PC, go to Xiaomi's unlock page and click the colored Download Mi Unlock button.

j8fgLYw.jpg

Step 3
A download should start. Wait for it to finish, move the archive to your desktop and extract its content.

fOlOpW1.jpg

Step 4
Inside the extracted folder, double click the file called miflash_unlock.exe to start Xiaomi's Unlocking program.

NqDFN3F.jpg

Step 5
Read Xiaomi's Disclaimer then agree to their terms, or stop here and leave this thread if you don't.

7LDJov0.jpg

Step 6
Sign in to your Mi Account we talked about in Step 1.

Zx6fr6T.jpg

Step 7
Let's get your phone ready for unlocking.
  • Go to your phone's Settings > Mi Account and make sure you're logged in.
  • Now Settings > About Phone and tap the "MIUI Version" box multiple times until it says You are now a developer!
  • And finally Settings > Additional Settings > Developer Options

Enable the following settings inside Developer Options, and click Accept when warnings pop-up:
  • OEM Unlocking
  • USB Debugging
Still in Developer Options, check your Mi Unlock status and click the Add account and device button at the bottom if present.
Make sure to backup your phone's data before continuing on with this tutorial, as unlocking will make it factory reset (wipe)!

Step 8
Alright, all backed up? Confident? Let's get going with the final steps.
  • Turn off your phone.
  • Turn it back on into fastboot mode by holding down the Power button AND Volume Down together until it vibrates, you may then let go of the Power Button, but keep Volume Down held until you see the fastboot image on your phone.
82hjtTV.jpg
  • Connect your phone to your computer with the USB Cable.
  • Xiaomi's Software should detect it. If not, click on the cog-wheel in the top right, click the Check button to install the driver and follow instructions, then keep going.
  • Click Unlock, and follow the instructions!
Now there are two possible scenarios
  • Either you've done all this before and can have your phone unlocked right away.
  • Or this is the first time and at the end of the progress it'll ask you to wait ~7days, and, well, there's no way around that, so come back in 7 days and start from Step 8 again.
And there you go! Your phone will reboot and you can set it all up again, with the ability to follow the rooting tutorial below, and you can also install custom ROMs/recovery!
Step 1
Download the latest Magisk Manager on your phone.
Go to the link above, click the latest MagiskManager-vX.X.X.apk you see in the list to start the download, open the file and install.

Step 2
Go to the download page for the MIUI Official Rom for your region, make sure to get the fastboot version.
OR (if you don't want/can't download 3gb of ROM)
Follow DavitidzeSh's instructions on how to gather the boot.img and vbmeta.img files and SKIP to Step 5.

Step 3
Take the file you downloaded above, it should be a .tgz archive.
Extract it, you'll get a .tar achive.
Extract that one again.

Step 4
You should now have a folder similar to the one below

d1H2K4g.jpg

Go inside the images folder

KQ7GB7S.jpg

Step 5
Grab the the vbmeta.img file and copy it to your ADB & Fastboot (Platform Tools) folder.
Grab the boot.img file and copy it to your phone's /sdcard/ folder.
(where the Android, DCIM, Download, and more are present, just drop it in there)

Here's how it should look inside your phone's storage in the end.

uiusbXG.jpg

Step 6
On your phone, open up Magisk Manager.
  • Click the Magisk Install button as shown below.
  • Then Select and Patch a File.
  • Go look for your boot.img you previously copied to your phone and pick it.
  • Click Let's go! and wait for Magisk to complete the process!

Z8o3ai9.jpg

Step 7
Link your phone to your PC, grab the file made by Magisk Manager.
It's located in your phone's downloads folder, called magisk_patched.img.
Copy and paste it where your ADB & Fastboot (Platform Tools) are located.

You should now have a folder structure like this:
  • adb.exe
  • fastboot.exe
  • magisk_patched.img
  • vbmeta.img
  • Extra files from the platform tools

epfTRVa.jpg

Step 8
Alright, we're ready to root!
Turn off your phone, then get in fastboot mode.
(Power + Volume Down, like the unlocking tutorial)

Step 9
Link your phone to your PC with the USB cable if not done already.

Step 10
Shift + Right click in an empty space inside the folder we prepared in Step 7,
And click Open PowerShell window here.

Inside the PowerShell window, input the following commands line by line, in order.



Make sure your device shows up, should be a bunch of numbers and letters, a couple spaces, and fastboot.
If nothing does, go back to Step 8 and try again.




Z5zUaGR.jpg

Note: Your PowerShell window will look different, I'm using a different program, don't worry

Your phone will reboot.
Open up Magisk Manager, and double check that it's installed.


0nEL6dO.jpg

You're done!
That said, you will have issues with certain apps leaving it like this.
You should to hide the fact that your phone is rooted.

Check out the Passing SafetyNet tutorial further down below!
I very much discourage to EdXposed your phone unless you have a very good reason for it.
It's a pain to pass SafetyNet.
It doesn't get updated often.
It has very niche use cases for which it's actually worth it.


That said, I explain it here for people who know what they're getting into and want instructions on how to do it.

This procedure requires to be rooted with Magisk.

Step 1
Inside Magisk Manager, go to the Modules tab.
Click the search button (bottom right) and search Riru.
Install the Riru module by Rikka.
Activate it and Reboot.

TllFEIp.jpg

smEPpXN.jpg

Step 2
Download and install the latest EdXposed Manager, the same way you did with Magisk Manager when rooting.

Step 3
Open it up, go to the ALPHA tab and click install/update.
It'll start a file download.

1GF2hIW.jpg

Step 4
Go back to Magisk Manager, Modules tab, except this time click Install from Storage.
Point to the .zip
file you just got, located in the Downloads folder of your phone.
At the end of the installation, click reboot.


Step 5
Let's double check your installation is operational.
Go to EdXposed Manager, first tab.
It should say EdXposed Framework is active.


JvuOjMg.jpg

You're done!
You should now be able to install EdXposed modules.
That said, you will have issues with certain apps leaving it like this.
You should to hide the fact that your phone is EdXposed.
Check out the Passing SafetyNet tutorial further down below!
For Magisk Rooted Phones
Enable Magisk Hide inside Magisk Manager's settings.

For EdXposed Phones
Again, I highly recommend not EdXposing your phone and sticking to just Magisk if you can help it.
You should also know that this method will show you're passing SafetyNet inside Magisk but it's a pain to do and isn't as well hidden as Magisk alone.
Step 1
- Do the step for Rooted phones listed above if not done already.
Step 2 - In EdXposed Manager, get the HiddenCore Module and activate it.
Step 3 - Now, in the side-menu: Compat List > tick HiddenCore Module.
Step 4 - Then, go to Settings > Framework > Enable "App List mode".
Step 5 - Finally, Applications(Black List) and tick: Android Services Library, Chrome, Google Play services, Google Play Store, Google Services Framework

Reboot and enjoy! You're all set and SafetyNet should pass.
Step 1
Pick your poison in the Treble Forums!
My recommendations are in the Extras section of this post.

Step 2
Download the chosen ROM's A/B Arm64 version
It should be an .img.xz file
Extract it and you'll get an .img file.

You're almost ready to flash.
Make sure to backup your phone's data.
Continuing this tutorial will wipe your phone!

Step 3

Put your phone into fastboot mode.
(Power + Volume Down)
Connect it to your PC.

Step 4
Move the .img file you downloaded to your ADB & Fastboot (Platform Tools) folder.
Rename it to system.img

Step 5
Shift + Right click in an empty space inside the folder,
And click Open PowerShell window here.

Inside the PowerShell window, input the following commands line by line, in order.



Your phone will now reboot on its own.
Set it all up and enjoy!
That said, depending on how old the GSI you picked is, you MAY have issues leaving it at that.
Therefore, I highly recommend checking out the next tutorial section about Fixing GSI Issues.
I have worked together with a developer to bring fixes for our device to every custom GSI rom out there.
The most recent GSI's shouldn't need the fixes listed below.


Older GSI (treble) roms have two known bugs that we can fix:
  • The brightness slider being misscalibrated, and therefore auto-brightness broken too.
  • The headphone jack not working.
You need to be rooted to do so.

Step 1 - Get yourself a Terminal Emulator, I recommend Termux
Step 2 - Type the following commands inside of it, line by line, in order:


You're done! Brightness should be fine, headphones get detected, enjoy!
Backup all the data you might have on your phone to restore it after the manipulation!

Step 1
Download the fastboot ROM corresponding to your region here.
(The same one used to grab the boot.img and vbmeta.img when rooting)
And extract it.

Step 2
Download the latest MiFlashTool.
(Uploaded on my Google drive, it's a little hard to find)
And extract it.

Step 3
Put your device in fastboot mode.
(Power + Vol Down, refer to the rooting tutorial for a more info)
And connect it to your computer via USB.

Step 4
Open MiFlashTool (XiaoMiFlash.exe), your device should appear in the list.

Step 5
Click the Select button in the top left,
And point to your fastboot ROM's folder
(The one containing the "AP", "BP", "BP_IN", "images" folders and a bunch of files)

Step 6
At the bottom right of the software, choose if you either want to just:
clean all
(wipe and re-install)
OR
clean all and lock

(wipe, reinstall and re-lock your bootloader)

Note: If you re-lock your bootloader but wish to unlock it again later, you won't have to wait the 7 days again.


Step 7
Finally, in the top right, click the flash button.

Now just wait a while, your phone will reboot on the stock rom and you're good to go!

Extras

All my recommendation's latest releases contain fixes for our device.

Ordered by personal preference:
Q: Will unlocking my bootloader void my warranty?
A: No, it will not, it's easily reversable too, check the "Resetting your phone" tutorial.

Q
: I rooted/EdXposed my phone and now Netflix won't even open, or doesn't work properly, what's up with that?
A: There's an easy fix if you have Magisk. Install the liboemcrypto disabler Magisk module, activate it and reboot.

Q
: I tried unlocking my bootloader but, Mi Flash Unlock doesn't detect my phone, even though it's in fastboot mode and connected. Help?
A: Here are some things you can try:
  • Try another USB port.
  • Try another USB cable.
  • Install the Mi USB Drivers manually, they're included in the MiFlashUnlock folder.
    Run the driver_install_64.exe, OR go to the driver folder, then the folder corresponding to your windows version, right click the android_winusb.inf and click Install.
  • In the Device Manager, check that the driver provider is Xiaomi.
    If not, uninstall it and restart your computer.

WmkBs0W.jpg
Hi, your method did not involve using twrp, but since it's the best method to get out of a bootloop without deleting all modules. So can you please tell how to get that working?
 

George528

Member
Apr 24, 2021
38
13
Redmi Note 9
Does it got something to do with enabling USB

Hi, your method did not involve using twrp, but since it's the best method to get out of a bootloop without deleting all modules. So can you please tell how to get that working?
i tried to flash lineageOS and messed up my phone again, i don't know what i did wrong, now i have to flash the stock rom and wait for another 7 days for the bootloader to unlock. Then i paniked when i saw my folders had weird names (it was ecrypted) and my dumb ass formated the data on my phone and my phone is literally empty. I cant restore the previous version because i cant transfer the backup from my pc to my phone.
Is it possible to flash custom rom in ther condition my phone is rn? or at least flash the stock rom and bypassing the 7 days lock?
 

anishkn04

Member
Oct 13, 2019
9
5
Hey!
I wanted to unlock the bootloader so downloaded the latest MI Unlock from official site, but can't find the "driver_install_64.exe"

This might be the reason the application couldn't find my device

How do i install the drivers?


EDIT: Used the XiaoMiTool V2 from other thread, all the drivers were installed, my pc found the device, but while unlocking bootloader, whenever the device entered fastboot mode, pc cannot find the device. Why?
 
Last edited:

Niquitincho

Member
May 31, 2021
13
3
Hello, I need help.
When I plug it in the device manager it says I haven´t the driver.
I downloaded MiFlash and nothing.
How can I fix it?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 15
    DISCLAIMERS (please read !)
    • This thread is made for the Redmi Note 9, also known as Redmi 10X 4G.
    • This device's codename is Merlin.
    • I will not be held responsible if you brick your device.
    • Follow the instructions shown in this thread at your own risks.
    • Follow the steps and ask questions below when unsure, everything will be fine!
    • No files will be directly provided. Do not use pre-created/re-uploaded files.
    • Feel free to cite parts of this thread in your own, just make sure to give credit where it's due.

    Prerequisites for most manipulations
    • Your phone, well charged if possible
    • The USB cable used to link your phone to your computer (the one on your charger works just fine)
    • A computer, with recent ADB & Fastboot (Platform Tools)
    • Some time, patience, and the ability to read and follow instructions!

    Tutorials

    Step 1
    Make sure you have a Mi Account ready.
    You should've created one when first setting up your phone, with your phone number and a password.

    - If you have it: Double-check you have access to it by attempting to connect on Xiaomi's official website (Login page).
    - If you don't: Create one with the Create an account button below the password form (same link as above), then connect to it.

    Step 2
    On your PC, go to Xiaomi's unlock page and click the colored Download Mi Unlock button.

    j8fgLYw.jpg

    Step 3
    A download should start. Wait for it to finish, move the archive to your desktop and extract its content.

    fOlOpW1.jpg

    Step 4
    Inside the extracted folder, double click the file called miflash_unlock.exe to start Xiaomi's Unlocking program.

    NqDFN3F.jpg

    Step 5
    Read Xiaomi's Disclaimer then agree to their terms, or stop here and leave this thread if you don't.

    7LDJov0.jpg

    Step 6
    Sign in to your Mi Account we talked about in Step 1.

    Zx6fr6T.jpg

    Step 7
    Let's get your phone ready for unlocking.
    • Go to your phone's Settings > Mi Account and make sure you're logged in.
    • Now Settings > About Phone and tap the "MIUI Version" box multiple times until it says You are now a developer!
    • And finally Settings > Additional Settings > Developer Options

    Enable the following settings inside Developer Options, and click Accept when warnings pop-up:
    • OEM Unlocking
    • USB Debugging
    Still in Developer Options, check your Mi Unlock status and click the Add account and device button at the bottom if present.
    Make sure to backup your phone's data before continuing on with this tutorial, as unlocking will make it factory reset (wipe)!

    Step 8
    Alright, all backed up? Confident? Let's get going with the final steps.
    • Turn off your phone.
    • Turn it back on into fastboot mode by holding down the Power button AND Volume Down together until it vibrates, you may then let go of the Power Button, but keep Volume Down held until you see the fastboot image on your phone.
    82hjtTV.jpg
    • Connect your phone to your computer with the USB Cable.
    • Xiaomi's Software should detect it. If not, click on the cog-wheel in the top right, click the Check button to install the driver and follow instructions, then keep going.
    • Click Unlock, and follow the instructions!
    Now there are two possible scenarios
    • Either you've done all this before and can have your phone unlocked right away.
    • Or this is the first time and at the end of the progress it'll ask you to wait ~7days, and, well, there's no way around that, so come back in 7 days and start from Step 8 again.
    And there you go! Your phone will reboot and you can set it all up again, with the ability to follow the rooting tutorial below, and you can also install custom ROMs/recovery!
    Step 1
    Download the latest Magisk .apk on your phone.
    Go to the link above, click the latest (topmost) Magisk-vXX.X.apk you see in the list to start the download, open the file and install it.

    Step 2
    Go to the download page for the MIUI Official Rom for your region, make sure to get the fastboot version.
    OR (if you don't want/can't download 3gb of ROM)
    Follow DavitidzeSh's instructions on how to gather the boot.img and vbmeta.img files and SKIP to Step 5.
    OR (if you're on a custom rom)
    Look into your custom rom's .zip, find the boot.img and vbmeta.img files and SKIP to Step 5.

    Step 3
    Take the file you downloaded above, it should be a .tgz archive.
    Extract it, you'll get a .tar achive.
    Extract that one again.

    Step 4
    You should now have a folder similar to the one below

    d1H2K4g.jpg

    Go inside the images folder

    KQ7GB7S.jpg

    Step 5
    Grab the the vbmeta.img file and copy it to your ADB & Fastboot (Platform Tools) folder.
    Grab the boot.img file and copy it to your phone's internal storage.
    (where the Android, DCIM, Download, and more are present, just drop it in there)

    Here's how it should look inside your phone's storage in the end.

    uiusbXG.jpg

    Step 6
    On your phone, open up Magisk Manager.
    • Click the Magisk Install button as shown below.
    • Then Select and Patch a File.
    • Go look for your boot.img you previously copied to your phone and pick it.
    • Click Let's go! and wait for Magisk to complete the process!

    Z8o3ai9.jpg

    Step 7
    Link your phone to your PC, grab the file made by Magisk Manager.
    It's located in your phone's downloads folder, called magisk_patched.img.
    Copy and paste it where your ADB & Fastboot (Platform Tools) are located.

    You should now have a folder structure like this:
    • adb.exe
    • fastboot.exe
    • magisk_patched.img
    • vbmeta.img
    • Extra files from the platform tools

    epfTRVa.jpg

    Step 8
    Alright, we're ready to root!
    Turn off your phone, then get in fastboot mode.
    (Power + Volume Down, like the unlocking tutorial)

    Step 9
    Link your phone to your PC with the USB cable if not done already.

    Step 10
    Shift + Right click in an empty space inside the folder we prepared in Step 7,
    And click Open PowerShell window here.

    Inside the PowerShell window, input the following commands line by line, in order.

    .\fastboot.exe devices

    Make sure your device shows up, should be a bunch of numbers and letters, a couple spaces, and fastboot.
    If nothing does, go back to Step 8 and try again.


    .\fastboot.exe --disable-verity --disable-verification flash vbmeta vbmeta.img
    .\fastboot.exe flash boot .\magisk_patched.img
    .\fastboot.exe reboot

    Z5zUaGR.jpg

    Note: Your PowerShell window will look different, I'm using a different program, don't worry

    Your phone will reboot.
    Open up Magisk Manager, and double check that it's installed.


    0nEL6dO.jpg

    You're done!
    That said, you will have issues with certain apps leaving it like this.
    You should to hide the fact that your phone is rooted.

    Check out the Passing SafetyNet tutorial further down below!
    I very much discourage to EdXposed your phone unless you have a very good reason for it.
    It's a pain to pass SafetyNet.
    It doesn't get updated often.
    It has very niche use cases for which it's actually worth it.


    That said, I explain it here for people who know what they're getting into and want instructions on how to do it.

    This procedure requires to be rooted with Magisk.

    Step 1
    Inside Magisk Manager, go to the Modules tab.
    Click the search button (bottom right) and search Riru.
    Install the Riru module by Rikka.
    Activate it and Reboot.

    TllFEIp.jpg

    smEPpXN.jpg

    Step 2
    Download and install the latest EdXposed Manager, the same way you did with Magisk Manager when rooting.

    Step 3
    Open it up, go to the ALPHA tab and click install/update.
    It'll start a file download.

    1GF2hIW.jpg

    Step 4
    Go back to Magisk Manager, Modules tab, except this time click Install from Storage.
    Point to the .zip
    file you just got, located in the Downloads folder of your phone.
    At the end of the installation, click reboot.


    Step 5
    Let's double check your installation is operational.
    Go to EdXposed Manager, first tab.
    It should say EdXposed Framework is active.


    JvuOjMg.jpg

    You're done!
    You should now be able to install EdXposed modules.
    That said, you will have issues with certain apps leaving it like this.
    You should to hide the fact that your phone is EdXposed.
    Check out the Passing SafetyNet tutorial further down below!
    For Magisk Rooted Phones
    Enable Magisk Hide inside Magisk Manager's settings.
    You may also need to use the Props module to spoof your phone as another, if you want a tutorial on that, let me know.

    For EdXposed Phones
    Again, I highly recommend not EdXposing your phone and sticking to just Magisk if you can help it.
    You should also know that this method will show you're passing SafetyNet inside Magisk but it's a pain to do and isn't as well hidden as Magisk alone.
    Step 1
    - Do the step for Rooted phones listed above if not done already.
    Step 2 - In EdXposed Manager, get the HiddenCore Module and activate it.
    Step 3 - Now, in the side-menu: Compat List > tick HiddenCore Module.
    Step 4 - Then, go to Settings > Framework > Enable "App List mode".
    Step 5 - Finally, Applications(Black List) and tick: Android Services Library, Chrome, Google Play services, Google Play Store, Google Services Framework

    Reboot and enjoy! You're all set and SafetyNet should pass.
    Step 1
    Pick your poison in the Treble Forums!
    My recommendations are in the Extras section of this post.

    Step 2
    Download the chosen ROM's A/B Arm64 version
    It should be an .img.xz file
    Extract it and you'll get an .img file.

    You're almost ready to flash.
    Make sure to backup your phone's data.
    Continuing this tutorial will wipe your phone!

    Step 3

    Put your phone into fastboot mode.
    (Power + Volume Down)
    Connect it to your PC.

    Step 4
    Move the .img file you downloaded to your ADB & Fastboot (Platform Tools) folder.
    Rename it to system.img

    Step 5
    Shift + Right click in an empty space inside the folder,
    And click Open PowerShell window here.

    Inside the PowerShell window, input the following commands line by line, in order.

    .\fastboot.exe reboot fastboot
    .\fastboot.exe --disable-verification flash vbmeta .\vbmeta.img
    .\fastboot.exe flash system .\system.img
    .\fastboot.exe -w
    .\fastboot.exe reboot

    Your phone will now reboot on its own.
    Set it all up and enjoy!
    That said, depending on how old the GSI you picked is, you MAY have issues leaving it at that.
    Therefore, I highly recommend checking out the next tutorial section about Fixing GSI Issues.
    I have worked together with a developer to bring fixes for our device to every custom GSI rom out there.
    The most recent GSI's shouldn't need the fixes listed below.


    Older GSI (treble) roms have two known bugs that we can fix:
    • The brightness slider being misscalibrated, and therefore auto-brightness broken too.
    • The headphone jack not working.
    You need to be rooted to do so.

    Step 1 - Get yourself a Terminal Emulator, I recommend Termux
    Step 2 - Type the following commands inside of it, line by line, in order:
    su
    setprop persist.sys.qcom-brightness $(cat /sys/class/leds/lcd-backlight/max_brightness)
    setprop persist.sys.overlay.devinputjack true

    You're done! Brightness should be fine, headphones get detected, enjoy!
    Backup all the data you might have on your phone to restore it after the manipulation!

    Step 1
    Download the fastboot ROM corresponding to your region here.
    (The same one used to grab the boot.img and vbmeta.img when rooting)
    And extract it.

    Step 2
    Download the latest MiFlashTool.
    And extract it.

    Step 3
    Put your device in fastboot mode.
    (Power + Vol Down, refer to the rooting tutorial for a more info)
    And connect it to your computer via USB.

    Step 4
    Open MiFlashTool (XiaoMiFlash.exe), your device should appear in the list.

    Step 5
    Click the Select button in the top left,
    And point to your fastboot ROM's folder
    (The one containing the "AP", "BP", "BP_IN", "images" folders and a bunch of files)

    Step 6
    At the bottom right of the software, choose if you either want to just:
    clean all
    (wipe and re-install)
    OR
    clean all and lock

    (wipe, reinstall and re-lock your bootloader)

    Note: If you re-lock your bootloader but wish to unlock it again later, you won't have to wait the 7 days again.


    Step 7
    Finally, in the top right, click the flash button.

    Now just wait a while, your phone will reboot on the stock rom and you're good to go!

    Extras

    Q: Will unlocking my bootloader void my warranty?
    A: No, it will not, it's easily reversable too, check the "Resetting your phone" tutorial.

    Q
    : I rooted/EdXposed my phone and now Netflix won't even open, or doesn't work properly, what's up with that?
    A: There's an easy fix if you have Magisk. Install the liboemcrypto disabler Magisk module, activate it and reboot.

    Q
    : I tried unlocking my bootloader but, Mi Flash Unlock doesn't detect my phone, even though it's in fastboot mode and connected. Help?
    A: Here are some things you can try:
    • Try another USB port.
    • Try another USB cable.
    • Install the Mi USB Drivers manually, they're included in the MiFlashUnlock folder.
      Run the driver_install_64.exe, OR go to the driver folder, then the folder corresponding to your windows version, right click the android_winusb.inf and click Install.
    • In the Device Manager, check that the driver provider is Xiaomi.
      If not, uninstall it and restart your computer.

    WmkBs0W.jpg
    4
    If you want to say "join in fastbootd", you just have to say "join in fastbootd".
    And don't say "just type reboot and it will works".

    System partition is not present in stock rom firmware. If it is present in GSI, just say "it is only for GSI".
    If you dont like misinforming, just write enough informations. That's simple.
    Just reboot to fastbootd doesn't makes no changes.
    What matter is what you do inside it.
    We humans can understand if you try to explain it.

    The goal is to have a step by step, easy to follow guide.
    Using fastboot reboot fastboot will bring you into fastbootd which you need to flash system.
    Writing that up in the guide will just confuse people further, all people want to know is how to do things properly.
    In any case I'll be adding it to the faq part later I suppose, for people who are confused by that command.

    PS: I've re-formatted the original post to improve readability. Let me know what you think!
    2
    Thanks Akitake for the guide, we all appreciate the effort that went into this!

    I have successfully installed CAOS, and wanted to ask if anyone else was having any bugs similar to mine.
    I am unable to lock phone into landscape mode, and signal always shows an X as though I have no signal, but it works normally.

    Aside from these 2 minor bugs, COAS is working great (y)
    2
    what are the possible ways that you can brik your phone? im just asking so i know what to avoid
    writing wrong commands or downloading wrong firmware
    just follow the guide