How To Guide Update Magisk on rooted POCO M4 Pro 4G (fleur) - Redmi Note 11S 4G / POCO M4 Pro 4G (fleur)

You can't update Magisk through the Magisk App on this phone as this device does not allow writing to the boot partition at runtime. As such you have to update it manually:
Updating is a 3 step process:
- Source boot.img
- Patch boot.img
- Flash boot.img
Source boot.img
- Find your MIUI version in Settings -> About phone -> MIUI Version and look for the version number (e.g. 13.0.6.0(RKEEUXM))​- visit the MIUI Updates Tracker and download the matching Stable Fastboot update​- unzip the TGZ and the TAR that it contains then navigate to the images directory and find the boot.img file​
Patch boot.img
- update the Magisk App by clicking Update in the App tile of the Magisk App​- push the boot.img to the phone using adb push boot.img /sdcard​- in the Magik App click Update in the Magisk tile, tap Select and Patch a File, select the boot.img file, and tap Let's Go​- pull the magisk_patched-*.img from the phone using adb pull /sdcard/Download/magisk_patched-*.img .\​
Flash boot.img
- boot into fastboot mode using adb reboot bootloader​- flash the patched image using fastboot flash boot magisk_patched-*.img​- reboot using fastboot reboot​
Happy hacking!

Related

[GUIDE][GRUS]How to flash TWRP and GSI ROMs on MI 9 SE

