[FAQ][GUIDE][HELP] Assistance Solution Centre for MERLIN 🤓 (Redmi Note 9 / Redmi 10X 4G)

Search This thread

VD171

Senior Member
Jun 21, 2012
1,112
1
257
127.0.0.1
LG K10
Samsung Galaxy J7
DISCLAIMERS:
  • This help is specific for MERLIN devices only !
    (Xiaomi Redmi Note 9 and Xiaomi Redmi 10X 4G)
  • Keep atention. This is an UNOFFICIAL thread.
  • This thread was based on the thread by Agent_fabulous. Thank you very much !
  • DON'T ask by PM. If you have any question, reply to this thread.
  • Keep in mind, nothing is 100% perfect, so you need to read careful
    and keep trying before to ask an already answered question.
  • Keep your backup files safe and secure ! If you can, encrypt them.
  • If you try to flash in "firmware upgrade" mode, bootloader will be LOCKED again !
  • Never try to flash in "format all" mode ! Otherwise, you will LOSE all secure and identifying infos for your device. Like IMEI and MAC.
  • Never try to share your backups or your security and privacy will be compromised.
  • USE AT YOUR OWN RISK. I AM NOT RESPONSIBLE FOR YOUR ACTIONS.
  • Sorry for my bad english.


GOOD LUCK
😍🤩🥳😎
 
Last edited:

VD171

Senior Member
Jun 21, 2012
1,112
1
257
127.0.0.1
LG K10
Samsung Galaxy J7
1. Where can I find official and untouched STOCK FIRMWARES ROMS?
Here, you can find latest releases: https://xiaomifirmwareupdater.com/miui/merlin/
Here, you can find archive of releases: https://xiaomifirmwareupdater.com/archive/miui/merlin/

2. Where can I find some useful tools?
Mi PC Suite: http://pcsuite.mi.com/

3. There are useful tools for LINUX or Mac OS?
Xiaomitool (Linux & MacOS): https://www.xiaomitool.com/V2/
Sp Flash Tool (Linux): https://spflashtools.com/category/linux

4. My pc can't detect my phone. What to do?
Probably, you need to install appropriate usb drivers.​

5. Where can I find custom ROMs?

6. How can I root?
First and obviously, you need to unlock your bootloader. Once you unlock your bootloader, you can root your device flashing magisk patched boot.img.​
KEEP ATENTION: you need to disable verification for vbmeta too.​
Here, you can find patched vbmeta with disabled verification: https://forum.xda-developers.com/t/...omi-redmi-note-9-xiaomi-redmi-10x-4g.4218909/

7. Where can I find TWRP & PBRP?
There is only ONE recovery project with open source for MERLIN.​
But, there are other twrp and pbrp with closed source.​
If you use it, you can cause damages to your device, use at your own risk and DON'T ask about it.​
KEEP ATENTION: you need to IGNORE misc partition, if you flash the misc partition, your phone can be stucked in boot loop.​
KEEP ATENTION: you need to disable verification for vbmeta too.​
Here, you can find patched vbmeta with disabled verification: https://forum.xda-developers.com/t/...omi-redmi-note-9-xiaomi-redmi-10x-4g.4218909/

8. How can I restore the state of UNLOCKED BOOTLOADER?
You need to restore your backup of SECCFG partition.​

9. How to make TWRP V11.0.4.0 work on MIUI V12.0.5.0 or higher?
If you are using MIUI V12.0.5.0 or higher, TWRP V11.0.4.0 will not work.​
You will need to flash an older LK partition.​

10. How can I disable TWRP?
You will need to flash original stock recovery.img.​

11. How to flash using SP FLASH TOOL without EDL and authentication?
If you want to use flash tool on MIUI V12.0.5.0 or higher, it will requires EDL and authentication.​

12. I am on MIUI V12.0.5.0 or higher, how can I flash using SP FLASH TOOL without EDL and authentication?
You will need to flash an older PRELOADER binary.​

