[Guide] Root for Redmi Note 9 - Mediatek (Helio G85)

Search This thread

boogaa

Member
Apr 9, 2021
9
0
Hi,
I was going to root my phone when I had a doubt about the vbmeta. Should the vbmeta.img be pached? if so how do we do it? What should we patch it with?
Because in the first post :
VBMETA Patched Image: essential to the process, this file has not been created by me. Courtesy of user Neko-kun from MI.cn Forum. I can only confirm that the file works as expected; please, if you have the required expertise, inspect the file and report your findings.
Thanks
 
Last edited:

TheMagnificent_Y

Senior Member
Feb 3, 2021
55
0

VD171

Senior Member
Jun 21, 2012
3,027
2
2,282
127.0.0.1
LG K10
Samsung Galaxy J7
Hey buddy, I don't recommend trusting provided vbmeta "patched" images.
Bees what you need to do:
1. Download the stock ROM for your device.
2. Open up platform tools by CD'ing into the right directory from "cmd"
3. Flash the stock vbmeta image with disable verification and verity flags.
The vbmeta is so simple, it can only do two things: allow the beginning of the boot, or not.
If you flash the stock vbmeta without disabled verity and disabled verification, your device will be bricked.
Vbmeta verifies if any partition has changed, if it was, then it reboots the device, causing a bootloop.
You really need to patch vbmeta if you want to apply changes to your device.
I patched the vbmeta images by myself, so I can say that's fully reliable and you can flash it without worries.
I will appreciate if you inspect my vbmeta patched images and then tell us what was the result.
 
  • Like
Reactions: RN9_G85

boogaa

Member
Apr 9, 2021
9
0
Thank you both for this additional information. I appreciate !
I extracted the vbmeta from the stock ROM and patched it with the correct flags. So easy ;)
Everything works !
 

TheMagnificent_Y

Senior Member
Feb 3, 2021
55
0
The vbmeta is so simple, it can only do two things: allow the beginning of the boot, or not.
If you flash the stock vbmeta without disabled verity and disabled verification, your device will be bricked.
Vbmeta verifies if any partition has changed, if it was, then it reboots the device, causing a bootloop.
You really need to patch vbmeta if you want to apply changes to your device.
I patched the vbmeta images by myself, so I can say that's fully reliable and you can flash it without worries.
I will appreciate if you inspect my vbmeta patched images and then tell us what was the result.
There isn't a way to "patch" a vbmeta image except modifying HEX values bit for bit (takes a very long time and is hard to do), so, It'd be easier to flash the stock image with disable verity and verification flags.

Plus I already mentioned that you need to flash it with the Disable verification and verity flags in my first reply.
 
Last edited:

VD171

Senior Member
Jun 21, 2012
3,027
2
2,282
127.0.0.1
LG K10
Samsung Galaxy J7
There isn't a way to "patch" a vbmeta image except modifying HEX values bit for bit (takes a very long time and is hard to do), so, It'd be easier to flash the stock image with disable verity and verification flags.

Plus I already mentioned that you need to flash it with the Disable verification and verity flags in my first reply.
Call it as you want, my friend.
I don't care.
 
  • Like
Reactions: RN9_G85

Untitled_neo

Member
Oct 17, 2020
13
3
Hi there! I have been trying to root my Redmi Note 9 4/128 (MIUI 12.0.7), but after reboot and factory reset (step 5) can not launchproperly Magisk app. I gor error while trying to reboot in Magisk. I followed all steps in the instruction. Can anybody help, plz?
494 E : unlock mmcblk0p34 failed with 13: Permission denied
This is from my log
Full Magisk log in the attch.
Thanks in advance!
 

Attachments

  • magisk_log.txt
    3.5 KB · Views: 8
Last edited:

VD171