# I assume you are confident with ADB and Fastboot commands and you know what you are doing. #
# If you don't, search on Google before messing with your device. #
# I am not responsible for...you know what I mean. On the other hand, please feel free to point out any error in this guide. #
# Lots of useful information can be found on Telegram Group for Mi 9 SE #
# If you already unlocked your bootloader and flashed TWRP, go directly to part 2 of this guide #
PART 1 - UNLOCK DEVICE AND FLASH TWRP
# Before starting, be sure that you can unlock your bootloader and you have these files: #​
- Mi Unlock tool (http://en.miui.com/unlock/)
- Minimal ADB & Fastboot 1.4.3 (https://forum.xda-developers.com/showthread.php?t=2317790)
- TWRP recovery for your device (please check the development section).
Install ADB and Fastboot drivers on your PC, if you don't have them already.
- enable developer options on device, allow OEM unlock and ADB debug.
- install Minimal ADB & Fastboot tool and run a command window. PLEASE DON'T USE WINDOWS 10 POWER SHELL. Double click on "cmdhere.dll" in root folder instead.
- move twrp image in the same folder where Minimal ADB & Fastboot is installed.
- for your convenience, rename twrp file as "twrp" only.
- connect your device to your PC USB port, pair it with PC then reboot it to bootloader (power + volume down combo).
Unlock bootloader using Mi Unlock tool (full unlocking guide at https://c.mi.com/thread-1635834-1-1.html)
Unlocking bootloader will erase all of your data, including storage.
Once you unlocked:
- reboot and setup device
- enable developer options again
- double check bootloader status and allow ADB debug
- connect to USB port and pair device with PC for ADB debug bridge then type in command window:
Code:
adb devices
Code:
adb reboot bootloader
once in bootloader screen code:
Code:
fastboot devices
Code:
fastboot flash recovery twrp.img
- don't give fastboot command "fastboot boot recovery twrp" or "fastboot reboot recovery twrp". Just press and hold power+volume up for about 10 seconds to reboot to recovery.
- swipe to allow twrp modifications.
- I would suggest to NOT format data to get rid of encryption unless you actually need it. Encryption does not slow down your device or harm your battery life.
- I would also suggest to NOT wipe system and reboot to recovery because it could lead to a fastboot bootloop.
PART 2 - HOW TO FLASH A GSI ROM​
# IMPORTANT #​
When flashing a GSI ROM, it is recommended to use a Stable firmware as base.
If device is running different builds, flash latest Global or China Stable before starting using MiFlash tool.
Beware that device could have the anti-rollback enabled, so be careful when flashing another firmware.
Mi 9 SE is a system-as-root device, so you must flash A/B type GSI ROMs. ​
You will need these files:
- GSI A/B ROM (FlokoROM at https://treble.andro.plus/ or choose one at https://forum.xda-developers.com/project-treble/trebleenabled-device-development)
- vbmeta.img (https://androidfilehost.com/?fid=818070582850505317)
- gapps for Google services (https://opengapps.org/) - select ARM64 - 9.0 - I would suggest nano or pico package.
- magisk for root and modules (https://forum.xda-developers.com/apps/magisk/official-magisk-v7-universal-systemless-t3473445)
- MiFlash flashable STABLE stock firmware (http://en.miui.com/download or https://mirom.ezbox.idv.tw/en/phone/grus/)
- MiFlash tool (https://www.xiaomiflash.com/)
If you are already running a Stable firmware start from here, if you don't, flash a Stable firmware.
- move GSI and vbmeta images in the same folder where Minimal ADB & Fastboot is installed.
- for your convenience, rename GSI file as "system" only.
- reboot device to bootloader, ensure you are connected with your PC properly
- to double check it, run a command window and type:
Code:
fastboot devices
once you get the device recognized type:
Code:
fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img
this command will disable dm-verity and AVB on device. PLEASE DON'T USE WINDOWS 10 POWER SHELL to disable vbmeta or you will get an error feedback. Double click on "cmdhere.dll" in root folder instead.
then:
Code:
fastboot flash system system.img
this command will flash system.img
Code:
fastboot -w
this command will wipe data on device
Reboot your device in recovery using button combo and resize system partition to install Gapps.
From TWRP Wipe menu > advanced wipe > system > repair or change file system > resize system > swipe to resize
- move magisk and gapps from PC to device
- go to mount menu and tick mount system
- go back to install menu and flash gapps
- once you flashed gapps unmount system
- go to install and flash magisk
- go to wipe menu and swipe for factory reset
- reboot
once rebooted, complete the device setup.
be aware that some GSI could bootloop or not boot at all even if you followed the guide properly.
in case rely on GSI devs for assistance or fixes.
Of course you can flash a GSI ROM using TWRP.
The only fastboot command you need to perform is to disable dm-verity and AVB.
If you already disabled it while flashing TWRP for the first time, you can follow these steps to flash a GSI using TWRP:
- Tap on advanced Wipe menu and wipe cache, dalvik, data and system
- Tap on Install > Install Image > select image and flash it to system
- Install Gapps with the same process shown above.
- Swipe for factory reset and reboot.
-----------------------------------------------------------------------------------------------------------------------------------------------
If updating GSIs builds from the same branch (e.g. Floko 060219 to Floko 060919) you are not required to wipe data. You can update flashing system.img on TWRP and Gapps time by time.
If you are moving from unofficial builds to official, or if you are moving between branches (e.g. Floko to Havoc), you need to wipe data as well.
@pengus77 provided for a very useful Magisk Module that will fix adaptive brightness, battery stats and in-call BT. You will find it here: https://forum.xda-developers.com/showpost.php?p=79762257&postcount=242
If you flashed a GSI ROM, you are basically using a system.img flashed on top of your stock firmware so, unless you performed modifications to vendor or boot partition, you can revert to stock using fastboot or TWRP.
You need to extract system.img (and boot and vendor, if needed) from the stock firmware.
You will need the vbmeta file as well to re-enable AVB and dm-verity otherwise the device will reboot in fastboot mode only.
Beware: you must flash EXACTLY the same system.img of the firmware you were running before flashing a GSI
Once you have both files, you can follow these steps to go back to stock using fastboot:
- place the files on Minimal ADB & Fastboot root folder
- reboot bootloader
- start a command window from Minimal ADB and type: fastboot devices
once your device has been recognized type the following commands:
- fastboot -w
- fastboot flash system system.img
- (optional) fastboot flash vendor vendor.img
- (optional) fastboot flash boot boot.img
- fastboot flash vbmeta vbmeta.img
- fastboot reboot
You can also revert to stock using TWRP, by the way you will still need fastboot to flash vbmeta partition.
These are the steps to follow if you are using TWRP:
- place system.img on your device and vbmeta.img in Minimal ADB & Fastboot root folder.
- reboot to twrp and wipe dalvik, cache and data
- flash system.img to system partition
- (optional) flash vendor.img to vendor partition
- (optional) flash boot.img to boot partition
- reboot to bootloader
Start a command window in Minimal ADB & Fastboot, then type:
- fastboot devices
- fastboot flash vbmeta vbmeta.img
- fastboot reboot
Thansk for your work.
Does TWRP backup work?For getting back to stock?
Moh3n.B said:
Thansk for your work.
Does TWRP backup work?For getting back to stock?
Click to expand...
Click to collapse
I hope it is helpful
Backup worked for me on the TWRP I mentioned above.
If you want revert to stock you can flash again stock firmware using MiTool (fastboot ROM) or twrp (Recovery ROM).
Good thread! Might be confusing if there's no guide to install TWRP and GSI ?
Great guide. It will help a lot of people to flash and test roms. And us by extension to find the best rom for our device !
Today I had some time and I tried to install the latest Havoc Gsi, unfortunately the result was negative, I ran the guide both from xda and from here, my basic rom was 10.2.3.0, arrived at the command fastboot -w performs the various wipes, but then it does not allow me to go into recovery, it always and only goes in fastboot, and the only way to make the smartphone work is to use miflash and put the official version back.
scorpionredblack said:
Today I had some time and I tried to install the latest Havoc Gsi, unfortunately the result was negative, I ran the guide both from xda and from here, my basic rom was 10.2.3.0, arrived at the command fastboot -w performs the various wipes, but then it does not allow me to go into recovery, it always and only goes in fastboot, and the only way to make the smartphone work is to use miflash and put the official version back.
Click to expand...
Click to collapse
Try to flash vbmeta.
For me is not necesary.
Try like this from twrp:
- Wipe cache, dalvik cache, system, data
- Flash latest weekly eu firmware as base xiaomi.eu_multi_MI9SE_9.6.5_v10-9.zip
- Than flash havoc as system
Optional: flash magisk and custom kernel
Just stuck on bootloader unlocking.
Got this error "current account is not bound to this device"
I added device from mi unlock status too.
Moh3n.B said:
Just stuck on bootloader unlocking.
Click to expand...
Click to collapse
Search on Google. It looks like to be a common issue. If needed, follow the unlocking guide I linked on OP.
successfully flash Foloko ROM to Mi9 se, run very well!
just a small queastion, is DT2W is not working in all GSI rom?
Anyone try it yet?
Is there way to enable DC dimming (anti-pwm)?
I am using Havoc OS and my eyes are hurting..
sky104hk said:
successfully flash Foloko ROM to Mi9 se, run very well!
just a small queastion, is DT2W is not working in all GSI rom?
Anyone try it yet?
Click to expand...
Click to collapse
For now all gsi have same problem.
how to flash gapps ... i got error 70
raber111 said:
how to flash gapps ... i got error 70
Click to expand...
Click to collapse
Read carefully post n.2
Before I flash this, I world like to know from those already using this rom: How is the camera quality and finger print unlock response /speed?
I'm pissed at the frequent snow down of the miui system because I run vpn all day on my phone.
Sent from my Mi 9 SE using Tapatalk
krispuniq said:
Before I flash this...
Click to expand...
Click to collapse
Generally speaking, all the GSIs ROMs are based on Phhusson AOSP GSI ROM, so they have more or less the same performance and bugs.
At he moment FOD is not working well. You cannot unblock the device while on screen off or while on AOD.
For camera, you can install BSG Google Camera mod, that is working quite good.

Enable Auto brightness in any gsi rom (For Redmi 9 Lancelot)

You can enable Auto brightness in any gsi rom..I made a special vendor.img file to enable it..
Required things:
1.unlocked bootloader.
2.working brain.
Steps:
1.Download and extract zip file from below link.
https://drive.google.com/file/d/1Bxhuj-GLByS5rf_w53mQTGK1GmnmDZzs/view?usp=drivesdk
You get 3 file vbmeta.img,vendor.img,boot.img(this file is for redmi 9 (Lancelot).do not flash those file on other phone which code name is not Lancelot)
2.flash vbmeta.img and boot.img via fastboot mood with below cmd
fastboot flash vbmeta vbmeta.img
fastboot flash boot boot.img
3.flash vendor.img via fastbootd mood with below cmd
fastboot flash vendor vendor.img
4. erase all userdata and boot your device .Now your auto brightness work...
Error fix:
1."file size is larger then partition size"if you get this type of Error then you need to type below cmd in fastbootd mood.
fastboot resize-logical-partition vendor 780
2.If you face any boot loop after flash and not solve it via erasing userdata the you need to flash magisk patch boot.img which you currently use:good::good:...evenif you get bootloop then first flash global v11.0.4.0 fastboot rom then follow my instruction again..
3.If brightness slider not work or headphones not detect then follow the below post.
https://forum.xda-developers.com/showpost.php?p=83635205&postcount=1
4.If you do not know how to flash gsi on redmi 9 (Lancelot) then follow below link.
https://forum.xda-developers.com/showpost.php?p=83533901&postcount=1
prove:
I provide a zip file link as attachment.unzip it and you get a video prove...
If my process work for you then don't forget to thanks me because it is free....
What have you done to the vbmeta?
koso000 said:
What have you done to the vbmeta?
Click to expand...
Click to collapse
Nothing but add some overlay file to vendor image. It is difficult now because we cannot Mount vendor image via custom recovery so I Mount it in Linux and some overlay file and give them permission that's it...
I nothing done with vbmeta.img. it is a blank file so no need to worry about it
It didn't work for me..could you share a guide to generate fix for my own vendor

Realme 7 pro stock ROM MSM Download tool

Hi!
I cant enter the MSM Download Tool app provided in ROMs folder. Does anyone know hoy to solve it?
I need to unbrick my phone
Sorry to say that you will have to pay an Indian to recover your phone, the MSM downloader requires an authorized id
I have a similar problem: accidentally i format the system partition and now i can only enter in recovery e fastboot mode but i can't install anything roms. Is there a way to restore stock rom or force a custom rom? Thanks.
I fixed it using part of this guide ->https://forum.xda-developers.com/t/unbrick-realme-7-pro-ui-1-0-android10.4347457/:
- Flash a custom recovery (i use twrp) and start the phone in recovery.
- Download the official rom ozip for realme 7 pro (i use the eu version).
- Start the phone in recovery and connect the phone to a pc and copy the ozip in it (i created a folder named "roms").
- Download a OFP Rom (the only i find are indian version).
- Download "MCT ofp extract tool" (for prevent virus warning it is possible use a vm machine...i used a second pc) and extract the OFP Rom.
- Download "minimal adb portable" and extract in the OFP Rom folder (where are the files of ofp rom extracted).
- Via fastboot flash the follow img:
fastboot flash vbmeta vbmeta.img
fastboot flash vbmeta_system vbmeta_system.img
fastboot flash vbmeta_vendor vbmeta_vendor.img
fastboot flash super super.img
fastboot flash boot boot.img
fastboot flash persist persist.img
fastboot flash recovery recovery.img
- Now start the phone in recovery (will be the stock recovery).
- Wipe and after that flash the ozip file.
- After that format the memory phone (always via stock recovery).
- Reboot and that's all the phone start via with stock rom.
After configuration there are some update with the last ota dated 28/10/2021.
I hope, someone, will find it usefull.
alien762 said:
I fixed it using part of this guide ->https://forum.xda-developers.com/t/unbrick-realme-7-pro-ui-1-0-android10.4347457/:
- Flash a custom recovery (i use twrp) and start the phone in recovery.
- Download the official rom ozip for realme 7 pro (i use the eu version).
- Start the phone in recovery and connect the phone to a pc and copy the ozip in it (i created a folder named "roms").
- Download a OFP Rom (the only i find are indian version).
- Download "MCT ofp extract tool" (for prevent virus warning it is possible use a vm machine...i used a second pc) and extract the OFP Rom.
- Download "minimal adb portable" and extract in the OFP Rom folder (where are the files of ofp rom extracted).
- Via fastboot flash the follow img:
fastboot flash vbmeta vbmeta.img
fastboot flash vbmeta_system vbmeta_system.img
fastboot flash vbmeta_vendor vbmeta_vendor.img
fastboot flash super super.img
fastboot flash boot boot.img
fastboot flash persist persist.img
fastboot flash recovery recovery.img
- Now start the phone in recovery (will be the stock recovery).
- Wipe and after that flash the ozip file.
- After that format the memory phone (always via stock recovery).
- Reboot and that's all the phone start via with stock rom.
After configuration there are some update with the last ota dated 28/10/2021.
I hope, someone, will find it usefull.
Click to expand...
Click to collapse
bro i did everything and i unbricked my phone successfully (thanks to you and that thread https://forum.xda-developers.com/t/unbrick-realme-7-pro-ui-1-0-android10.4347457/ )
but i still have a problem that my fingerprint doesn't work and i did not backup persist.
please help me bro - Thanks in advance.
alien762 said:
I fixed it using part of this guide ->https://forum.xda-developers.com/t/unbrick-realme-7-pro-ui-1-0-android10.4347457/:
- Flash a custom recovery (i use twrp) and start the phone in recovery.
- Download the official rom ozip for realme 7 pro (i use the eu version).
- Start the phone in recovery and connect the phone to a pc and copy the ozip in it (i created a folder named "roms").
- Download a OFP Rom (the only i find are indian version).
- Download "MCT ofp extract tool" (for prevent virus warning it is possible use a vm machine...i used a second pc) and extract the OFP Rom.
- Download "minimal adb portable" and extract in the OFP Rom folder (where are the files of ofp rom extracted).
- Via fastboot flash the follow img:
fastboot flash vbmeta vbmeta.img
fastboot flash vbmeta_system vbmeta_system.img
fastboot flash vbmeta_vendor vbmeta_vendor.img
fastboot flash super super.img
fastboot flash boot boot.img
fastboot flash persist persist.img
fastboot flash recovery recovery.img
- Now start the phone in recovery (will be the stock recovery).
- Wipe and after that flash the ozip file.
- After that format the memory phone (always via stock recovery).
- Reboot and that's all the phone start via with stock rom.
After configuration there are some update with the last ota dated 28/10/2021.
I hope, someone, will find it usefull.
Click to expand...
Click to collapse
Hi, man.
I really need help with this one. I have a bricked device.
So, can you provide me with the twrp? I tried to install one but can't find the right one. Also, I'm stuck with this "boot destroyed" thing. Have tried to fix it--and it seems there's step in your solution above that I've tried as well (aka. flashing boot, vbmeta, super, etc.) but still can't get it work. Do you have any idea?
Cause it seems that I have to fix the boot destroyed thing first.
TIA
pls bro help me...Wipe and after that flash the ozip file?OZIP THATS mean stock rom or?
alien762 said:
I fixed it using part of this guide ->https://forum.xda-developers.com/t/unbrick-realme-7-pro-ui-1-0-android10.4347457/:
- Flash a custom recovery (i use twrp) and start the phone in recovery.
- Download the official rom ozip for realme 7 pro (i use the eu version).
- Start the phone in recovery and connect the phone to a pc and copy the ozip in it (i created a folder named "roms").
- Download a OFP Rom (the only i find are indian version).
- Download "MCT ofp extract tool" (for prevent virus warning it is possible use a vm machine...i used a second pc) and extract the OFP Rom.
- Download "minimal adb portable" and extract in the OFP Rom folder (where are the files of ofp rom extracted).
- Via fastboot flash the follow img:
fastboot flash vbmeta vbmeta.img
fastboot flash vbmeta_system vbmeta_system.img
fastboot flash vbmeta_vendor vbmeta_vendor.img
fastboot flash super super.img
fastboot flash boot boot.img
fastboot flash persist persist.img
fastboot flash recovery recovery.img
- Now start the phone in recovery (will be the stock recovery).
- Wipe and after that flash the ozip file.
- After that format the memory phone (always via stock recovery).
- Reboot and that's all the phone start via with stock rom.
After configuration there are some update with the last ota dated 28/10/2021.
I hope, someone, will find it usefull.
Click to expand...
Click to collapse
help plis ???

How To Guide Root POCO M4 Pro 4G (fleur) using Magisk

Rooting the POCO M4 Pro 4G (fleur) turned out to be quite straightforward. Note, I have a 2201117PG (EEA), you may have a different experience, it's not my fault if you brick your phone etc. Backup before you start as this will wipe your phone.
The process can be broken down into 4 steps:
Unlock Bootloader
Source boot.img
Patch boot.img (using Magisk)
Flash patched boot.img (using adb)
1. Unlock Bootloader​Note: This step will wipe your phone.
This can be done using the official tool from MIUI, using MediatekBootloaderUnlock (Windows 10/11, which reportedly does not wipe your user data), or using mtkclient (Any OS but requires Python). I will explain the mtkclient option as I'm on Linux and don't trust MIUI with more personal data than I have to.
Step-by-step (adapted from this How to Guide):
Install mtkclient and its dependencies (easier if familiar with installing python packages etc., straightforward for me on Linux)
On your phone activate developer mode and turn on USB debugging and OEM unlocking
Turn off phone and disconnect from computer
In the directory where you installed mtkclient run:
python mtk e metadata,userdata,md_udc
This erases your data
At this point plug your phone in (still turned off)
python mtk da seccfg unlock
This unlocks the bootloader
python mtk reset
This reboots the phone
Disconnect USB cable and reboot phone
When it boots a message is displayed warning that dm-verity is corrupted. Click the power button to dismiss and continue booting.
2. Source boot.img​
Find your MIUI version in Settings -> About phone -> MIUI Version and look for the version number (e.g. 13.0.6.0(RKEEUXM))
Visit the MIUI Updates Tracker and download the matching Stable Fastboot update (if you can't find it scroll down to Extracting boot.img from Payload)
Unzip the TGZ and the TAR that it contains then navigate to the images directory and find the boot.img file
3. Patch boot.img​We need to patch the boot.img to give it root powers. We do this on the phone using Magisk.
Step-by-step (adapted from the Magisk installation instructions):
On your phone, download Magisk and install it
Connect your phone to your computer and put the boot.img you extracted on your phone somewhere
Open Magisk and in "Magisk" section tap "Install"
Choose the "Select and Patch a File" option and select your boot.img in the file browser and let Magisk patch it
Find the patched boot image in Downloads (called magisk_patched_*.img) and copy it to your computer in the same directory as the vbmeta.img we extracted earlier
4. Flash patched boot.img​Finally we need to replace the current boot.img on the phone with our patched one that has root powers. This is called flashing and is done using adb.
Step-by-step:
Install the Android SDK platform tools which contains adb and fastboot
Install a USB driver that supports fastboot mode (you cannot use fastbootd for this or you'll bootloop)
Ensure your phone is connected, USB debugging is enabled and working, and OEM Unlocking is enabled
In the directory you copied the magisk_patched_*.img to run:
adb reboot bootloader
This reboots your phone into fastboot mode. Wait until "FASTBOOT" is displayed on the screen
fastboot flash boot magisk_patched_*.img
This flashes the patched boot.img to give you root
fastboot flash vbmeta --disable-verity --disable-verification vbmeta.img
This flashes the vbmeta.img, disabling the dm-verity corruption message at startup
Once it's done reboot your phone by pressing and holding the power button
That's all there is to it! This took me about an hour as I was working out all the steps as I've not rooted in a phone in nearly a decade - I reckon with a fast internet connection you could get it done in about 15 minutes.
Extract boot.img from Payload​If you can't find a fastboot image (boot.img) for your version then you might be able to extract it from the full firmware package. This will require the use of a third party tool such as payload-dumper (python) or payload-dumper-go. Note that you may be better off just waiting for the fastboot image to be released to the public.
Tidying up​You can delete all the stuff you downloaded onto your computer and the boot.img and magisk_patched_*.img from your phone.
It's a good idea to disable automatic OTA updates (Settings -> Additional settings -> Developer options -> Automatic sytem updates) so that you can update through Magisk.
Some apps will be able to tell that you have rooted your phone, and may stop you from using them. You can check this by downloading YASNAC onto your phone and seeing if it passes. If not (which it won't) the most straightforward solution is to add the Universal SafetyNet Fix module to Magisk, then enable Zygisk in Magisk settings and restart your phone, which will be enough to pass SafetyNet Attestation. If they're clever and still detect the root then in Magisk toggle Enforce DenyList and add the problematic apps to the DenyList.
Updating Magisk
You cannot update Magisk via the Magisk app, as this device does not allow writing to the boot partition at runtime.
Instead, update the Magisk app, then use it to patch your stock boot.img and flash it manually using fastboot, as if you were installing it from scratch (as above). This will not wipe your user data, but be sure to backup first in case something goes wrong.
aricooperdavis said:
Rooting the POCO M4 Pro 4G (fleur) turned out to be quite straightforward. Note, I have a 2201117PG (EEA), you may have a different experience, it's not my fault if you brick your phone etc.
The process can be broken down into 4 steps:
Unlock Bootloader
Source boot.img (using payload_dumper)
Patch boot.img (using Magisk)
Flash patched boot.img (using adb)
1. Unlock Bootloader​This can be done using the official tool from MIUI or using mtkclient. I went for the mtkclient option as I don't want to send more of my personal data to MIUI than I have to.
Step-by-step (adapted from this How to Guide):
Install mtkclient and its dependencies (easier if familiar with installing python packages etc., straightforward for me on Linux)
On your phone activate developer mode and turn on USB debugging and OEM unlocking
Turn off phone and disconnect from computer
In the directory where you installed mtkclient run:
python mtk e metadata,userdata,md_udc
At this point plug your phone in (still turned off)
python mtk da seccfg unlock
python mtk reset
Disconnect USB cable and reboot phone
When it boots a message is displayed saying it is corrupted. Click the power button to dismiss and continue booting.
2. Source boot.img​The boot.img needs to be extracted from the official MIUI firmware package using payload_dumper.
Step-by-step:
Download the firmware package for your device (you can check what version you need in Settings -> About phone -> MIUI version (For POCO)
Extract the .zip and find the payload.bin file
Download the payload dumper, extract the zip, and place the payload.bin file in the payload_dumper folder
In the payload_dumper directory run:
python payload_dumper.py payload.bin
This will extract lots of files from the firmware package. You only need to keep boot.img and vbmeta.img
3. Patch boot.img​We need to patch the boot.img to give it root powers. We do this on the phone using Magisk.
Step-by-step (adapted from the Magisk installation instructions):
On your phone, download Magisk and install it
Connect your phone to your computer and put the boot.img you extracted on your phone somewhere
Open Magisk and in "Magisk" section tap "Install"
Choose the "Select and Patch a File" option and select your boot.img in the file browser and let Magisk patch it
Find the patched boot image in Downloads (called magisk_patched_*.img) and copy it to your computer in the same directory as the vbmeta.img we extracted earlier
4. Flash patched boot.img​Finally we need to replace the current boot.img on the phone with our patched one that has root powers. This is called flashing and is done using adb.
Step-by-step:
Install the Android SDK platform tools which contains adb and fastboot
Install a USB driver that supports fastboot mode
Ensure your phone is connected, USB debugging is enabled and working, and OEM Unlocking is enabled
In the directory you copied the magisk_patched_*.img to run:
adb reboot bootloader
This reboots your phone into fastboot mode. Wait until "FASTBOOT" is displayed on the screen
fastboot flash boot magisk_patched_*.img
fastboot flash vbmeta --disable-verity --dsable-verification vbmeta.img
Once it's done reboot your phone by pressing and holding the power button
That's all there is to it! This took me about an hour as I was working out all the steps as I've not rooted in a phone in nearly a decade - I reckon with a fast internet connection you could get it done in about 15 minutes.
Tidying up​You can delete all the stuff you downloaded onto your computer and the boot.img and magisk_patched_*.img from your phone.
It's a good idea to disable automatic OTA updates (Settings -> Additional settings -> Developer options -> Automatic sytem updates) so that you can update through Magisk.
Some apps will be able to tell that you have rooted your phone, and may stop you from using them. You can check this by downloading YASNAC onto your phone and seeing if it passes. If not (which it won't) the most straightforward solution is to add the Universal SafetyNet Fix module to Magisk, then enable Zygisk in Magisk settings and restart your phone, which will be enough to pass SafetyNet Attestation. If they're clever and still detect the root then in Magisk toggle Enforce DenyList and add the problematic apps to the DenyList.
Click to expand...
Click to collapse
Wow, Thank you very much!
Very details!
Will try it in my spare time.
MarkLev said:
Wow, Thank you very much!
Very details!
Will try it in my spare time.
Click to expand...
Click to collapse
Good luck, let us know how it goes and what you do with your root! So far I've installed AdAway and De-Bloater
aricooperdavis. hi!​I buy phone Poco M4 Pro (4G) (fleur). Please help me get ROOT rights for this phone.
I do not have PYTHON, but I have mtkclient - the bootloader is unlocked, and there is an Android SDK for fastboot firmware.
Global 13.0.7.0 RKEMIXM now. You have 2 file 1.magisk_patched_*.img and 2. vbmeta.img for Global 13.0.7.0 ? Can I save them for download?
After unlocking the bootloader, using the mtkclient method, a new notification appeared
- dm-verity coruption
You device is corrupt/
It can't be trusted and may not work properly
Press power button to contime
Or, device will power off in 5 sec. Always need PRESS POWER for contime again How to fix it?
It sounds like you've done everything right so far.
Lark5 said:
Global 13.0.7.0 RKEMIXM now. You have 2 file 1.magisk_patched_*.img and 2. vbmeta.img for Global 13.0.7.0 ? Can I save them for download?
Click to expand...
Click to collapse
Sorry, I have the EEA firmware; RKEEUXM.
If you want to extract the boot.img and vbmeta.img from your firmware package you will have to install python. This is worth doing as installing updates in the future may require you to do this extraction process again.
Alternatively you may be able to use mtk to dump these images directly from the phone, but I don't have any experience with this. To perform updates this way you would have to completely unroot and relock the bootloader, update the firmware, then re-dump the new boot and vbmeta images and root again. I think just installing python is probably easier...
The error message you're seeing is dm-verity, and we disable this when flashing the vbmeta.img in step 4, which I've edited to clarify. You can see that we disable it in the final fastboot command:
aricooperdavis said:
fastboot flash vbmeta --disable-verity --dsable-verification vbmeta.img
This flashes the vbmeta.img, disabling the dm-verity corruption message at startup
Click to expand...
Click to collapse
Good luck with your rooting!
Unlock Bootloade and Root and RECOVERY for Poco M4 Pro (4G) with out Pyton (on Windows 10\11):
Unlock Bootloader:
1.Download the MediatekBootloaderUnlock archive. Unpack the archive ZIP.
2. Open the Driver folder and right-click the cdc-acm.inf file, select "Install"
3.Now go back to the main folder and install the USBDK (x64 for 64-bit OS, x86 for 32-bit OS) on your PC (also right click - install).
4. Reboot the PC.
5.Turn off the phone.
6.Run the UnlockBootloader.bat file to start the bootloader unlock process. We keep it on, it is in a state of response from the phone, if the firewood, the cable is connected, then everything is ok, I’ll tell you right away that it turned out 3 times.
7.Now connect the phone to the computer with a cable by holding down the volume up + down + power button. (If the volume up button doesn't work, try using volume up or volume up + volume down or all three hardware buttons) while the UnlockBootloader.bat file is open.
8.Once the phone is detected, some commands will be run in the UnlockBootloader.bat file. Let the commands finish and as soon as the window closes. Your bootloader will be unlocked.
BY THE WAY! - You can lock the bootloader again by following the same steps without clearing. Just use LockBootloader.bat with the same steps.
Root:
Downloading the official firmware for the phone, I took fleur_global_images_V13.0.7.0.RKEMIXM_20220419.0000.00_11.0_global (approximately 5.6GB in weight)
Unpacked it ZIP, pulled out 2 files from there fleur_global_images_V13.0.7.0.RKEMIXM_20220419.0000.00_11.0_global\images
boot.img and vbmeta.img
Downloaded Magisk STABLE Version: 24.3 - download on telephone, setup APP
Launch Magisk Manager. When a pop-up window appears asking you to install Magisk, select INSTALL and select install again.
Click on "Fix Boot Image File".
Connect your device to PC via USB cable. Make sure USB debugging is enabled.
Download ADB \ fastoot (I took tools_r29.0.6-windows)
Run CMD as Administrator
We write -
adb devices - the phone must be determined (QX ********* device - so all drivers are correct)
adb reboot bootloader - The phone reboots into fastboot mode - an inscription on the screen if dm-verity corruption messages appear - press POWER to continue
fastboot flash boot boot_PATCH.img (file name how to change)
fastboot flash vbmeta --disable-verity --dsable-verification vbmeta.img - will remove the inscription dm-verity corruption
OrangeFox-R11 RECOVERY:​
Downloads for : -Android- Generic Device/Other | AndroidFileHost.com | Download GApps, Roms, Kernels, Themes, Firmware and more. Free file hosting for all Android developers.
Download GApps, Roms, Kernels, Themes, Firmware, and more. Free file hosting for all Android developers.
androidfilehost.com
Download, and Run CMD as Administrator
We write -
fastboot flash boot XXXXNAMEXXXX.img
Flash !boot! not fastboot flash recovery XXXXNAMEXXXX.img
Well done, glad you've got it sorted!
To clarify, this essentially follows the same 4 steps outlined in my post but using different tools that don't require python:
Unlock Bootloader
- Used MediatekBootloaderUnlock rather than mtkclient
Source boot.img
- Managed to find the images online without having to extract them from a ROM. @Lark5, where?
Patch boot.img (using Magisk)
- Same
Flash patched boot.img (using adb)
- Same
I think there's also a custom recovery install too (OrangeFox [not yet officially supported]) at the end. I tend not to bother with custom recoveries as I stick with the stock MIUI ROM and a custom recovery would complicate applying OTA updates. However, if you wish to install a custom ROM (anything other than a stock MIUI signed boot.img) then a custom recovery would be necessary, and they can also facilitate taking device backups etc.
aricooperdavis said:
Well done, glad you've got it sorted!
To clarify, this essentially follows the same 4 steps outlined in my post but using different tools that don't require python:
Unlock Bootloader
- Used MediatekBootloaderUnlock rather than mtkclient
Source boot.img
- Managed to find the images online without having to extract them from a ROM. @Lark5, where?
Patch boot.img (using Magisk)
- Same
Flash patched boot.img (using adb)
- Same
I think there's also a custom recovery install too (OrangeFox). I tend not to bother, but it can be convenient.
Click to expand...
Click to collapse
2. Find ROM on this link: https://mirom.ezbox.idv.tw/en/phone/fleur/roms-global-stable/
Fastboot Download V13.0.7.0.RKEMIXM
Explanations:
For fastboot (~5.6Gb) - firmware version, just unzip the ZIP, inside there is boot.img and vbmeta
For recovery (-2.5Gb) needed to extract boot.img Through Pyton for example
thanks for the help aricooperdavis
Lark5 said:
Find ROM on this link: https://mirom.ezbox.idv.tw/en/phone/fleur/roms-global-stable/
Click to expand...
Click to collapse
That's a great resource - the files it links to seem to be hosted on MIUIs servers too, so they're verifiably official
The more general link for all regions (not just global) for this phone would be: https://mirom.ezbox.idv.tw/en/phone/fleur/
I've updated the instructions to reflect your experience, thanks @Lark5!
aricooperdavis said:
Rooting the POCO M4 Pro 4G (fleur) turned out to be quite straightforward. Note, I have a 2201117PG (EEA), you may have a different experience, it's not my fault if you brick your phone etc. Backup before you start as this will wipe your phone.
The process can be broken down into 4 steps:
Unlock Bootloader
Source boot.img
Patch boot.img (using Magisk)
Flash patched boot.img (using adb)
1. Unlock Bootloader​Note: This step will wipe your phone.
This can be done using the official tool from MIUI, using MediatekBootloaderUnlock (Windows 10/11), or using mtkclient (Any OS but requires Python). I will explain the mtkclient option as I'm on Linux and don't trust MIUI with more personal data than I have to.
Step-by-step (adapted from this How to Guide):
Install mtkclient and its dependencies (easier if familiar with installing python packages etc., straightforward for me on Linux)
On your phone activate developer mode and turn on USB debugging and OEM unlocking
Turn off phone and disconnect from computer
In the directory where you installed mtkclient run:
python mtk e metadata,userdata,md_udc
This erases your data
At this point plug your phone in (still turned off)
python mtk da seccfg unlock
This unlocks the bootloader
python mtk reset
This reboots the phone
Disconnect USB cable and reboot phone
When it boots a message is displayed warning that dm-verity is corrupted. Click the power button to dismiss and continue booting.
2. Source boot.img​Note: if your MIUI version (Available at: Settings -> About phone -> MIUI version) has a "Fastboot" file listed here then you can download that file and unzip it to find the boot.img and vbmeta.img, then skip to step 3.
Otherwise you'll have to extract them from the official MIUI firmware package using payload_dumper as follows.
Step-by-step:
Download the firmware package for your device (you can check what version you need in Settings -> About phone -> MIUI version (For POCO))
Extract the .zip and find the payload.bin file
Download the payload dumper, extract the zip, and place the payload.bin file in the payload_dumper folder
In the payload_dumper directory run:
python payload_dumper.py payload.bin
This will extract lots of files from the firmware package. You only need to keep boot.img and vbmeta.img
3. Patch boot.img​We need to patch the boot.img to give it root powers. We do this on the phone using Magisk.
Step-by-step (adapted from the Magisk installation instructions):
On your phone, download Magisk and install it
Connect your phone to your computer and put the boot.img you extracted on your phone somewhere
Open Magisk and in "Magisk" section tap "Install"
Choose the "Select and Patch a File" option and select your boot.img in the file browser and let Magisk patch it
Find the patched boot image in Downloads (called magisk_patched_*.img) and copy it to your computer in the same directory as the vbmeta.img we extracted earlier
4. Flash patched boot.img​Finally we need to replace the current boot.img on the phone with our patched one that has root powers. This is called flashing and is done using adb.
Step-by-step:
Install the Android SDK platform tools which contains adb and fastboot
Install a USB driver that supports fastboot mode
Ensure your phone is connected, USB debugging is enabled and working, and OEM Unlocking is enabled
In the directory you copied the magisk_patched_*.img to run:
adb reboot bootloader
This reboots your phone into fastboot mode. Wait until "FASTBOOT" is displayed on the screen
fastboot flash boot magisk_patched_*.img
This flashes the patched boot.img to give you root
fastboot flash vbmeta --disable-verity --dsable-verification vbmeta.img
This flashes the vbmeta.img, disabling the dm-verity corruption message at startup
Once it's done reboot your phone by pressing and holding the power button
That's all there is to it! This took me about an hour as I was working out all the steps as I've not rooted in a phone in nearly a decade - I reckon with a fast internet connection you could get it done in about 15 minutes.
Tidying up​You can delete all the stuff you downloaded onto your computer and the boot.img and magisk_patched_*.img from your phone.
It's a good idea to disable automatic OTA updates (Settings -> Additional settings -> Developer options -> Automatic sytem updates) so that you can update through Magisk.
Some apps will be able to tell that you have rooted your phone, and may stop you from using them. You can check this by downloading YASNAC onto your phone and seeing if it passes. If not (which it won't) the most straightforward solution is to add the Universal SafetyNet Fix module to Magisk, then enable Zygisk in Magisk settings and restart your phone, which will be enough to pass SafetyNet Attestation. If they're clever and still detect the root then in Magisk toggle Enforce DenyList and add the problematic apps to the DenyList.
Click to expand...
Click to collapse
When I gave this command fast boot flash dm verify it always unknown option in my cmd any solution ? can anybody help me??
Daafafagsgsgs said:
When I gave this command fast boot flash dm verify it always unknown option in my cmd any solution ? can anybody help me??
Click to expand...
Click to collapse
Make sure you're copying the command exactly - it's fastboot rather than fast boot and verity not verify. Did you install the Android SDK platform tools that contain fastboot? You may need to restart after this install to make the command available in your command prompt/shell.
aricooperdavis said:
Make sure you're copying the command exactly - it's fastboot rather than fast boot and verity not verify. Did you install the Android SDK platform tools that contain fastboot? You may need to restart after this install to make the command available in your command prompt/shell.
Click to expand...
Click to collapse
Yeah i copied the same command but how to install Android sdk tools can you suggest me a video?
Daafafagsgsgs said:
Yeah i copied the same command but how to install Android sdk tools can you suggest me a video?
Click to expand...
Click to collapse
Go to this link, scroll to the downloads section, and select the right download for your OS, then follow the instructions.
This video shows the process, but has very annoying music!
aricooperdavis said:
Make sure you're copying the command exactly - it's fastboot rather than fast boot and verity not verify. Did you install the Android SDK platform tools that contain fastboot? You may need to restart after this install to make the command available in your command prompt/shell.
Click to expand...
Click to collapse
I installed and tried everything this error comes
Interesting, that sounds like you've got an outdated version of fastbook. What does fastboot --version give you?
Can i flash it with my phone ??
Adb otg app??
I don't know, I can't help you with that.
aricooperdavis said:
Interesting, that sounds like you've got an outdated version of fastbook. What does fastboot --version give you?
Click to expand...
Click to collapse
Fastboot version
That's not an official version of fastboot, so it looks like it's missing the command you need. Download the proper Android SDK tools from Android (the same as the original link) and replace your "Minimal" version with it.
aricooperdavis said:
That's not an official version of fastboot, so it looks like it's missing the command you need. Download the proper Android SDK tools from Android (the same as the original link) and replace your "Minimal" version with it.
Click to expand...
Click to collapse
After many tries i found that the command given is wrong
fastboot flash vbmeta --disable-verity --dsable-verification vbmeta.img
This is given
It will be
fastboot flash vbmeta --disable-verity --disable-verification vbmeta.img
I is Missing Now i have flashed vb meta and problem is solved with the fastboot version i have
By the way thanks

How To Guide Guide to root, convert rom from cn to global or else, fix Finger Print after root and Unbrick phone

I. Link to download rom
- Global version: https://help.redmagic.gg/hc/en-us/articles/5110059449113-REDMAGIC-7
- China version: https://ui.nubia.cn/rom/detail/72
II. File need to work (google for it pls)
1. Driver for adb and fastboot and install it on pc
2. Platform tool
3. Payload dumper
4. Magisk mask APK
III. Unpack rom to get require file
1. Download rom same with your version (CN or Global)
2. Using winrar or 7zip to unpack file rom to get payload.bin file
3. Using Payload dumper to dump payload.bin
4. After dumping u will get boot.img; recovery.img
IV.Unlock bootloader
1. Unlock developer mode on phone
2. Settings -> Developer Options -> OEM unlocking
3. Connect phone to PC
4. On PC using platform tool -> open CMD on folder platform tool
5. Using command:
adb reboot bootloader
fastboot flashing unlock
(accept unlocking voiding warranty, etc by pressing volume down and power)
V. Root
1. Require boot.img from step III and unlock bootloader from step IV
2. Copy boot.img file to phone
3. Install Magisk mask APK
4. Using Magisk mask to path boot.img file
5. After path u will get file path in download folder on your phone
6. Copy that path file from phone to pc paste it on platform tool folder
7. Rename file to boot.img
8. Open CMD on folder platform tool and using following command:
adb reboot bootloader
fastboot flash boot boot.img
VI. Convert rom from CN to Global or Global to CN
From Cn to Global should using Global version Asia (EU not testted)
U should wipe data before doing this
0. Connect phone to PC
1. Open CMD on adb folder
2. Command 1 by 1:
adb reboot bootloader
fastboot flash recovery recovery.img
( Flash recovery.img file unpack from rom
* if you want convert from CN to Global then flash recovery.img file of Global version rom
* if you want convert from Global to CN then flash recovery.img file of CN version rom)
3. After done command:
Fastboot reboot
*wait reboot done
adb reboot sideload
4. Copy rom file (*.zip) to platform tool folder rename it to rom.zip file (Copy version u want to flash)
adb sideload rom.zip
Waiting it done and reboot
VII. Unbrick phone
It only work if u can get fastboot mode
1. Flash recovery.img unpack from same version rom factory rom u phone using (CN using CN; Global using Global)
2. Go to recovery mode
3. Go to adb sideload mode
4. Flash rom with adb sideload (read step VI)
Waiting it done and pray it back to life again
VIII. Fix FingerPrint after root
1. Buy any calibrate tool u can get on your country (im using relife RL-071 tool)
2. On dial using code *#9959#
3. Press START
4. Then follow video
After recalibrate done u should reboot phone and check
I prefer u should wipe data to it work correct
It works! I have successfully rooted and recalibrated the fingerprint reader.

Categories

Resources