Relock bootloader on LOS microG - OnePlus 3 Questions & Answers

Hello all
I desperately try to relock my bootloader but failed many times and I am shortly before giving up. I was once on a locked bootloader on LOS but camera didn't work. (Couldn't reproduce)
Maybe you see something I missed out / didn't understand.
The main reason is, that some apps like ebanking check the state of the bootloader. And they also don't go through Securenet because of huawei.
So what I tried with this setup:
sign both boot.img and twrp.img with BootSignature.jar using own private key
Twrp Using: twrp-3.5.2_9-0-oneplus3
boot img from:
lineage-17.1-20210330-microG-oneplus3
lineage-18.1-20210403-microG-oneplus3
With firmware: oxygenos-9.0.6-firmware-3 from https://github.com/nvertigo/firmware-3t/tree/master/archive/op3
Mostly I got the ideas from https://forum.xda-developers.com/t/device-forum-rules-please-read-before-posting.3333345/
And what I do is this:
Using fastboot flash signed recovery
boot into recovery
whipe everything (is this needed every time?), data, factory reset, all partitions except internal & usb
reboot into recovery
sideload lineageos with signed boot.img inside
fastboot oem unlock => directly restarts after 'yes'
boot into LOS
fastboot oem unlock => directly restarts after 'yes' again
Do you see something I do wrong? Should I use other versions/files?
Hope to find a way
Edit: Also I can go back to stock where it gets locked again using the latest OnePlus3_16_A.86_191104_repack.

Related

They found a fix for Nougat bricked phones in N6 thread!

As title says, but we need a working backup. Mine is broken, can someone upload a working one, plz?
This is the howto:
1. Flash a stock image (I used the August stock image MTC20F)
2. Fastboot flash TWRP 3.0.2-0
3. Boot into TWRP
4. Select Wipe -> Advanced Wipe -> Select and repair each partition individually (some won't be able to, and that's fine, just move on to the next one)
5. Restore a full nandroid backup (make sure everything is selected) and reboot
6. You should now be free of the never ending boots, and if your device is bootlooped at this point (stuck at the boot animation), you can just flash stock again.
Thanks for this solution. But I have a problem because after installing the rom file .tot have a locked bootloader, and at this moment I can not do flash twrp.
In order to unlock the bootloader command "fastboot oem unlock" I get the answer that it is not possible. NTR it can not unlock it.
Goes some way to upload twrp with a locked bootloader or a way to unlock?
Danielf85 said:
Thanks for this solution. But I have a problem because after installing the rom file .tot have a locked bootloader, and at this moment I can not do flash twrp.
In order to unlock the bootloader command "fastboot oem unlock" I get the answer that it is not possible. NTR it can not unlock it.
Goes some way to upload twrp with a locked bootloader or a way to unlock?
Click to expand...
Click to collapse
My bootloader is locked, too. The only way to write to the phone seems to be via download mode, but flashing LGH790AT-00-V10f-NXS-XXX-OCT-03-2015-32G-MDA89E-US.tot doesn't work...
To install twrp we need to unlock the bootloader.
However, when the command "fastboot oem unlock" system gives the answer
FAILED (remote: oem unlock is not allowed)
Then how to unlock?
Danielf85 said:
To install twrp we need to unlock the bootloader.
However, when the command "fastboot oem unlock" system gives the answer
FAILED (remote: oem unlock is not allowed)
Then how to unlock?
Click to expand...
Click to collapse
There's really nothing you can do to force an unlock. If you can adb sideload a full OTA zip (say for 7.0) from Google and get that to boot up, that's pretty much your best bet.
Sent from my Nexus 5X using Tapatalk
I mean, the new unlock command is:
fastboot flashing unlock
oc2 said:
I mean, the new unlock command is:
fastboot flashing unlock
Click to expand...
Click to collapse
On Nexus 5X both commands can be used (oem unlock and flashing unlock)
I followed all the steps except I can't boot to recovery...when I try (manually via ADB or automatically using Wug's tool) it just goes back into the bootloop. I can't even boot temporarily to recovery (without flashing). I'm getting close to throwing in the towel...
Did not work for me, sadly
Edit: Here's how I managed to fix the problem
1. Moved Nandroid backup to PC.
2. Download factory image MTC20F from https://developers.google.com/android/nexus/images.
3. Install factory image (This will erase all data on your phone so move your files to your PC).
4. Install TWRP 3.0.2-0 from https://dl.twrp.me/bullhead/twrp-3.0...lhead.img.html via fastboot.
5. Go in TWRP>Wipe>Advanced Wipe and repair all partitions that can be repaired (System, Data, Cache).
6. Restore Nandroid backup.
7. Success.
Hope it works for other people too, cheers
Anyone in Portland Oregon and want to take a crack at unbricking my 5x? LG gave me an RMA, but given it's not a hardware issue, I'm thinking it will be a waste of time to send it in -- I'm worried they'll just say "all your hardware is fine". Happy to buy drinks or pay a bit if someone can get me up and running.