Senior Member
Jun 21, 2012
3,027
2
2,282
127.0.0.1
LG K10
Samsung Galaxy J7
Hi there! I have been trying to root my Redmi Note 9 4/128 (MIUI 12.0.7), but after reboot and factory reset (step 5) can not launchproperly Magisk app. I gor error while trying to reboot in Magisk. I followed all steps in the instruction. Can anybody help, plz?
494 E : unlock mmcblk0p34 failed with 13: Permission denied
This is from my log
Full Magisk log in the attch.
Thanks in advance!
That error means the partitions will keep only as "read-only" and not as "read-write".
You can ignore that errors, because if you want to apply changes to any partition, you can do this using the SP FLASH TOOL.
If magisk app say you are NOT rooted, just attach the screenshot and we will try to help you.
 

Untitled_neo

Member
Oct 17, 2020
13
3
That error means the partitions will keep only as "read-only" and not as "read-write".
You can ignore that errors, because if you want to apply changes to any partition, you can do this using the SP FLASH TOOL.
If magisk app say you are NOT rooted, just attach the screenshot and we will try to help you.
Thank you for help. I can not do anything with my Magisk. It can not be updated and make other manipulation.
photo5472217355548471666.jpg
 

VD171

Senior Member
Jun 21, 2012
3,027
2
2,282
127.0.0.1
LG K10
Samsung Galaxy J7
Thank you for help. I can not do anything with my Magisk. It can not be updated and make other manipulation.
You can't install it directly.
As I said, you can't apply changes to any partition, if you want to modify any partition you need to flash it using FASTBOOT or SPFLASHTOOL.
Read the logs and fix your problem: "unable to extract file".
 
Last edited:
  • Like
Reactions: RN9_G85

Untitled_neo

