Temporary TRPW Recovery and working permanent ROOT for [zircon]


StratOS1

Members
Mar 30, 2024
41
20
[EDIT] Added od 1.5.2024 only for HyperOS, Root without flashing non usefull recovery !

ROOT For HyperOS :

Step1=Download the hyperos firmware which you are currently using
Step2= Extract the ROM
Step3=Open Extracted Folder / Images Folder
Step4=Find init_boot.img and copy it to the internal storage
Step5=Patch the copied init_boot.img in Magisk
Step6=Move the patched init_boot.img to pc and open Platform tool folder (cmd prompt)
Step7=Enable USB Debugging from Developer Option then switch off the device and put the device into fastboot mode(press power +volume down button)
Step8= After pc detect the device , type this command
fastboot flash init_boot_ab patchedmagiskfile
Step9=Reboot the device
Step10=Open Magisk (if the required additional setup promp come , click on ok and reboot the device)

Root Sucessfully installed

Active magisk "root" is gained by patched init_boot and further on by magisk persist.img ... !
Root can be also obtained by apatch by our device !

[/EDIT]

Greetings.
Since Device Tree for zircon is still not available and MTK Dimensity 7200 Ultra is a pain in the ass,
I'm looking forward for working kernel based recovery, specialy the DEV's if any1 is willing to work on it.

Current RECOVERY for MIUI 13 and MIUI 14 are not fully compatible with the device.

Looking forward for possible feedback about the script and feedback about recovery build.
Thx.

I have made a script to instal temporary recovery based on TRPW 3.7.1_12, gain temp root (sideload magisk) and
gain permanent root with original recovery restored !

Follow exactly the script step by step !
Run self extracting 7zip exe file in directory and Run the Flash.bat.

Tested on [zircon]:
Global EEA MIUI 14.0.7.0.
HyperOS 1.0.1.0.UNOMIXM [After adding correct images for HyperOS] !




Since recovery is from CN, you have to change the default language as written on the script :

And the next thing is to gain temp root and permanent root and make the default recovery back.

Start.jpg Screenshot_2024-04-10-13-51-51-941_com.topjohnwu.magisk.jpg Screenshot_2024-04-10-13-52-30-009_com.topjohnwu.magisk.jpg Screenshot_2024-04-10-13-55-42-216_com.topjohnwu.magisk.jpg Screenshot_2024-04-10-14-08-23-355_flar2.devcheck.jpg Screenshot_2024-04-10-16-47-10-734_com.joeykrim.rootcheck.jpg ID.jpg
 
Last edited:

Attachments

  • 1712951028024.jpg
    1712951028024.jpg
    236.1 KB · Views: 331
  • 1712951028021.jpg
    1712951028021.jpg
    425 KB · Views: 334
  • 1712951028019.jpg
    1712951028019.jpg
    383.5 KB · Views: 320
  • 1712951028030.jpg
    1712951028030.jpg
    608.3 KB · Views: 330
  • Like
Reactions: StratOS1
I have followed the script but I get stuck on this, the phone is back in recovery after reboot and it does not detect it or somthing :(




1713020148886.png



when I reboot into system i just get bootloop and it I reboot to fastboot I get this and still stuck on bootloop
1713020431610.png

when I press any key to continue it closes down the script and I am stuck in bootloop
 
think I found out why this is happening adb is not finding my phone for some reason

1713025435957.png

( I got the adb to work but still got stuck on sideloading ) currently flashing ofw to try from scratch..
 
Last edited:
Initial is from the working mode of the phone !
ADB mode, fastboot mode or recovery mode are different modes !

Read the script exactly. You allread have a problem with avb verification.
The problem is to enter MANUALLY in recovery !

If you mess with recovery the phone will get to bootloop and no recovery or fastboot avaialble. Hard Brick.
After the fully compatible TWRP there will be no problems for it.


The fix in fastboot mode :
patch the ROM original recovery and ROM original boot image
fastboot oem cdms
fastboot reboot
 
Initial is from the working mode of the phone !
ADB mode, fastboot mode or recovery mode are different modes !

Read the script exactly. You allread have a problem with avb verification.
The problem is to enter MANUALLY in recovery !

If you mess with recovery the phone will get to bootloop and no recovery or fastboot avaialble. Hard Brick.
After the fully compatible TWRP there will be no problems for it.


The fix in fastboot mode :
patch the ROM original recovery and ROM original boot image
fastboot oem cdms
fastboot reboot
I have read the script multible times and you have the same avb verification error, I did enter the recovery manually, but nothing happens unless I boot to fastboot then the script goes on and installs recovery for miui 14 but I need HyperOs Recovery unless the phone will not boot. Sorry for my noob questions

Now I got the script to flash the HyperOs Recovery but I have no Idea how to flash the boot image
 
Last edited:
1713038328094.png

1713038363020.png

1713038770327.png

I replaced the vendor_boot.img with the original vendor_boot.img and got the HyperOs Recovery working.
but I have no luck flashing the original boot.img ( do I need to have already made a pached boot.img in magisk before running the script mabe?)
I am giving up for the night.
 
before I did anything
I started on fresh ofw of hyperos and enabled usb debugging.
installed magisk.apk and pached boot.img,
flashed the pached magisk boot.img using fastboot. rebooted to system made sure usb debugging was on and ran the script
1713046339643.png

1713046635718.png

after this I shut down the phone and rebooted to HyperOs recovery and wiped data,
rebooted to system and opend magisk that prompted me to install
after rebboot I did the same open magisk was prompted to install pressed install (Direct )
Reboot then it worked
1713047771868.png
1713047802223.png
1713048069927.png

(I may have done somthing I am not writing down here, I have been trying this all day and culd have forgott somthing)

The Script does work on HyperOS 1.0.1.0.UNOMIXM with a little tinkering thank you @StratOS1 for providing it :)
 
