Tech/PocoM4.md
... ...
@@ -45,22 +45,49 @@ Adapted from https://forum.xda-developers.com/t/unlock-bootloader-redmi-note-11s
45 45
46 46
1. Root
47 47
- Install [mtkclient](https://github.com/bkerler/mtkclient)
48
- - On your phone activate developer mode (About phone → All specs → MIUI version)
48
+ - Activate developer mode (About phone → All specs → MIUI version)
49 49
- Turn on USB debugging and OEM unlocking
50
- - Turn off phone and disconnect from computer
51
- - In the directory where you installed mtkclient run:
50
+ - Turn off phone and disconnect
51
+ - Run:
52 52
- `mtk e metadata,userdata,md_udc`
53
- - This erases your data
54
- - At this point plug your phone in (still turned off)
53
+ - plug phone in (still turned off)
54
+ - phone detected: erases data
55 55
- `mtk da seccfg unlock`
56
- - This unlocks the bootloader
56
+ - unlocks bootloader
57 57
- `mtk reset`
58
- - This reboots the phone
58
+ - reboots
59 59
- Disconnect USB cable and reboot phone
60 60
- When it boots a message is displayed warning that dm-verity is corrupted. Click the power button to dismiss and continue booting.
61 61
62
-2. Source boot.img
63
- - Find your MIUI version in Settings -> About phone -> MIUI Version and look for the version number (e.g. 13.0.6.0(RKEEUXM))
64
- - 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)
65
- - Unzip the TGZ and the TAR that it contains then navigate to the images directory and find the boot.img file
62
+2. Extract boot.img
63
+
64
+ - from fastboot package:
65
+ - MIUI version in Settings -> About phone -> MIUI Version (e.g. 13.0.6.0(RKEMIXM))
66
+ - [MIUI Updates Tracker](https://forum.xda-developers.com/t/miui-updates-tracker-redmi-note-11s-4g-poco-m4-pro-4g-fleur.4428655/) get matching Stable Fastboot update
67
+ - Extract `vbmeta.img` _and_ `boot.img`
68
+
69
+ - or from [Recovery v13.0.10.0](https://bigota.d.miui.com/V13.0.10.0.RKEMIXM/miui_FLEURGlobal_V13.0.10.0.RKEMIXM_8853bc0f31_11.0.zip) archive:
70
+ ```
71
+ payload_dumper --partitions vbmeta,boot payload.bin
72
+ ```
73
+
74
+3. Patch boot.img
75
+
76
+Patch boot.img for root using Magisk.
77
+
78
+- Install [Magisk](https://github.com/topjohnwu/Magisk/releases/latest)
79
+- Copy `boot.img` to SD card
80
+- Magisk → install → patch a file (for each boot.img)
81
+- Copy patched boot image from Downloads (called `magisk_patched_*.img`) to SD Card
82
+
83
+4. Flash patched boot.img
84
+
85
+```
86
+adb reboot bootloader
87
+fastboot flash boot magisk_patched_*.img
88
+fastboot flash vbmeta --disable-verity --disable-verification vbmeta.img
89
+```
90
+
91
+# Updating
92
+https://topjohnwu.github.io/Magisk/ota.html
66 93