Member
Oct 17, 2020
13
3
You can't install it directly.
As I said, you can't apply changes to any partition, if you want to modify any partition you need to flash it using FASTBOOT or SPFLASHTOOL.
Read the logs and fix your problem: "unable to extract file".
I followed all steps, but SafetyNet API gave me error. It gave superuser to a few apps, however I cannot modify system files (Total commander says - not enough memory). Sorry, I don`t kmpw what to do? What went wrong?
 

VD171

Senior Member
Jun 21, 2012
3,027
2
2,282
127.0.0.1
LG K10
Samsung Galaxy J7
  • Like
Reactions: RN9_G85

Top Liked Posts

  • There are no posts matching your filters.
  • 7
    Preamble:

    After a bit of research, I've found a simple way to - at least - obtain root privileges on the basic version of Redmi Note 9 (Mediatek - Helio G85).

    The procedure has been tested on a Redmi Note 9 Global NFC 4/128 (Model: M2003J15SG) with MIUI Global 11.0.5.

    The attached files comprise:

    • Original Boot Image from MIUI Global 11.0.5 (provided as a courtesy, download your own copy from MIUI Website if you wish)
    • Patched Boot Image from Magisk on MIUI Global 11.0.5 (again, the file provided as a courtesy; you can generate your own file, on your device.)
    • VBMETA Patched Image: essential to the process, this file has not been created by me. Courtesy of user Neko-kun from MI.cn Forum. I can only confirm that the file works as expected; please, if you have the required expertise, inspect the file and report your findings.

    Warning:

    This procedure depends on having previously unlocked the bootloader. Doing so you have read, understood and accepted all the information regarding security and potential stability issues given by XIAOMI before completing the procedure.
    Also, this means you have understood and accepted potential warranty issues arising from such procedure, and you understand the risks associated with a rooted device.
    I'm not responsible for any damage, loss of personal data, brick or loss of usability arising from following this procedure and/or from any user error committed by doing so.
    As a result, your warranty may be void, according to laws in effect in your state.


    This procedure is only valid for Redmi Note 9 (not the Pro version, not the 9S version) with MEDIATEK chipset


    Note:
    Always make a back-up of your data! This procedure will re-initialize the device.


    Requirements:

    • A valid MI Account, associated with the phone, used to certification in the bootloader unlocking procedure. (via official MI UNLOCK)
    • Unlocked Bootloader (new devices usually have a 7-day waiting period)
    • A personal computer with FASTBOOT installed, basic knowledge of FASTBOOT commands, drivers correctly installed on your system of choice. (for windows users, a valid solution is "Minimal ABD and Fastboot".)

    Resources:

    1. Magisk Manager
    2. Boot Image / Magisk Patched Boot Image / VBMeta Image - link or see attached files

    Procedure:

    1. Download the attached files (or generate the first two on your own device, using Magisk Manager).
    2. Copy the prepared files inside the fastboot directory (so you don't have to worry about file path in the following steps)
    3. Reboot the phone into Fastboot Mode (hold Power+Volume Down until fastboot screen)
    4. Connect the phone to the computer, open fastboot terminal and issue the following commands. BE PATIENT AND DOUBLE CHECK EVERYTHING BEFORE CONFIRMING! Text between round brackets are comments, it must not be copied.
      Code:
      fastboot devices (check your phone is the only device shown)
      fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img (this disables system changes)
      fastboot erase userdata (this will clear user data!)
      fastboot erase cache
      fastboot flash boot magisk_patched.img
      fastboot reboot
    5. The following first reboot will take a while. After completing the initial configuration, install the latest Magisk Manager (at the time of writing, v. 7.5.1) and continue with the configuration following the in-app prompt.
    6. Phone will reboot at the end of the procedure. Launch once again Magisk Manager, select the "Beta Channel" for updates and enable Magisk Hide.
    7. Reload Magisk Manager, check for Safety Net: you should have the green light.
    Enjoy your root privileges. (aka, get rid of the bloatware ;) )



    Known BUGs / LIMITATIONS:

    • Can't modify /system partition
    • Need to temporary set SELinux to permissive in order to remove system apps. Please refer to this post.
    5
    Removing "Bloatware"

    Probably one the main reasons for obtaining root privileges is to get rid of some default apps which come bundled with the official MIUI.

    Given the current situation for this device, using classic methods (such as Titanium Backup / System App Remover / etc.) is not possible and - most probably - attempting in doing so will result in a soft-brick.

    Instead, there is a particularly useful Magisk Module that can be used for this scope: Debloater.

    You can read more about it here on XDA; the installation procedure will vary just a bit since there is currently no TWRP support for the Helio G85 Redmi Note 9.


    Installing Debloater

    1. Launch Magisk Manager and select "Download" from the menu
    2. Use the search function to locate the package "Busybox for Android NDK"
    3. Install the package, and chose to skip the reboot at the end of the procedure.
    4. Use the search function to locate the package "Debloater Terminal Emulator"
    5. Install the package and this time proceed with the reboot
    6. When the reboot is complete, install any terminal emulator app from PlayStore (like Termux)
    7. Open the terminal and issue:
      Code:
      su
      (confirm the request for superuser access) and then
      Code:
      debloat


    Now you can use Debloat to remove all the unwanted applications that come bundled with the ROM.

    Please refer to the video included in the post mentioned above to learn more about Debloat and how to use it.
    3
    Tested on RN9 Global non-NFC (M2003J15SS) with MIUI 12 Global

    Hi, just to inform. The following was tested in Redmi Note 9 Global non-NFC (M2003J15SS) with MIUI 12 Global.

    - Patched boot image from MIUI12 Global (Android 10) works fine if dm-verity and forced encryption are disable at the time of making the boot image with magisk.

    - vbmeta file provided by OP also works (I think any file would work if it's flashed with "--disable-verity --disable-verification" option. This option is essential to avoid bootloop after flashing any non-stock (or patched) image to any partition:
    Code:
    fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img
    The vbmeta file I used was extracted (and possibly) edited from a previous version of MIUI (MIUI11), and applied over MIUI12 ROM, that's why I think any file could be used.
    2
    The download link in the first post does not work any longer ... Gives a 404. Please re-upload and don't use XDA's upload space. Thanks!

    Sorry for the inconvenience, there is still the MEGA link from the first post up and working.
    Here it is: https://mega.nz/file/ucFDXIaY#FrUllKuUASoStlSvrcMYABsbYv6ie-WHR4zOqJMdP4E
    2
    So my device is not rooted?
    You don't need to modify the system to root with magisk.
    Magisk is SYSTEMLESS.
    Attach the main screen of the Magisk app and let's see.