13. I am on MIUI V12.0.4.0 or lower, how can I flash using SP FLASH TOOL without EDL and authentication?
You will need the specific DA (download-agent) file for it without authentication (#NoAuth #NoAuthentication #No-Auth #No-Authentication).​

14. How can I downgrade MIUI version?
For downgrading your miui, you need unlocked bootloader.​
After unlocked bootloader, you can flash older firmware rom using fastboot or sp flash tool.​

15. My phone is booting to a black screen after flashed misc partition together twrp. What to do?
If your phone is booting to a black screen, you need to erase MISC partition.​

16. My phone got bootlop after installed a Magisk module or Xposed module. How can I disable it?
You will need to uninstall the module. You have two methods for this.​
For first method, you can disable Magisk (read question 17).​
For second method, you need to boot in emergency mode (rescue mode).​
For booting in emergency mode, you need to press Vol+ (volume up) after boot starts. (YES, I mean AFTER you see boot logo.)​
And then, you can uninstall the module.​

17. My phone got bootlop after flashed Magisk. How can I disable it?
You will need to flash original stock boot.img.​

18. My phone got bootloop, I am on MIUI V12.0.4.0 or lower and I can't enter in fastboot mode or recovery mode. What to do?
You need to flash stock rom using sp flash tool.​
Please, read question 13.​

19. My phone got bootloop, I am on MIUI V12.0.5.0 or higher and I can't enter in fastboot mode or recovery mode. What to do?
For this, you will need to bypass authentication and flash in EDL mode with NO auth for FREE.​
Here, you can find the guide for bypassing EDL authenticated mode for FREE: https://forum.xda-developers.com/t/...d-flash-in-edl-with-no-auth-for-free.4229683/
For this, you will need an authorized account for flashing in EDL mode.
You need to go the service centre for professional assistance.

20. There is any other way for flashing or unbricking?
Yes. You can try any useful tool (read question 2 and 3).​
But, this help is not for how use them.​
You can find a huge amount of videos in youtube about it.​

21. I want to keep with original stock boot.img together TWRP, but TWRP is removed at every reboot. What to do?
You will need to flash patched boot image without overwrite of recovery.​
KEEP ATENTION: you need to disable verification for vbmeta too.​
Here, you can find patched vbmeta with disabled verification: https://forum.xda-developers.com/t/...omi-redmi-note-9-xiaomi-redmi-10x-4g.4218909/

22. Where can I find scatter files to flash using flash tool?

23. Where can I find readback file to backup using flash tool?

24. How can I know what is working on my phone before installing?
If you want to know what is working for MERLIN, read this: https://forum.xda-developers.com/t/...omi-redmi-note-9-xiaomi-redmi-10x-4g.4204873/

25. How can I disable preinstalled apps without uninstalling them?
You need to perform this in command line:​
pm disable-user --user 0 com.android.chrome
(Change com.android.chrome to desired package name to disable.)​

26. Where can I find source code of the kernel?
Here, you can find the OFFICIAL source code of the kernel: https://github.com/MiCode/Xiaomi_Kernel_OpenSource/tree/lancelot-q-oss
Here, you can find the OFFICIAL source code of the kernel modules: https://github.com/MiCode/MTK_kernel_modules/tree/lancelot-q-oss

27. Where can I find device tree and other sources codes of MT6768?

28. How to pass SafetyNet?
You will need to have Xposed installed. After it, everything you need to do is install HiddenCore-Module, active it on Xposed Manager and reboot.​
Here, you can find the HiddenCore-Module: https://repo.xposed.info/module/com.cofface.ivader
KEEP ATENTION: it is making android to keep on activity forever and never suspends screen.​

29. How to disable ads (advertising)?
You will need to have Xposed installed. After it, everything you need to do is install AdBlocker-Reborn, active it on Xposed Manager and reboot.​
Here, you can find the AdBlocker-Reborn: https://repo.xposed.info/module/com.aviraxp.adblocker.continued
KEEP ATENTION: some people said it can get troubles to google apps.​

30. How to restore IMEI, Baseband, MAC, fix NVRAM WARNING and fix NVDATA CORRUPTED?
KEEP ATENTION: never try to restore partitions from a different device, or you can brick and cause damages to your device.​

31. How to disable ads (advertising) without xposed?
For unrooted devices, you need to perform this in command line:​
pm disable-user --user 0 com.miui.msa.global
For rooted devices, you need to debloat your system and then remove the "MSA" app.​

32. What should I backup before trying to customize my device?
Here, you can find the list of what partitions you need to backup for avoiding mistakes without risking all of your device's identification details, like IMEI, WiFi MAC, Bluetooth MAC, calibration data, NVDATA, NVRAM, RADIO/MODEM/BASEBAND and others: https://forum.xda-developers.com/t/...lin-device-redmi-note-9-redmi-10x-4g.4229629/

33. How to bypass authentication and flash in EDL with NO auth for FREE?
Here, you can find the guide for bypassing EDL authenticated mode for FREE: https://forum.xda-developers.com/t/...d-flash-in-edl-with-no-auth-for-free.4229683/

34. How to install XPOSED?
1. You need to unlock your bootloader.​
2. You need to root using Magisk.​
3. You need to install magisk manager.​
4. You need to install the magisk module: RIRU. (Only Riru in the name).​
5. You need to choose between EDXPOSED or LSPOSED and then install the magisk module: "Riru Edxposed" or "Riru Lsposed".​
6. You need to install the properly manager: "Edxposed Manager" or "Lsposed Manager".​
7. Reboot.​
Done. Enjoy !​

35. How to remove and clear GOOGLE ACC and Mi ACC / MiCloud?
Here, you can find the guide for removing google account and xiaomi account: https://forum.xda-developers.com/t/...for-merlin-redmi-note-9-redmi-10x-4g.4233977/

36. How can I flash a CUSTOM ROM?
Here, you can find the guide for flashing custom roms by c.whoopee: https://forum.xda-developers.com/t/...rom-on-a-redmi-note-9-global-variant.4234151/
(Thanks to c.whoopee)​
Here, you can find the guide for installing a Lineage 17.1 ROM by ma259: https://forum.xda-developers.com/t/...eage-17-1-rom-in-redmi-note-9-merlin.4235003/
(Thanks to ma259)​

37. How to properly use the SP Flash Tool?
Here, you can find the guide how to configure correctly the SPFlashTool: https://forum.xda-developers.com/t/...for-merlin-redmi-note-9-redmi-10x-4g.4229937/
Here, you can find common errors of the SPFlashTool: https://forum.xda-developers.com/t/...for-merlin-redmi-note-9-redmi-10x-4g.4238161/

38. How to solve "LIB DA not match" error?
Please, follow the guide "How to properly solve the errors of the SP FLASH TOOL": https://forum.xda-developers.com/t/...for-merlin-redmi-note-9-redmi-10x-4g.4238161/

39. How to solve "PMT changed for the ROM" error?
Please, follow the guide "How to properly solve the errors of the SP FLASH TOOL": https://forum.xda-developers.com/t/...for-merlin-redmi-note-9-redmi-10x-4g.4238161/

40. How to solve "STATUS_BROM_CMD_STARTCMD_FAIL" error?
Please, follow the guide "How to properly solve the errors of the SP FLASH TOOL": https://forum.xda-developers.com/t/...for-merlin-redmi-note-9-redmi-10x-4g.4238161/

41. How to solve "STATUS_SEC_AUTH_FILE_NEEDED" error?
Please, follow the guide "How to properly solve the errors of the SP FLASH TOOL": https://forum.xda-developers.com/t/...for-merlin-redmi-note-9-redmi-10x-4g.4238161/

42. How to solve "STATUS_BROM_CMD_FAIL" error?
Please, follow the guide "How to properly solve the errors of the SP FLASH TOOL": https://forum.xda-developers.com/t/...for-merlin-redmi-note-9-redmi-10x-4g.4238161/

43. How to solve "STATUS_BROM_CMD_SEND_DA_FAIL" error?
Please, follow the guide "How to properly solve the errors of the SP FLASH TOOL": https://forum.xda-developers.com/t/...for-merlin-redmi-note-9-redmi-10x-4g.4238161/
44. Where can I find official ENGINEERING ROMs?

45. Where can I find extracted FIRMWARES?
Here, you can find the thread of the EXTRACTED FIRMWARE by yshalsager: https://forum.xda-developers.com/t/...-4g-redmi-note-9-merlin-auto-updated.4250261/
Here, you can find latest releases: https://xiaomifirmwareupdater.com/firmware/merlin/
Here, you can find archive of releases: https://xiaomifirmwareupdater.com/archive/firmware/merlin/

46. Where can I find extracted VENDORS?
Here, you can find latest releases: https://xiaomifirmwareupdater.com/vendor/merlin/
Here, you can find archive of releases: https://xiaomifirmwareupdater.com/archive/vendor/merlin/

47. How can I mount system RW (read-write) ?
Here, you can find the guide and the script by lebigmac for mounting system as read-write (RW): https://forum.xda-developers.com/t/...unt-system-read-write-super-no_super.4247311/

48. How to write and recover the IMEI for SLOT 1 and SLOT 2?
Here, we are discussing about the possibilities of how to recover the IMEI for SLOT1 and SLOT2: https://forum.xda-developers.com/t/...-in-merlin-redmi-note-9-redmi-10x-4g.4258779/
Here, you can find md1img images of the baseband/modem/radio: https://forum.xda-developers.com/t/...for-merlin-redmi-note-9-redmi-10x-4g.4258919/
 
Last edited:
  • Like
Reactions: Well Done Sheldon

VD171

Senior Member
Jun 21, 2012
1,112
1
257
127.0.0.1
LG K10
Samsung Galaxy J7
Full List of My Own Threads:

[V12.0.7.0] New Update: Download Files for Merlin V12.0.7.0.QJOMIXM
https://forum.xda-developers.com/t/...-0-qjomixm-redmi-note-9-redmi-10x-4g.4245351/

[BOOT][PATCHED] Boot Image Partition without OVERWRITE OF RECOVERY for MERLIN
https://forum.xda-developers.com/t/...omi-redmi-note-9-xiaomi-redmi-10x-4g.4209263/

[DA][FLASH] DA files for flashing to MERLIN using FLASH TOOL
https://forum.xda-developers.com/t/...omi-redmi-note-9-xiaomi-redmi-10x-4g.4209765/

[V1][ENGINEERING][ROM] OFFICIAL Egineering Firmware for MERLIN
https://forum.xda-developers.com/t/...for-merlin-redmi-note-9-redmi-10x-4g.4227933/

[V2][ENGINEERING][ROM] OFFICIAL Egineering Firmware for MERLIN
https://forum.xda-developers.com/t/...for-merlin-redmi-note-9-redmi-10x-4g.4246891/

[FAQ][GUIDE][HELP] Assistance Solution Centre for MERLIN 🤓
https://forum.xda-developers.com/t/...for-merlin-redmi-note-9-redmi-10x-4g.4225163/

[GUIDE] How to bypass authentication and flash in EDL with NO auth for FREE
https://forum.xda-developers.com/t/...d-flash-in-edl-with-no-auth-for-free.4229683/

[GUIDE]How to properly solve the errors of the SP FLASH TOOL for MERLIN
https://forum.xda-developers.com/t/...for-merlin-redmi-note-9-redmi-10x-4g.4238161/

[GUIDE] How to properly use the SP FLASH TOOL for MERLIN ?
https://forum.xda-developers.com/t/...for-merlin-redmi-note-9-redmi-10x-4g.4229937/

[GUIDE] How to remove and clear GOOGLE ACC and Mi ACC / MiCloud for MERLIN
https://forum.xda-developers.com/t/...for-merlin-redmi-note-9-redmi-10x-4g.4233977/

[GUIDE] How to restore IMEI, Baseband, MAC, fix NVRAM WARNING and fix NVDATA CORRUPTED on MERLIN ?
https://forum.xda-developers.com/t/...-on-merlin-redmi-note-9-redmi-10x-4g.4230423/

[GUIDE] What should I backup before trying to customize my MERLIN device ?
https://forum.xda-developers.com/t/...lin-device-redmi-note-9-redmi-10x-4g.4229629/

[GUIDE][FLASH] How to keep flashing without AUTH or EDL on V12.0.5.0 or higher MIUI versions in MERLIN ?
https://forum.xda-developers.com/t/...omi-redmi-note-9-xiaomi-redmi-10x-4g.4223089/

[GUIDE][TWRP] How to keep TWRP V11.0.4.0 working on MIUI V12.0.5.0 or higher MIUI versions in MERLIN ?
https://forum.xda-developers.com/t/...omi-redmi-note-9-xiaomi-redmi-10x-4g.4223077/

[DISCUSSION] How to write and recover the IMEI for SLOT 1 and SLOT 2 in MERLIN ?
https://forum.xda-developers.com/t/...-in-merlin-redmi-note-9-redmi-10x-4g.4258779/

[GUIDE][UNBRICK] How unbrick your bootloop in MERLIN after flashing TWRP
https://forum.xda-developers.com/t/...omi-redmi-note-9-xiaomi-redmi-10x-4g.4209299/

[GUIDE][UNLOCK] How to restore the state of UNLOCKED BOOTLOADER in MERLIN
https://forum.xda-developers.com/t/...omi-redmi-note-9-xiaomi-redmi-10x-4g.4220013/

[LK][STOCK] LK Image Partition for MERLIN
https://forum.xda-developers.com/t/...omi-redmi-note-9-xiaomi-redmi-10x-4g.4218925/

[BASEBAND][STOCK][MD1IMG] MODEM Image Partition for MERLIN
https://forum.xda-developers.com/t/...for-merlin-redmi-note-9-redmi-10x-4g.4258919/

[MAGISK][XPOSED] What is working for Magisk and Xposed in MERLIN ?
https://forum.xda-developers.com/t/...omi-redmi-note-9-xiaomi-redmi-10x-4g.4204873/

[PRELOADER][STOCK] PRELOADER Partition Binary for MERLIN
https://forum.xda-developers.com/t/...omi-redmi-note-9-xiaomi-redmi-10x-4g.4218929/

[READBACK][FLASH] Read Back file for backuping using flash tool from MERLIN
https://forum.xda-developers.com/t/...omi-redmi-note-9-xiaomi-redmi-10x-4g.4223109/

[SCATTER][FLASH] Scatter file for flashing using flash tool to MERLIN
https://forum.xda-developers.com/t/...omi-redmi-note-9-xiaomi-redmi-10x-4g.4223097/

[STOCK][PATCHED] Boot, Vbmeta and Recovery: Images Partitions for MERLIN
https://forum.xda-developers.com/t/...omi-redmi-note-9-xiaomi-redmi-10x-4g.4204671/

[TWRP][PBRP] Collection of TWRP & PBRP for MERLIN
https://forum.xda-developers.com/t/...for-merlin-redmi-note-9-redmi-10x-4g.4227751/

[VBMETA][PATCHED] VBMETA Image Partition: Disabled verity & Disabled verification for MERLIN
https://forum.xda-developers.com/t/...omi-redmi-note-9-xiaomi-redmi-10x-4g.4218909/
 
Last edited:

VD171

Senior Member
Jun 21, 2012
1,112
1
257
127.0.0.1
LG K10
Samsung Galaxy J7
Feb 27, 2021
12
2
Uhm... hello, newbie here and hopefully in the right thread.

I have a Redmi Note 9 and wanted to install LineageOS. What I have done so far:
  1. Jumped through all the hoops to unlock the bootloader.
  2. Since that erases all user data, I did not bother setting a password in the setup. Just went through it as quickly as possible.
  3. Installed TWRP 12.0.6
  4. Used that to install lineage-17.1-20210209-UNOFFICIAL-merlin.zip from here.
Result: The new system does not boot. I always end up in TWRP again. Even if I specifically go to Reboot -> System, it'll boot into recovery. I think the first boot fails and then it goes into recovery (if I power the device off and on again, it vibrates, the logo comes on, the screen goes black, it vibrates again, the logo shows again, and then I'm in TWRP).

