Xiaomi 13 Pro - Trying getting Root access by booting in magisk_patched-27000_xxx - failing


Hippa12345

Members
26 Apr 2021
40
20
Hi,
I have a Xiaomi 13 Pro EEA Version: 1.0.7.0.UMBEUXM

I wanna get Root acces by the method by doing extracting the Boot.img file from the ROM and patch it by Magisk.
But when I patch the original Boot.img of the ROM, I get a modified magisk_patched-2700_xxxx.img, what is correct.

Now my problem:
- When doing "fastboot boot magisk_patched_boot.img" to boot to the magisk_patched_boot.img
- Phone will boot into the phone
- Go into Magisk -> Install -> Direct Install (Recommended) -> Reboot ( I don't see this option.... I only see Install -> Choose patch file)

How to fix this>? Doing I something wrong?
 
Hi,
I have a Xiaomi 13 Pro EEA Version: 1.0.7.0.UMBEUXM

I wanna get Root acces by the method by doing extracting the Boot.img file from the ROM and patch it by Magisk.
But when I patch the original Boot.img of the ROM, I get a modified magisk_patched-2700_xxxx.img, what is correct.

Now my problem:
- When doing "fastboot boot magisk_patched_boot.img" to boot to the magisk_patched_boot.img
- Phone will boot into the phone
- Go into Magisk -> Install -> Direct Install (Recommended) -> Reboot ( I don't see this option.... I only see Install -> Choose patch file)

How to fix this>? Doing I something wrong?
You need to patch init_boot.img

Sent from my 2210132G using Tapatalk
 
  • Like
Reactions: Hippa12345
You need to patch init_boot.img

Sent from my 2210132G using Tapatalk
Ah I dindt know that.... How to extract the init_boot.img of the current OS that is being installed?

This was for the Boot.img ( dd if=/dev/block/bootdevice/by-name/boot of=/sdcard/boot.img)

Could you tell me where the boot.img is need it for then?
 
Ah I dindt know that.... How to extract the init_boot.img of the current OS that is being installed?

This was for the Boot.img ( dd if=/dev/block/bootdevice/by-name/boot of=/sdcard/boot.img)

Could you tell me where the boot.img is need it for then?
Not sure if this is what you are trying to do but init_boot is at

dd if=/dev/block/bootdevice/by-name/init_boot_a of=/sdcard/init_boot.img

Sent from my 2210132G using Tapatalk
 
Not sure if this is what you are trying to do but init_boot is at

dd if=/dev/block/bootdevice/by-name/init_boot_a of=/sdcard/init_boot.img

Sent from my 2210132G using Tapatalk
Thanks, Im gonna try it and let you know.
But can you tell me the difference between the init_boot.img and the Boot.img?
 
Thanks, Im gonna try it and let you know.
But can you tell me the difference between the init_boot.img and the Boot.img?
I'm gonna let google answer that for you as i'm not the most technical person in the world :D

Q: What is the difference between boot.img and init_boot.img file?

A:
Terms related to Android operating systems and their file systems include boot.img and init_boot.img. The generic boot structure with kernel and ramdisk details is contained in the boot.img file, whereas the generic boot structure with initialization bootloader is contained in the init_boot.img file.
 
  • Like
Reactions: Hippa12345
I'm gonna let google answer that for you as i'm not the most technical person in the world :D

Q: What is the difference between boot.img and init_boot.img file?

A:
Terms related to Android operating systems and their file systems include boot.img and init_boot.img. The generic boot structure with kernel and ramdisk details is contained in the boot.img file, whereas the generic boot structure with initialization bootloader is contained in the init_boot.img file.
How to extract the init_boot.img?

I use on PC CMD:

ls -la /dev/block/bootdevice/by-name

Result:
lrwxrwxrwx 1 root root 16 1970-01-02 01:42 init_boot_a -> /dev/block/sde30
lrwxrwxrwx 1 root root 16 1970-01-02 01:42 init_boot_b -> /dev/block/sde59

Then I use:

dd if=/dev/block/sde30 of=/sdcard/init_boot.img

Result:
nuwa:/ $ dd if=/dev/block/sde30 of=/sdcard/init_boot.img
dd: /dev/block/sde30: Permission denied
0+0 records in
0+0 records out
0 bytes (0 B) copied, 0.001 s, 0 B/s
1|nuwa:/ $
 
Last edited:
Not sure if this is what you are trying to do but init_boot is at

dd if=/dev/block/bootdevice/by-name/init_boot_a of=/sdcard/init_boot.img

Sent from my 2210132G using Tapatalk
C:\adb\platform-tools>adb shell
nuwa:/ $ dd if=/dev/block/bootdevice/by-name/init_boot_a of=/sdcard/init_boot.img
dd: /dev/block/bootdevice/by-name/init_boot_a: Permission denied
0+0 records in
0+0 records out
0 bytes (0 B) copied, 0.001 s, 0 B/s
1|nuwa:/ $
 
C:\adb\platform-tools>adb shell
nuwa:/ $ dd if=/dev/block/bootdevice/by-name/init_boot_a of=/sdcard/init_boot.img
dd: /dev/block/bootdevice/by-name/init_boot_a: Permission denied
0+0 records in
0+0 records out
0 bytes (0 B) copied, 0.001 s, 0 B/s
1|nuwa:/ $
You cannot extract it from the phone without root.
You need to get the IMG from the ROM installation zip.

We are clearly out of topic here as you don't seem to have a xiaomi.eu rom.

Search how to extract init_boot.img from your firmware zip file


Sent from my 2210132G using Tapatalk
 
You cannot extract it from the phone without root.
You need to get the IMG from the ROM installation zip.

We are clearly out of topic here as you don't seem to have a xiaomi.eu rom.

Search how to extract init_boot.img from your firmware zip file


Sent from my 2210132G using Tapatalk
That's my whole point.
I want to extract the current init_boot.img of the phone that's sit on WITHOUT having the Recovery or fastboot or ROM file of the phone.
How can I succeed to extract the init_boot.img from my phone OR with a PC, WITHOUT having the recovery or fastboot.img?
 
That's my whole point.
I want to extract the current init_boot.img of the phone that's sit on WITHOUT having the Recovery or fastboot or ROM file of the phone.
How can I succeed to extract the init_boot.img from my phone OR with a PC, WITHOUT having the recovery or fastboot.img?
You cannot unless you have root.
But as I said you can download the ROM that you have on your phone from miui official website and extract boot_init from there

Sent from my 2210132G using Tapatalk
 
Hi,
I have a Xiaomi 13 Pro EEA Version: 1.0.7.0.UMBEUXM

I wanna get Root acces by the method by doing extracting the Boot.img file from the ROM and patch it by Magisk.
But when I patch the original Boot.img of the ROM, I get a modified magisk_patched-2700_xxxx.img, what is correct.

Now my problem:
- When doing "fastboot boot magisk_patched_boot.img" to boot to the magisk_patched_boot.img
- Phone will boot into the phone
- Go into Magisk -> Install -> Direct Install (Recommended) -> Reboot ( I don't see this option.... I only see Install -> Choose patch file)

How to fix this>? Doing I something wrong?

You can use the twrp to install magisk, then you can root the phone without having to find the boot.img.




How to flash third-party recovery:
The following method is applicable to the official TWRP recovery (only .img suffix file). The general package for private modifications comes with flashing tools and methods.

1. First connect the phone to the computer to install the driver (if the installation fails, you can download MiFlash and install it manually). Also make sure the phone is BL unlocked.

2. Download the Fastboot tool (unzip for later use) and the corresponding model TWRP (.img suffix file, put it into the folder you unzipped earlier) on your computer.

3. Turn off the phone, long press the power button + volume down button to enter fastboot mode, and connect to the computer.

4. Open the platform-tools folder you just unzipped on your computer, hold down the Shift key, and right-click on a blank space in the folder. Click "Open Powershell window here" in the right-click menu, and run the following command to flash TWRP (replace the file name yourself) ).

.\fastboot flash recovery twrp-3.4.0-0-davinci.img
Note: If you do not want to install TWRP, but only use TWRP temporarily, run the following command (replace the file name yourself) and ignore step 5.

.\fastboot boot twrp-3.4.0-0-davinci.img
If you cannot start TWRP after running the command and remain stuck at the startup interface, there may be a problem with the TWRP version adaptation. You can try using a third-party version.

5. To prevent MIUI from automatically replacing the official Recovery when you restart your phone, press and hold the volume up button on your phone while running the following command on your computer to restart your phone until you enter the TWRP interface.

.\fastboot reboot
6. After entering TWRP, you will be asked "Do you want to keep the system partition as read-only". Slide the button here to allow modification, otherwise MIUI cannot be prohibited from being replaced back to the official Recovery.





7. Since MIUI will check the integrity of the System partition during startup, TWRP modified the System partition in the previous step. At this time, restarting the phone will cause the system to fail to start ("Cami" problem). You need to remove the startup verification by flashing Magisk. The steps are as follows .

Download the Magisk installation package on the computer and copy it to the mobile phone (at this time the computer can recognize the mobile phone MTP device);

Click "Install" on the TWRP interface, find the Magisk installation package you downloaded, click on the file name, and slide the button to flash it;

Wait for the Magisk flashing to complete, click "Restart System", then there will be no "Cami" problem, and restarting the phone will not lose the TWRP installation;



Since Magisk is installed, you will see a Magisk Manager software after starting the system. It is Magisk graphics management software with built-in Root function, and you can also expand more gameplay by installing function modules.

Since the System partition has been modified in the previous operation, you need to pay attention to the subsequent update of the MIUI original system (turn off automatic system updates). Before updating the system, open the Magisk Manager software, click "Uninstall Magisk", select "Restore Original Image", and then update the system. Reinstall TWRP and Magisk after updating.
 
Now my problem:
- When doing "fastboot boot magisk_patched_boot.img" to boot to the magisk_patched_boot.img
- Phone will boot into the phone
- Go into Magisk -> Install -> Direct Install (Recommended) -> Reboot ( I don't see this option.... I only see Install -> Choose patch file)

How to fix this>? Doing I something wrong?
I think you've got something substantially wrong here.

You're currently trying to boot the patched boot.img. that doesn't work which is why the phone just boots normally.

What you want to do is flash the patched boot.img to the boot slot. To do so, use the command "fastboot flash boot magisk_patched_boot.img". Then just restart the phone with "fastboot reboot" and you should see the options in magisk app.

If that does not work, repeat the patching process with the init_boot.img and flash it with "fastboot flash init_boot magisk_patched_init_boot.img".