Nexus 7 - 2nd gen: update failed to Lollipop 5.1

HI everyone,
I updated "successfully" from Kitkat to 5.0.2 on my rooted (stock ROM) Nexus 7 second gen.
Unfortunately, when I tried to upgrade to 5.1 everything seem to be normal until the device rebooted and it went through the "update process". 3/4 the way through, the green droid went on his back and the "ERROR" message appeared.
I wiped the cache partition but that doesn't help. I tried to download the update in safe mode, but no success. I also find it odd that each time I reboot my device, I get a message from Android that it is "updating my apps".
If I didn't have any apps and a lot of data on my Nexus, I would wipe the device clean but I'd rather avoid this, if at all possible.
Is there a way to upgrade to 5.1 or reinstall 5.0.2 without losing everything?
Thanks
Michael Carleone said:
Is there a way to upgrade to 5.1 or reinstall 5.0.2 without losing everything?
Click to expand...
Click to collapse
No problem. As you rooted it before then presumably it is unlocked and equipped with custom recovery, so all you have to do is:
boot TWRP
connect PC
transfer data and APKs to PC
flash OS
If you don't have TWRP installed, then boot it like this fastboot boot twrp-3.0.2-0-flo.img
k23m said:
No problem. As you rooted it before then presumably it is unlocked and equipped with custom recovery, so all you have to do is:
boot TWRP
connect PC
transfer data and APKs to PC
flash OS
If you don't have TWRP installed, then boot it like this fastboot boot twrp-3.0.2-0-flo.img
Click to expand...
Click to collapse
Hi,
Thanks for the reply. I rooted with Kingroot. I don't believe I have a custom recovery. The bootloader is locked as shown when I boot into recovery mode.
I want to avoid transferring my data and APK files to my PC.
Should I assume there is no way of reinstalling the OS without wiping out the device?Also, there is no link in the above quote: fastboot boot twrp-3.0.2-0-flo.img
Since I got no other replies, I went and restored to factory image. I do have another question. I hope I get a better response there: http://forum.xda-developers.com/nex...a/nexus-7-2013-wifi-root-marshmallow-t3515072
Thanks for the reply.
Can we compare using fastboot flashing TWRP vs Nexus Root Tool Kit: http://www.wugfresh.com/nrt/? I ended up using this utility instead because it was pretty much one click and it didn't require command lines and for whatever reason, I found instructions using fastboot a bit confusing. Which method is better or has more advantages? I left my bootloader unlocked.
Incidentally, I think there was something wrong with my Nexus image. As a result, I did use Google's instructions on how to flash etc. the OEM image. Instructions weren't ideal but I managed to figure things out: https://developers.google.com/android/images
The instructions are here which I assume would be similar if I wanted to fastboot TWRP?
To flash a system image:
Download the appropriate system image for your device below, then unzip it to a safe directory.
Connect your device to your computer over USB.
Start the device in fastboot mode with one of the following methods:
Using the adb tool: With the device powered on, execute:
adb reboot bootloader
Using a key combo: Turn the device off, then turn it on and immediately hold down the relevant key combination for your device. For example, to put a Nexus 5 ("hammerhead") into fastboot mode, press and hold Volume Up + Volume Down + Power as the device begins booting up.
If necessary, unlock the device's bootloader by running:
fastboot flashing unlock
or, for older devices, run:
fastboot oem unlock
The target device will show you a confirmation screen. (This erases all data on the target device.)
Open a terminal and navigate to the unzipped system image directory.
Execute the flash-all script. This script installs the necessary bootloader, baseband firmware(s), and operating system.
Once the script finishes, your device reboots. You should now lock the bootloader for security:
Start the device in fastboot mode again, as described above.
Execute:
fastboot flashing lock
or, for older devices, run:
fastboot oem lock
Locking bootloader will wipe the data on some devices. After locking the bootloader, if you want to flash the device again, you must run fastboot oem unlock again, which will wipe the data.
Click to expand...
Click to collapse
Also, I could've sworn that when I rooted KitKat on my Nexus, my data wasn't wiped out. I don't recall doing anything to the bootloader. I can't recall which method I used, but I know for certain I didn't use the Nexus Root Toolkit. I should've recorded my steps when I rooted.
i rooted my nexus 7 using towel root on kitkat .. i unrooted using supersu... and ota untill marhsmallow with out a problem never use kingroot as its so un stable.