What I have tried unsuccessfully:
  • Flashing the vbmeta from here.
  • Erasing the misc partition.
  • Flashing the old lk from here.
  • Closing the AVB2.0 after flash (with and without closing DM verity).
  • Wiping cache, dalvik, data, internal storage, and cache before reinstalling LOS.
  • Replacing TWRP with PBRP and trying again.
  • Probably some other things I don't remember. I've been chasing red herrings through this rabbit hole all day.

I also tried to install the ArrowOS build (from here), just to have one more datapoint. After that, the device boot-loops into the bootloader, and I have to manually go into recovery via VolUp+Power. This leads me to believe that it's not the LOS build at fault. It seems more likely that I am a moron and am doing something wrong. I just can't figure out what it is.

Any help would be appreciated.
 

Communos

Senior Member
Oct 28, 2019
221
102
Paris
Xiaomi Redmi 5
Google Pixel 3 XL
Uhm... hello, newbie here and hopefully in the right thread.

I have a Redmi Note 9 and wanted to install LineageOS. What I have done so far:
  1. Jumped through all the hoops to unlock the bootloader.
  2. Since that erases all user data, I did not bother setting a password in the setup. Just went through it as quickly as possible.
  3. Installed TWRP 12.0.6
  4. Used that to install lineage-17.1-20210209-UNOFFICIAL-merlin.zip from here.