The recovery is just based to sideload the magisk.zip in boot and after boot to gain full root.
Since recovery is not fully compatible, I have replaced it with stock.

In the default recovery the sideload function doesn't work !

In TWRP you should wipe userdata then sideload magisk.zip !

After the fully workable TWRP (mounts), I will rearange the things,
 
The recovery is just based to sideload the magisk.zip in boot and after boot to gain full root.
Since recovery is not fully compatible, I have replaced it with stock.

In the default recovery the sideload function doesn't work !

In TWRP you should wipe userdata then sideload magisk.zip !

After the fully workable TWRP (mounts), I will rearange the things,
I know sideload function doesn't work on default recovery.
the problem for me was when the script flashed the "default recovery" it flashed recovery for MIUI 14 and didn't boot
I needed Recovery For HyperOS that I got from the HyperOS 1.0.1.0.UNOMIXM img and replaced in the script folder.
anyways I just wanted to leave this here for other people having trouble. Thanks for me :)
 
Nope, but how will you patch and install magic inside ?
Original recovery (MIUI) does not have a sideload option in recovery.
Where would you flash / sideload or install to patch the system with magisk - Recovery that is (A working one !).
 
I know sideload function doesn't work on default recovery.
the problem for me was when the script flashed the "default recovery" it flashed recovery for MIUI 14 and didn't boot
I needed Recovery For HyperOS that I got from the HyperOS 1.0.1.0.UNOMIXM img and replaced in the script folder.
anyways I just wanted to leave this here for other people having trouble. Thanks for me :)
That has not been told. Read my scripts. For this you'll have to patch the original images from the HyperOS. Sure !

Nope, but how will you patch and install magic inside ?
Original recovery (MIUI) does not have a sideload option in recovery.

Where would you flash / sideload or install to patch and install temporary root at pre init for the the super /system with magisk - Recovery that is (A working one !).
Also sideload is not incorporated in fastboot/fastbootd mode, some functions from adb are, but still there is a workground to be done for this.

After a stable and fully working custom recovery for both OS and android, things will be different.
 
Last edited:
That has not been told. Read my scripts. For this you'll have to patch the original images from the HyperOS. Sure !

Nope, but how will you patch and install magic inside ?
Original recovery (MIUI) does not have a sideload option in recovery.

Where would you flash / sideload or install to patch and install temporary root at pre init for the the super /system with magisk - Recovery that is (A working one !).
Also sideload is not incorporated in fastboot/fastbootd mode, some functions from adb are, but still there is a workground to be done for this.

After a stable and fully working custom recovery for both OS and android, things will be different.
You are just misunderstanding what I am saying.
I went though your script loaded twpr and sideloaded magisk from there (im not saying am trying to sideload from Original recovery (MIUI),
when the script restores the Original recovery (MIUI) it flashes the MIUI Recovery 5.0 but HyperOS needs HyperOS Recovery.
Anyways. There is no need for you to talk to me like I know nothing and be rude!!!
gl with your script and maybe try flashing HyperOS on your phone and try it for your self, then you mb can understand what I am talking about. I have no reason to keep coming back to this, my problem is solved I have fully rooted HyperOS and TWRP Recovery somehow, and all my banking apps and everything works. Thanks again
 
You are just misunderstanding what I am saying.
I went though your script loaded twpr and sideloaded magisk from there (im not saying am trying to sideload from Original recovery (MIUI),
when the script restores the Original recovery (MIUI) it flashes the MIUI Recovery 5.0 but HyperOS needs HyperOS Recovery.
Anyways. There is no need for you to talk to me like I know nothing and be rude!!!
gl with your script and maybe try flashing HyperOS on your phone and try it for your self, then you mb can understand what I am talking about. I have no reason to keep coming back to this, my problem is solved I have fully rooted HyperOS and TWRP Recovery somehow, and all my banking apps and everything works. Thanks again
There is a lot of missanderstanding, we don't talk about the same thing.

MIUI and HyperOS are different. Also boot images, recoveries, how to gain root ...
This is for very problematic MIUI. (14.0.x) x=2

But I'm glad you fix it and everything works out good for you and we got some good feedback, but anyway we must speak for the same matter.
THX for your feedback !

HyperOS boot can be patched and flashed in fastboot with patched magisk, while some versions of MIUI are not possible !

Some version of MIUI were unable to be patch by magisk (init_boot).

Magisk Error.jpg

That is why I used the TWRP for sideload only for magisk,zip, After init magisk itselves can bring full root.

Not the init_boot were unable to patch, because the boot ramdisk has the invalid cpio magic and there is a raw ASN1.DER (certificate involved) and also vbmeta AVB is somekind strange. It's for the global MIUI ROM's.

The new version of twrp is out so guess there will be no problems with it.

Hope now we know what I've been talking about, don't worry ...
A lot of zircon phones went in forewer bootloop just because of this problem.
Currently no help to flash out, Only full UFS flash can make a good resoult.
MTK 6886 is a pain in the ass ...

Regards !
 
Last edited:
  • Like
Reactions: biggif89
I was able to flash root HyperOS 1.0.1.0.UNOMIXM on my zircon after many attempts, with the following actions:

- (Flashed original HyperOS 1.0.1.0.UNOMIXM via fastboot)
- Extract the .tgz file and pick out the vendor_boot.img and the vbmeta.img. I renamed them to hyperos_orig_vendor_boot.img and hyperos_orig_vbmeta.img
- Setup, enable USB debugging, reboot to fastboot
- Use the script from this thread (we will use only parts of it) or alternatively use the commands directly:

Phone is in fastboot:

fastboot flash --disable-verity --disable-verification vbmeta_ab vbmeta.img 2>&1 fastboot flash vendor_boot_ab vendor_boot_A14.img 2>&1 fastboot reboot recovery

Now in the menu, change the language as per the script:

Since recovery is from CN, you have to change the default language to prefered one.
Click the button on 2 nd row and 3th coloumn.
Click on the button.
Select the globe on top right menu and select the prefered language.
Click on the lower button to set prefered language.


Now the issue I had was that /data was not mounted. Do the following:

- In TWRP check if /data is mounted in "Mounts"
- If not, go to TWRP -> Wipe -> Advanced Wipe
- Select Data and go to Repair or Change File System.
- Try Repairing
- If it fails, Change File System
- Change to ext2 and confirm
- Now change to ext4 and confirm
- Now in TWRP -> Mounts, check if data is mounted
- Continue with sideload by TWRP -> Advanced -> ADB Sideload

adb sideload Magisk.zip

Now, if you're using the script, Ctrl+C it.

- After rebooting, I had a bootloop, this is how I fixed it
- Reboot into fastboot
- Install original vbmeta and vendor_boot.img
fastboot flash vendor_boot_ab hyperos_orig_vendor_boot.img fastboot flash vbmeta_ab hyperos_orig_vbmeta.img

- Reboot into recovery (not System)
- Wipe data via recovery menu
- Restart and set up phone
- Download Magisk app
- Install (direct) and Reboot
- Open Magisk app and Install again
- Reboot

Done :)
Hope this helps someone out, it took me ages to get it working.
 
Hi follwoing your method after getting mi logo stuck in bootloop, where can i find these files
fastboot flash vendor_boot_ab hyperos_orig_vendor_boot.imgfastboot flash vbmeta_ab hyperos_orig_vbmeta.img
Is there a way you could send those to me.