Help me please :( LineageOS bricked my phone :(

Hello guys
I have a problem
Description:
I have ZUK Z2 and its great phone. I installed latest LineageOS ROM which have OTA updates and yesterday prompt a comunicate that I can update my phone so i clicked to upgrade. But then system is not launching and there is only twrp mode so it's bricked i tried to restore my phone with method described here but it did't work :/ QFIL says" Download Fail: Sahara Fail: QSahara Server Fail: Name of directory is invaid (last one I translated because it was written in my native language). I checked FAQ and i restarted my computer and phone, i changed name of directory to ZUK and it still doesn't work :/ Then I found that ulocked bootloader may be a problem so I tried to lock it but it doesn't work either :/ i wrote adb reboot bootloader and my phone runs fastboot mode but command "fastboot oem lock" don't work, it says only "waiting for device" and nothing happenes :/
Could you help me to unbrick my phone? i'm very desperate
Since you can enter the recovery mode go to mainscreen of twrp, wipe system, data, dalvik etc (but do not wipe internal storage!!!) and then install again lineage, google apps, and addon superuser (in case you want root)...
Regarding QFIL method. I have flashed twice the ZUK orginal software with unlocked bootlader and the bootlader remains unlocked also after the flash. I guess you cannot flash with QFIL and you get the Sahara notice because it is either:
+ you have installed the wrong ZUK drivers or
+ the rom folder name is too long or it is something else.
QFIL method will wipe your entire phone though. So i would try first to wipe with twrp and if it does not work then try QFIL.
Modest Mind said:
Since you can enter the recovery mode go to mainscreen of twrp, wipe system, data, dalvik etc (but do not wipe internal storage!!!) and then install again lineage, google apps, and addon superuser (in case you want root)...
Regarding QFIL method. I have flashed twice the ZUK orginal software with unlocked bootlader and the bootlader remains unlocked also after the flash. I guess you cannot flash with QFIL and you get the Sahara notice because it is either:
+ you have installed the wrong ZUK drivers or
+ the rom folder name is too long or it is something else.
QFIL method will wipe your entire phone though. So i would try first to wipe with twrp and if it does not work then try QFIL.
Click to expand...
Click to collapse
I tried to flash ROMs via twrp like you wrote but still only TWRP starts and nothing else happens :/
Hi, what if I cannot get the the phone connected to CFIL? It always starts into twrp as soon as the phone is connected to the PC and it doesnt matter what buttons I keeped pressed.....
You wrote it wrong, when you try fastboot you need to use "fastboot -i 0x2b4c" otherwise it judt wont work and will always showing "waiting for device" hope you can get futher now.
Sorry, I dont got your point...
Hi
Head for zukfans.eu
Theres a thread and plenty of guides
Yes, there are guides but no one works for me so I came here for help :/ i'm desperate and i don't know what to do now :/
Are you able to boot into twrp? If yes, then wipe system, data, cache and flash rom again. If not, then boot into fastboot mode by holding down both volume button and connect your phone to PC. Once you're in the fastboot mode you have to flash recovery using the
Code:
fastboot -i 0x2b4c flash recovery <recoveryname.img>
, after flashing boot into recovery and allow for system modifications if a dialogue pops up and flash any custom rom with latest gapps (but you still need to wipe system and data) .
This worked for me on the advice of one of the users at zukfans:
Go to TWRP recovery terminal commands, and enter the following:
dd if=/dev/zero of=/dev/block/platform/soc/7464900.sdhci/by-name/misc
Modest Mind said:
Regarding QFIL method. I have flashed twice the ZUK orginal software with unlocked bootlader and the bootlader remains unlocked also after the flash.
Click to expand...
Click to collapse
even after flashing chinese 1.9.044 with QFIL?

NO RPMB (how to install TWRP, a new ROM and using Magisk)

Hello, I have sent my phone to warranty and after that I received a phone with NO RPMB and after many frustrations I found (with help of many users and forums) how to workaround this..
To start:
Download boot image from here
Download twrp from the official website
Change the name to boot.img and twrp.img and put it in the platform-tools folder
Open the terminal there
Download your favourite rom
Enter fastboot mode on your phone
!!!!After this you will loose all of your data!!!!
Paste this to the terminal
fastboot oem unlock
(select yes on your phone)
fastboot flash boot boot.img
fastboot flash recovery twrp.img
fastboot format userdata
fastboot format cache
Reboot to recovery (if it doesn't enter at the first time enter download mode again and restart to recovery)
After that you have twrp and can flash every rom.. yay!!!
Wipe everything.
Copy the rom zip to your phone using MTP
Install your fancy new rom
If you want to install magisk:
Install the magisk manager.
On the app select install and select patch image file. (it will create a new boot image already patched)
After that install the new image (patched_boot.img) using twrp
Do a clean instalation of your ROM (recomended) or a Factory Reset first
Reboot to twrp
Select install
Click in install image
Select patched_boot.img
Select install to boot partition
Reboot.
Install magisk manager and do the sugested setup.
You now have magisk working
Thanks to all the users that helped me!!
I had real trouble getting twrp to work the last time I tried this a few months ago. Followed the steps here and am now on pixel experience with magisk. Thanks!
Hello, im in the same situation of NO RPMB. This procedure will permanently lets have bootloader unlocked?
About Magisk, i can install it in usual way once im in the recovery? (I mean download latest stable version for Bullhead and flash via TWRP).
Thanks.
sigibian said:
Hello, im in the same situation of NO RPMB. This procedure will permanently lets have bootloader unlocked?
About Magisk, i can install it in usual way once im in the recovery? (I mean download latest stable version for Bullhead and flash via TWRP).
Thanks.
Click to expand...
Click to collapse
My bootloader is still unlocked after following this guide
For Magisk:
-Install your custom ROM and boot it up (without root)
-Then extract the boot.img from the ROM zip file and save it on your phone storage.
-Install the Magisk manager apk
-In Magisk manager, select install Magisk> choose the patch boot image option and -Select the boot.img you previously saved.
Once it's done, reboot into twrp and flash the patched boot.img. When you reboot Magisk will be working.
I've had no issues with my bootloader, even after an ota update for pixel experience.
Thank you, i will try it.
Another question. I never tried dowload mode before, as i read in other post i should Plug USB cable into pc, Hold volume up and power at the same time and plug phone into usb that's already connected to pc, right?
When in download mode i can fire up fastboot commands like im in bootloader mode?
So then after do last command fastboot format cache i can reboot to recovery from terminal using adb reboot recovery or i can / should do it from device?
About twrp it's ok to use the latest 3.2.3.0 official version or the 3.2.1 4core version from here as someone suggested from Reddit? https://forum.xda-developers.com/nexus-5x/development/recovery-twrp-3-2-1-4-core-t3796656
sigibian said:
Thank you, i will try it.
Another question. I never tried dowload mode before, as i read in other post i should Plug USB cable into pc, Hold volume up and power at the same time and plug phone into usb that's already connected to pc, right?
When in download mode i can fire up fastboot commands like im in bootloader mode?
So then after do last command fastboot format cache i can reboot to recovery from terminal using adb reboot recovery or i can / should do it from device?
About twrp it's ok to use the latest 3.2.3.0 official version or the 3.2.1 4core version from here as someone suggested from Reddit? https://forum.xda-developers.com/nexus-5x/development/recovery-twrp-3-2-1-4-core-t3796656
Click to expand...
Click to collapse
The official twrp works for fine for me, haven't tried the 4 core version but it can't hurt to try if you need it.
Power off your phone then press and hold volume - and power to enter bootloader, then connect to your pc and follow the steps in the OP
So i have to enter in bootloader mode? At point 6 of OP there is written to enter in the download mode, this makes me confusing.
Can anyone explain me latest 2 commands why they are needed?
fastboot format userdata
fastboot format cache
sigibian said:
So i have to enter in bootloader mode? At point 6 of OP there is written to enter in the download mode, this makes me confusing.
Can anyone explain me latest 2 commands why they are needed?
fastboot format userdata
fastboot format cache
Click to expand...
Click to collapse
This thread is fairly comprehensive;
https://forum.xda-developers.com/nexus-5x/general/moto-nexus-5x-sticky-roll-t3207487
Holding volume - and power takes you to fastboot mode (download mode essentially), theres also an option to reboot into recovery (selectable using the volume keys.)
Formatting user data and cache is necessary prior to installing a new rom (especially if moving from stock). You lose all data (back up first!) But a clean flash is the best place to start.
baddesthad said:
This thread is fairly comprehensive;
https://forum.xda-developers.com/nexus-5x/general/moto-nexus-5x-sticky-roll-t3207487
Holding volume - and power takes you to fastboot mode (download mode essentially), theres also an option to reboot into recovery (selectable using the volume keys.)
Formatting user data and cache is necessary prior to installing a new rom (especially if moving from stock). You lose all data (back up first!) But a clean flash is the best place to start.
Click to expand...
Click to collapse
Thanks for the explanation but for installing a new ROM usually you can do factory reset directly in TWRP, plus doing all the wipes, this should be enough.
About fastboot mode and download mode, they are completely different, fastboot mode: vol down + power, download mode for LG: Plug USB cable into pc, Hold volume up and power at the same time and plug phone into usb.
My question is what i can do in download mode? As OP says after entering download mode open terminal and use fastboot commands.
sigibian said:
Thanks for the explanation but for installing a new ROM usually you can do factory reset directly in TWRP, plus doing all the wipes, this should be enough.
About fastboot mode and download mode, they are completely different, fastboot mode: vol down + power, download mode for LG: Plug USB cable into pc, Hold volume up and power at the same time and plug phone into usb.
My question is what i can do in download mode? As OP says after entering download mode open terminal and use fastboot commands.
Click to expand...
Click to collapse
You need to use vol- and power to go into fastboot mode then connect to the pc. As for userdata and cache, if you don't clean them when coming from stock you will have issues (your data will be encrypted if you're on stock?). As I said this guide worked for me. The op was talking about fastboot mode in the 6th option (also there is much more information in the thread I linked above)
sorry for the confusing i wanted to say fastboot mode..
i knew the thread that you are saying but most people doesn't want to search so I made a little thread only with the needed parts..
I use it myself so I have a place to remember all the steps when I need to change the rom to a new one or when I make experiments and brick my phone XD
If anyone know anything else that should be in here just say, I really want to improve the post
Hi. I just went through the whole process several times (I have tried the different modified boot images from the dedicated post) and my device is still locked [emoji24] any suggestions?
fhartane said:
Hi. I just went through the whole process several times (I have tried the different modified boot images from the dedicated post) and my device is still locked [emoji24] any suggestions?
Click to expand...
Click to collapse
your device will always be locked this is a workaround to get twrp, new roms and magisk while it stays locked..
with twrp usable it won't matter if you are locked or not
PedroM.CostaAndrade said:
your device will always be locked this is a workaround to get twrp, new roms and magisk while it stays locked..
with twrp usable it won't matter if you are locked or not
Click to expand...
Click to collapse
Thanks for the answer. You mean that now I have twrp, I can flash custom Roms with my bootloader locked without any issue?
Envoyé de mon ONEPLUS A3003 en utilisant Tapatalk
Yes if you have TWRP you can install custom ROMs, custom Kernel's, magisk, super su, etc..
the locked bootloader only prevents you from using fastboot commands like the one needed for installing custom recovery
Now that you have TWRP you can use it for everything
Hello everyone, I also have a nexus 5x with motherboard that has been replaced under warranty and unfortunately I can't keep the bootloader unlocked.
I tried the procedure you have indicated, but at this point there is the problem, because after inserting the boot.img and twrp.img inside the phone, then when I go to do the unlocking procedure with 'fastboot oem unlock (select yes on your phone) 'in practice the memory is deleted on the phone, so I lose the previously uploaded files, and therefore I can no longer continue with the flash procedure of boot.img and twrp.img because they are no longer present in memory.
I hope I made myself understood, maybe I am wrong, or is there a way to solve this problem?
Fabiojoker said:
Hello everyone, I also have a nexus 5x with motherboard that has been replaced under warranty and unfortunately I can't keep the bootloader unlocked.
I tried the procedure you have indicated, but at this point there is the problem, because after inserting the boot.img and twrp.img inside the phone, then when I go to do the unlocking procedure with 'fastboot oem unlock (select yes on your phone) 'in practice the memory is deleted on the phone, so I lose the previously uploaded files, and therefore I can no longer continue with the flash procedure of boot.img and twrp.img because they are no longer present in memory.
I hope I made myself understood, maybe I am wrong, or is there a way to solve this problem?
Click to expand...
Click to collapse
fastboot is for the files on your PC not your phone
you need to put the files inside of platform-tools and then open cmd inside it and use the fastboot commands
fastboot will take the files of your PC
Hello, thank you for your information, since I haven't done modding on phones for a long time, I didn't remember exactly the procedure with fastboot and therefore I didn't understand where I had to put the files, but in the end I did it.
Thank you
PedroM.CostaAndrade said:
fastboot is for the files on your PC not your phone
you need to put the files inside of platform-tools and then open cmd inside it and use the fastboot commands
fastboot will take the files of your PC
Click to expand...
Click to collapse
Why is a custom boot image needed? I don't want to root.

Question Rooting - anyone successful?

I've been trying to root my Note 9T. The bootloader has been unlocked, and I've followed a guide from here: https://unofficialtwrp.com/twrp-3-4-2-root-redmi-note-9-5g-cannon/
I'm now stuck in a bootloop.
Anyone been successful?
I additionally tried using a different version of TWRP, which wiped the "misc" partition. Can anyone provide an image dump of the misc partition so I can flash it back on? I can't find a copy of misc in the stock firmware file.
UPDATE 1:
I put the full stock image back on and am back to having a working unrooted phone, so I don't need the misc image. Would really like to get this thing rooted though.
I've installed the Magisk APK, patched the boot image, and flashed it. But this also results in a boot loop. If I flash the stock image back it works again. Any ideas what's going on here?
UPDATE 2:
I got it working! The key was to flash the stock vbmeta.img with fastboot functions to disable it.
fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img
Hiya. I've tried that and managed to get to the twrp page. However, when I go to install magisk via twrp, it just reboots into a bootloop. Any ideas?
Update: This seems to have worked.
[SOLVED] Phone gets stuck in bootloop if I try to install Magisk ZIP!
From the forum I followed these step to install magisk: - Patched my boot.img of my current rom using Magisk Manager and flashed via fastboot - After rebooting from fastboot it got stuck in recovery so had to wipe all data and it booted finally...
forum.xda-developers.com
Did you manage to get Magisk working after the reinstall of stock firmware, or you've just resolved the bootloop?
dsclee1 said:
I've been trying to root my Note 9T. The bootloader has been unlocked, and I've followed a guide from here: https://unofficialtwrp.com/twrp-3-4-2-root-redmi-note-9-5g-cannon/
I'm now stuck in a bootloop.
Anyone been successful?
I additionally tried using a different version of TWRP, which wiped the "misc" partition. Can anyone provide an image dump of the misc partition so I can flash it back on? I can't find a copy of misc in the stock firmware file.
UPDATE 1:
I put the full stock image back on and am back to having a working unrooted phone, so I don't need the misc image. Would really like to get this thing rooted though.
I've installed the Magisk APK, patched the boot image, and flashed it. But this also results in a boot loop. If I flash the stock image back it works again. Any ideas what's going on here?
UPDATE 2:
I got it working! The key was to flash the stock vbmeta.img with fastboot functions to disable it.
fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img
Click to expand...
Click to collapse
I'm interesting in at least rooting and if possible install TWRP .
Can you post i complete procedure to root the note 9 T ?
Thanks
I can have a go. But I'm not 100% sure what exact steps I took that got it working, as I flashed and re-flashed several times. Give this a try and let me know if it works or not?
WARNING: EXPECT TO LOSE ALL THE DATA ON YOUR PHONE!
Step 1
Obviously you need to unlock the bootloader first: https://en.miui.com/unlock/
If you haven't done this already, after your application it's likely you might have to wait 7 days before Xiaomi actually let you unlock.
Unlocking wipes your data.
Step 2
Start the phone normally. Copy the latest magisk apk (https://github.com/topjohnwu/Magisk/releases) over to the phone and install it.
Step 3
Find the correct original ROM for your device (https://xiaomifirmwareupdater.com/miui/cannong/). You'll need the full image. From the ROM extract the boot.img and vbmeta.img. Copy the boot.img over to your phone.
Step 4
In magisk choose the option to install and select "Select and Patch a File" (should be the only option anyway). Select the boot.img you copied over. This will produce a new file called something like "magisk_patched-22100_XXXXX.img". Copy this file off your phone and onto your computer.
Step 5
Boot your phone to fastboot mode (you should already know how to do this, as you would have had to have done it to unlock your phone in the first place - Hold down Volume Down and the Power button at the same time).
Step 6
Run the following commands (obviously replace the boot image with the correct magisk image, and use the vbmeta.img you took from the ROM):
Code:
fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img
fastboot flash boot magisk_patched-22100_XXXXX.img
Hopefully this will work. But I can't be 100% sure, as the disabling of "verity" could mean that your encrypted user data now can't be read (if you've only just unlocked the bootloader then you're not going to have any data anyway, so not too much of an issue). If this is the case it's likely you'll now need to factory reset the phone. Hold down Volume Up and Power on start to reach the stock recovery menu, and there's a selection for factory reset. You can also install TWRP at this point, and could then use it's factory reset function instead. I downloaded this version of TWRP: https://www.mediafire.com/file/ou8553psro9yyt2/3.4.2_redmi_note_9_5G.rar/file, which came from the other rooting guide (https://unofficialtwrp.com/twrp-3-4-2-root-redmi-note-9-5g-cannon/ - which didn't work). Just flash that version of TWRP to the recovery partition (fastboot flash recovery recovery.img), and ignore all the steps given in the guide it came from.
Let me know how you get on.
sorry for the answer delay.
Adding my 2 cents about unlocking the bootlader .
In order to do it .
FIRST - do not try it from a virtual PC . It does not work (at least it did not work for me)
SECOND , before to run the xiaomi batch_unlock bootlader , don't forget to update google usb drivers
I hard some hard time to just connect the unlocker to my phone . Now i have to wait 167 hours to complete the process .
dsclee1 said:
I've been trying to root my Note 9T. The bootloader has been unlocked, and I've followed a guide from here: https://unofficialtwrp.com/twrp-3-4-2-root-redmi-note-9-5g-cannon/
I'm now stuck in a bootloop.
Anyone been successful?
I additionally tried using a different version of TWRP, which wiped the "misc" partition. Can anyone provide an image dump of the misc partition so I can flash it back on? I can't find a copy of misc in the stock firmware file.
UPDATE 1:
I put the full stock image back on and am back to having a working unrooted phone, so I don't need the misc image. Would really like to get this thing rooted though.
I've installed the Magisk APK, patched the boot image, and flashed it. But this also results in a boot loop. If I flash the stock image back it works again. Any ideas what's going on here?
UPDATE 2:
I got it working! The key was to flash the stock vbmeta.img with fastboot functions to disable it.
fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img
Click to expand...
Click to collapse
ive been trying for the last 4 hours to flash twrp on my redmi note 9T 5g global..can you please explain to me how you got it to work. i flashed the recovery.img and vbmeta.img file that i got from the unofficialtwrp.com download, when i flash boot recovery.img, it just reboots my phone into normal...and i missing something? My device is on Miui 12.0.8.0 andriod 10. should i be on the new update 12.5 andriod 11 for it to work. Please help.
dsclee1 said:
I can have a go. But I'm not 100% sure what exact steps I took that got it working, as I flashed and re-flashed several times. Give this a try and let me know if it works or not?
WARNING: EXPECT TO LOSE ALL THE DATA ON YOUR PHONE!
Step 1
Obviously you need to unlock the bootloader first: https://en.miui.com/unlock/
If you haven't done this already, after your application it's likely you might have to wait 7 days before Xiaomi actually let you unlock.
Unlocking wipes your data.
Step 2
Start the phone normally. Copy the latest magisk apk (https://github.com/topjohnwu/Magisk/releases) over to the phone and install it.
Step 3
Find the correct original ROM for your device (https://xiaomifirmwareupdater.com/miui/cannong/). You'll need the full image. From the ROM extract the boot.img and vbmeta.img. Copy the boot.img over to your phone.
Step 4
In magisk choose the option to install and select "Select and Patch a File" (should be the only option anyway). Select the boot.img you copied over. This will produce a new file called something like "magisk_patched-22100_XXXXX.img". Copy this file off your phone and onto your computer.
Step 5
Boot your phone to fastboot mode (you should already know how to do this, as you would have had to have done it to unlock your phone in the first place - Hold down Volume Down and the Power button at the same time).
Step 6
Run the following commands (obviously replace the boot image with the correct magisk image, and use the vbmeta.img you took from the ROM):
Code:
fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img
fastboot flash boot magisk_patched-22100_XXXXX.img
Hopefully this will work. But I can't be 100% sure, as the disabling of "verity" could mean that your encrypted user data now can't be read (if you've only just unlocked the bootloader then you're not going to have any data anyway, so not too much of an issue). If this is the case it's likely you'll now need to factory reset the phone. Hold down Volume Up and Power on start to reach the stock recovery menu, and there's a selection for factory reset. You can also install TWRP at this point, and could then use it's factory reset function instead. I downloaded this version of TWRP: https://www.mediafire.com/file/ou8553psro9yyt2/3.4.2_redmi_note_9_5G.rar/file, which came from the other rooting guide (https://unofficialtwrp.com/twrp-3-4-2-root-redmi-note-9-5g-cannon/ - which didn't work). Just flash that version of TWRP to the recovery partition (fastboot flash recovery recovery.img), and ignore all the steps given in the guide it came from.
Let me know how you get on.
Click to expand...
Click to collapse
should I be on the latest version of Miui...12.5 android 11? for me to be able to install twrp. i downgraded back to Miui 12.0.8.0 android 10 as i didnt like my data folder been blocked in android folder. My device is global cannong redmi 9T 5g with diminsity 800u soc, can you please help if you can. thanks in advance
Android 10 is fine. You need to fastboot flash recovery recovery.img
To boot into it you need to turn the phone off, then hold vol up and power until you feel a buzz, then let go.
I have the same Problem as HighEndGamer:
if I enter 'fastboot flash recovery recovery.img', it sayes that everything worked OK in just a few seconds. But nothing realy happend!
If I enter 'fastboot boot recovery.img', phone boot just as normal.
If I enter 'fastboot oem device-info', it sayes "FAILED (remote: unknown command)'.
If I enter 'fastboot oem lock', it works and I have to start from the beginning..
I have MIUI Global 12.0.2.0{QJEEUMX)
chmick said:
sorry for the answer delay.
Adding my 2 cents about unlocking the bootlader .
In order to do it .
FIRST - do not try it from a virtual PC . It does not work (at least it did not work for me)
SECOND , before to run the xiaomi batch_unlock bootlader , don't forget to update google usb drivers
I hard some hard time to just connect the unlocker to my phone . Now i have to wait 167 hours to complete the process .
Click to expand...
Click to collapse
I confirm it does not work from a VM (and the need for latest drivers). There is something funky going on with the USB communication when running from a VM: the first call of the fastboot executable from the windows VM generally works fine, but any other call hang. So the batch_unlock tool cannot work (since it does call fastboot several times).

Categories

Resources