Result: The new system does not boot. I always end up in TWRP again. Even if I specifically go to Reboot -> System, it'll boot into recovery. I think the first boot fails and then it goes into recovery (if I power the device off and on again, it vibrates, the logo comes on, the screen goes black, it vibrates again, the logo shows again, and then I'm in TWRP).

What I have tried unsuccessfully:
  • Flashing the vbmeta from here.
  • Erasing the misc partition.
  • Flashing the old lk from here.
  • Closing the AVB2.0 after flash (with and without closing DM verity).
  • Wiping cache, dalvik, data, internal storage, and cache before reinstalling LOS.
  • Replacing TWRP with PBRP and trying again.
  • Probably some other things I don't remember. I've been chasing red herrings through this rabbit hole all day.

I also tried to install the ArrowOS build (from here), just to have one more datapoint. After that, the device boot-loops into the bootloader, and I have to manually go into recovery via VolUp+Power. This leads me to believe that it's not the LOS build at fault. It seems more likely that I am a moron and am doing something wrong. I just can't figure out what it is.

Any help would be appreciated.
Hey, Custom roms for Redmi Note 9 need MIUI 12.0.1 Indonesia, or MIUI 12.0.3 global vendor.
Downgrade your phone to the specific MIUI vendor, and then try flashing custom rom.

Here's the link for global 12.0.3

And before you downgrade your miui version, please erase system and vendor to bypass anti roll back.
Use these commands after connecting device in fastboot mode:

fastboot reboot fastboot
fastboot erase system
fastboot erase vendor
fastboot reboot bootloader

Then flash the 12.0.3 global/12.0.1 Indonesia miui version through MiFlash.
Or
You could give flashing 12.0.1 Indonesia vendor in TWRP, and then flashing rom.


If after fastboot reboot fastboot it shows waiting for device, install this driver. https://drive.google.com/file/d/1JFYCZ3mu_Y_xpnS7QrmtwqOeFnWg6DO2/view?usp=sharing
Please note that you need to be on stock recovery for fastboot reboot fastboot to work.

Happy flashing :)
 
Feb 27, 2021
12
2
Thank you very much! With that info, I think I finally have it working!

I case it's helpful for future users, here are some issues I encountered along the way:

fastboot reboot fastboot
fastboot erase system
fastboot erase vendor

Code:
$ fastboot reboot fastboot
fastboot: usage: unknown reboot target fastboot
$ fastboot erase system
erasing 'system'...
FAILED (remote: Partition table doesn't exist)
finished. total time: 0.013s
$ fastboot erase vendor
erasing 'vendor'...
FAILED (remote: Partition table doesn't exist)
finished. total time: 0.012s

Is that normal? I do have a partition named 'super' that I can see in the TWRP backup module. Judging from its size, that could be the system partition. I think there's also a vbmeta_system and vbmeta_vendor, did you mean those?

Then flash the 12.0.3 global/12.0.1 Indonesia miui version through MiFlash.
Or
You could give flashing 12.0.1 Indonesia vendor in TWRP, and then flashing rom.

Ok, so I downloaded the full ROM for 12.0.3 global. I'm using Linux, so MiFlash won't work. But the ROM archive I downloaded contained a bunch of partition images and a shell script that would flash them using the fastboot command. I just ran that script. Windows users probably could have run the .bat file that was also included. There were no errors. And after a reboot, MIUI started to boot and presented me with the setup procedure.

I did not complete the setup (I suspect it would have just auto-updated MIUI to something that would have caused problems again) and used the power button to go into the bootloader.

From there, I flashed TWRP again (since it got overwritten by the script mentioned above), went into recovery mode, and tried to install LOS again. First, flashing seemed to hang. The last messages in the log were:

Code:
Installing file '/external_sd/Download/lineage-17.1-20210209-UNOFFICIAL-merlin.zip'
Checking for Digest file...
Target: Redmi/merlin_eea/merlin:10/QP1A.190711.020/V11.0.2.0.QJOEUXM:user/release-leys

And that was it. The border around the progress bar was doing it's busy animation thing and after waiting for 10 minutes, I used the power button to reset the device.

The second attempt went through fine, and now I have LineageOS running on the device. I still need to play around with it some more to see if there are any issues, but the flashing itself seems to have worked.

Again, thank you for your help!
 

Communos

Senior Member
Oct 28, 2019
221
102
Paris
Xiaomi Redmi 5
Google Pixel 3 XL
Thank you very much! With that info, I think I finally have it working!

I case it's helpful for future users, here are some issues I encountered along the way:



Code:
$ fastboot reboot fastboot
fastboot: usage: unknown reboot target fastboot
$ fastboot erase system
erasing 'system'...
FAILED (remote: Partition table doesn't exist)
finished. total time: 0.013s
$ fastboot erase vendor
erasing 'vendor'...
FAILED (remote: Partition table doesn't exist)
finished. total time: 0.012s

Is that normal? I do have a partition named 'super' that I can see in the TWRP backup module. Judging from its size, that could be the system partition. I think there's also a vbmeta_system and vbmeta_vendor, did you mean those?



Ok, so I downloaded the full ROM for 12.0.3 global. I'm using Linux, so MiFlash won't work. But the ROM archive I downloaded contained a bunch of partition images and a shell script that would flash them using the fastboot command. I just ran that script. Windows users probably could have run the .bat file that was also included. There were no errors. And after a reboot, MIUI started to boot and presented me with the setup procedure.

I did not complete the setup (I suspect it would have just auto-updated MIUI to something that would have caused problems again) and used the power button to go into the bootloader.

From there, I flashed TWRP again (since it got overwritten by the script mentioned above), went into recovery mode, and tried to install LOS again. First, flashing seemed to hang. The last messages in the log were:

Code:
Installing file '/external_sd/Download/lineage-17.1-20210209-UNOFFICIAL-merlin.zip'
Checking for Digest file...
Target: Redmi/merlin_eea/merlin:10/QP1A.190711.020/V11.0.2.0.QJOEUXM:user/release-leys

And that was it. The border around the progress bar was doing it's busy animation thing and after waiting for 10 minutes, I used the power button to reset the device.

The second attempt went through fine, and now I have LineageOS running on the device. I still need to play around with it some more to see if there are any issues, but the flashing itself seems to have worked.

Again, thank you for your help!
Oh you're using Linux, for Linux the commands is
/.fastboot reboot fastboot

Great to know you were able to flash successfuly. Note that first boot in all roms is a bootloop, you just have to force reboot after a minute of bootlogo showing up or so.
 

Kain105

Member
Dec 1, 2013
9
0
hi i flashed a wrong twrp and now the phone keeps bootlooping, cannot enter recovery or fastboot by power + vol (+ or -)
adb from computer doesn't detect
sp flash tool doesn't move when i hit "download" button
bootloader unlocked, root yes
pc notificates a device connection by sound
phone redmi note 9
thank you for the help really cannot figure it out
 

VD171

Senior Member
Jun 21, 2012
1,112
1
257
127.0.0.1
LG K10
Samsung Galaxy J7
hi i flashed a wrong twrp and now the phone keeps bootlooping, cannot enter recovery or fastboot by power + vol (+ or -)
adb from computer doesn't detect
sp flash tool doesn't move when i hit "download" button
bootloader unlocked, root yes
pc notificates a device connection by sound
phone redmi note 9
thank you for the help really cannot figure it out
Apparentely, you need to flash in EDL mode.
So, you need to bypass the authentication in EDL mode first.
Read this: https://forum.xda-developers.com/t/...d-flash-in-edl-with-no-auth-for-free.4229683/
 

E77en12

Member
Mar 18, 2021
5
0
Newbie Android user here, hopefully i’m on the correct thread...i have a Redmi Note 9 with MIUI Global version 11.0.5 and Magisk version 20.4.

I tried updating Magisk to the latest version using the direct install option but I keep getting an error. I was told I need manually patch the boot.img and flash it but I need to create a magisk_patch.img first from the boot.img.

I read some of the guides on this thread but I’m not sure which one to follow. Also the steps to create the magisk_patch.image shows I need to click the Install button on Magisk then Select and Patch a file. I only have the Update button on Magisk, can I use that instead?

Or if you have other suggestion how to fix my issue. I attached the error I’m getting when I’m updating Magisk.

Thank you in advance for the assistance.
 

Attachments

  • C92870A2-6CF3-470D-B765-81D9D6835D71.jpeg
    C92870A2-6CF3-470D-B765-81D9D6835D71.jpeg
    259.9 KB · Views: 8
  • 603427BD-AD48-47F1-9F0C-CDF409DEDDD0.jpeg
    603427BD-AD48-47F1-9F0C-CDF409DEDDD0.jpeg
    165.2 KB · Views: 9

VD171

Senior Member
Jun 21, 2012
1,112
1
257
127.0.0.1
LG K10
Samsung Galaxy J7
Newbie Android user here, hopefully i’m on the correct thread...i have a Redmi Note 9 with MIUI Global version 11.0.5 and Magisk version 20.4.

I tried updating Magisk to the latest version using the direct install option but I keep getting an error. I was told I need manually patch the boot.img and flash it but I need to create a magisk_patch.img first from the boot.img.

I read some of the guides on this thread but I’m not sure which one to follow. Also the steps to create the magisk_patch.image shows I need to click the Install button on Magisk then Select and Patch a file. I only have the Update button on Magisk, can I use that instead?

Or if you have other suggestion how to fix my issue. I attached the error I’m getting when I’m updating Magisk.

Thank you in advance for the assistance.
You can't install the magisk using the direct option.
You need to the patch the boot.img file and then flash the magisk_patched.img using fastboot (or spflashtool).
 

E77en12

Member
Mar 18, 2021
5
0
You can't install the magisk using the direct option.
You need to the patch the boot.img file and then flash the magisk_patched.img using fastboot (or spflashtool).
Thank you, it worked. Now my magisk is updated 🥳
 

Attachments

  • 4ED79BC5-1312-4F88-A0B7-F17674345931.jpeg
    4ED79BC5-1312-4F88-A0B7-F17674345931.jpeg
    67.3 KB · Views: 4

Top Liked Posts

Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone