As you may imagine this simple guide will show you how to root your device with magisk from twrp recovery.
I know, there is already a guide by jashancheema that shows how to root this device, however it's difficult to update the system once you are rooted. In my opinion the way i'm about to show you is faster and easier.
Disclaimer: I am not responsible for ANY damage done to your phone, act at your own risk.
That's how you can root your phone with magisk and recovery without disabling ota.
1. First download magisk manager and magisk flashable zip from here (official thread)
Install magisk manager and copy the magisk flashable zip somewhere in your device or sd.
2. Download mohancm twrp recovery (recovery-3.2.1-2-oreo) from here (official thread)
NOTE: do not download the installer, you need the .img file bootable from fastboot (recovery-3.2.1-2-oreo.img)
3. Copy recovery-3.2.1-2-oreo.img into the fastboot folder.
4. Enable developer option from in the device, enable OEM unlocking.
5. turn off your device and enter into fastboot mode by holding voume down + power button, then connect your device to the pc.
6. now open fastboot and type this to check the connection, if the terminal return an andress your phone is correctly configured.
Code:
fastboot devices
7. type this from fastboot to unlock your bootloader.
Code:
fastboot oem unlock
8. now type this to boot your recovery (REMEMBER TO COPY THE RECOVERY IMG INTO THE FASTBOOT FOLDER)
Code:
fastboot boot recovery-3.2.1-2-oreo.img
9. once your recovey boot flash the magisk zip and reboot.
NOTE: do not install or flash twrp into your device or you won't be able to update through ota.
---------------------HOW TO UPDATE-----------------------------------------------------------------------------------------------------
When you will receive the update the only thing you need to do is boot twrp, flash magisk unistaller (that you can find here ) and update.
1. type this to boot your recovery (REMEMBER TO COPY THE RECOVERY IMG INTO THE FASTBOOT FOLDER)
Code:
fastboot boot recovery-3.2.1-2-oreo.img
2. flash magisk unistaller from recovey
3. Update your system
4. Repeat the same procedure to root again your device.
If you are italian and you need any help you can find it here, the serious telegram community.
https://t.me/XiaomiMiA1Italia
Special thanks to @samuele94 and @TheRealajeje from the telegram group.
RESERVED
All works!!! :good::good::good::good::good:
WORK
I tried, it works. thank you!
funziona da dio! fantastico! bella guida
Great work!
i already flash twrp on my device, so i cannot install update OTA until i go back to unroot?
@H.A.L. 9000, I'm sorry for my ignorance but I wonder whether the bootloader unlock passage (that'd reset everything) is inescapable after installing an OTA update
Can I install ota with the unlocked bootloader?
Thanks for this I was always confused on how to update the phone after magisk.
Edit: you think it's possible to use a custom kernel with magisk and still maintain ota?
Thank you, the rooting part worked flawlessly. :good: Now waiting for the next OTA to see if that will work well too.
1. USB debugging doesn't have to be allowed?
2. Updating Android can be done with PC only?
I did exactly the same (as nicely outlined in MP) for the last few updates, and can confirm it's working perfectly. I was using this as the 'normal' way failed due to unknown reasons.
This approach does not required a patched boot-image available, so imho it's more robust and reliable than the 'normal' method.
iG0tB0lts said:
Thanks for this I was always confused on how to update the phone after magisk.
Edit: you think it's possible to use a custom kernel with magisk and still maintain ota?
Click to expand...
Click to collapse
+1
Have you found out?
H.A.L. 9000 said:
As you may imagine this simple guide will show you how to root your device with magisk from twrp recovery.
I know, there is already a guide by jashancheema that shows how to root this device, however it's difficult to update the system once you are rooted. In my opinion the way i'm about to show you is faster and easier.
Disclaimer: I am not responsible for ANY damage done to your phone, act at your own risk.
That's how you can root your phone with magisk and recovery without disabling ota.
1. First download magisk manager and magisk flashable zip from here (official thread)
Install magisk manager and copy the magisk flashable zip somewhere in your device or sd.
2. Download mohancm twrp recovery (recovery-3.2.1-2-oreo) from here (official thread)
NOTE: do not download the installer, you need the .img file bootable from fastboot (recovery-3.2.1-2-oreo.img)
3. Copy recovery-3.2.1-2-oreo.img into the fastboot folder.
4. Enable developer option from in the device, enable OEM unlocking.
5. turn off your device and enter into fastboot mode by holding voume down + power button, then connect your device to the pc.
6. now open fastboot and type this to check the connection, if the terminal return an andress your phone is correctly configured.
7. type this from fastboot to unlock your bootloader.
8. now type this to boot your recovery (REMEMBER TO COPY THE RECOVERY IMG INTO THE FASTBOOT FOLDER)
9. once your recovey boot flash the magisk zip and reboot.
NOTE: do not install or flash twrp into your device or you won't be able to update through ota.
---------------------HOW TO UPDATE-----------------------------------------------------------------------------------------------------
When you will receive the update the only thing you need to do is boot twrp, flash magisk unistaller (that you can find here ) and update.
1. type this to boot your recovery (REMEMBER TO COPY THE RECOVERY IMG INTO THE FASTBOOT FOLDER)
2. flash magisk unistaller from recovey
3. Update your system
4. Repeat the same procedure to root again your device.
If you are italian and you need any help you can find it here, the serious telegram community.
https://t.me/XiaomiMiA1Italia
Special thanks to @samuele94 and @TheRealajeje from the telegram group.
Click to expand...
Click to collapse
Can't I just install syst update through twrp?
Rooting Mi A1 using this method worked. But the guide needs updating:
1.You must enable usb debugging
2.You must install magisk manager after unlocking bootloader. Installing it before is useless because unlocking bootloader will wipe all data.
freekarol said:
unlocking bootloader will wipe all data.
Click to expand...
Click to collapse
not till 9.5.11
freekarol said:
Rooting Mi A1 using this method worked. But the guide needs updating:
1.You must enable usb debugging
2.You must install magisk manager after unlocking bootloader. Installing it before is useless because unlocking bootloader will wipe all data.
Click to expand...
Click to collapse
Well, that happened to me.. Total WIPE... So, i decide to stop. But this night i'll try again, after a full backup. For me this is important because i need to use Android Auto, with aamirror.
I do regular backups so it was ok with me. It also should be in the guide as a first step: backup your phone. It seems like the guide is not for beginners... After rooting, you can face two problems:
1. From time to time, Magisk crashes. Just open it again.
2. There will be a camera lag. Installing a Magisk module should solve it(I haven't tried it yet): https://www.youtube.com/watch?v=UqcQKqhL3ok
there is some indication that 'fastboot boot twrp.img' wipes all the data!
Not sure when it started and if there is a way to avoid it - any idea?
Related
WARNING: Before attempting to root your device, do note that by unlocking your bootloader and modifying your device with root, ROMs, etc... you are NOT risking voiding your warranty!
I am NOT responsible for what you do to your device either, so follow these instructions at your own risk. Make sure you know what you're doing, it's best to understand the process rather than just copy and paste commands and such.
Hello!
Some people asked me how to root Xiaomi Pocophone F1 with magisk and to keep stock recovery on it, to recive OTA updates etc. so this is the complete guide
Sorry for all language misstakes, my english is not perfect, so please, if you have found anything, inform me via private message, so I can edit the post and correct it.
1. Unlock Bootloader Unlocking Bootloader Explanation and Troubleshooting for NEWBIES | thanks to @madsponge26
2. TWRP boot (not flashing, you will keep your stock recovery)
3. Pull stock boot.img from your phone (method II)
4. Boot.img patching (Patching stock boot.img with magisk manager app) (method II)
5. Patched magisk boot.img flashing (method II)
Tools and Information we need
USB Driver
Minimal ADB Fastboot
TWRP 3.2.3-x Unofficial with working DECRYPTION 12/10/2018
Magisk Manager App
How to Unlock Bootloader
Back up Files (Internal Storage)
1. Go to Settings > About phone
2. Find the MIUI Version and press 6-8 times
3. Go to Additional Settings > Developers Options
4. Press and check USB Debugging and OEM Unlocking
5. Go to Settings > Developers Options > Mi Unlock Status > Add Account & Device and log in with your MI account.
6. Go to MIUI Unlock website
7. Login to your MI account
8. You should be able to download Mi Unlock and unlock bootloader without filling any forms or applying for permissions (I was able to do that this way)
- if not, then apply and wait.
*Install Xiaomi USB Drivers from link above or by Mi Unlock app settings option.*
In MI Unlock app:
1. Shut down your phone manually, and hold Volume down key and Power button to enter Fastboot mode.
2. Connect your phone to PC using USB cable and click "Unlock".
***Mi account should verified.
Booting into TWRP, getting ADB SuperUser access, pulling stock boot.img
1. Open Minimal ADB Fastboot terminal AS ADMINISTRATOR!
2. Shut down your phone
NOW FOCUS
3. Connect your phone to your PC and hold Power and Volume Down buttons until Fastboot screen will be visible.
4. Follow the steps:
Put that command in your Minimal ADB Fastboot terminal:
Code:
fastboot devices
Your phone should be visible.
example: ,,7e00a8e3 fastboot"
Code:
fastboot boot <path to your TWRP .img recovery file>
Your phone should be booted into TWRP recovery.
If ask's for password: CLICK CANCEL
If ask's for keeping /system read only: swipe (allow modifications)
UPDATE:
NOW YOU CAN JUST FLASH MAGISK.ZIP AND REBOOT
There was no TWRP with working decryption before.
Method II:
Code:
adb devices
Your phone should be visible.
example: ,,7e00a8e3 recovery"
Code:
adb shell
Here we go! We got access to Super User shell via ADB ^^
and now the magic:
- In TWRP recovery, go to Advanced > File Manager
- Go to "/dev/block/platform/" folder (go into ,,soc" folder, if you have one there)
- Here you will see some files and folders, we need to open folders and search for the folder called "by-name" inside one of them. || For me it was /dev/block/platform/soc/1d84000.ufshc and ,,by-name" inside of it.
- At the end, we need name of the folder contains ,,by-name" inside for this string: /dev/block/platform/soc/FOLDER NAME/by-name
- Now go to your ADB Shell terminal and put that command:
soc = you should have this folder too, if not; ignore (please confirm that in comments)
FOLDER NAME = your folder with ,,by-name" inside
Code:
ls -al /dev/block/platform/[COLOR="DarkOrange"][B]soc[/B][/COLOR]/[COLOR="Red"][B]FOLDER NAME[/B][/COLOR]/by-name
Now you should see partitions of your phone.
You need to find your boot partition, for me it was:
Code:
lrwxrwxrwx 1 root root 16 Feb 15 1970 [B][COLOR="Red"]boot[/COLOR][/B] -> [B][COLOR="Red"]/dev/block/sde45[/COLOR][/B]
--
Pulling our stock boot.img!
Go to your ADB Shell terminal and put that commands:
Replace sde45 with your partition from step above*
Code:
dd if=/dev/block/[B][COLOR="Red"]sde45[/COLOR][/B] of=/sdcard/boot.img
Code:
exit
Code:
adb pull /sdcard/boot.img
Our stock boot.img should be downloaded into our Minimal ADB Fastboot directory!
Code:
adb reboot
Stock boot.img patching and flashing (For Method II only)
1. Save your stock boot.img into phone's internal storage/sdcard
2. Download latest Magisk Manager from MAGISK GITHUB REPO
3. Install Magisk Manager on your phone.
4. Open Magisk Manager, check Keep Force Encryption
5. Click Install > Install > Boot Image Patching > Select your stock boot.img and patch it.
6. Save your patched boot.img to your computer
7. Shut down your phone
8. Open Minimal ADB Fastboot terminal on your PC
9. Connect your phone to your PC and hold Power and Volume Down buttons until Fastboot screen will be visible.
4. Follow the steps:
Enter commands:
Code:
fastboot devices
Your phone should be visible.
example: ,,7e00a8e3 fastboot"
Code:
fastboot flash boot <path to your patched_boot.img>
Code:
fastboot reboot
5. Open Magisk Manager, your phone should be rooted.
6. Download Root Checker from Play Store and check if your device is rooted.
FOR OTA UPDATES:
- Uninstall magisk with Magisk Manager App (Restore Image option)
- Apply OTA update
then:
Method I:
- Boot into twrp (version with working decryption)
- Flash Magisk ZIP again
Method II:
- Pull boot.img and patch it again
- Flash new patched boot.img
If you have any questions or problems, type those in the comment below, I will try to help you
Stock Mi Recovery 3.0 for Pocophone F1: GOOGLE DRIVE
Before flashing OTA update, you need to uninstall magisk and install it again after update.
Thanks for a great tutorial, this is what I needed, just a few queries.
1. After ota will I retain root or again the whole process will have to be repeated.
2. In this process if I start with an unlocked bootloader with 8.10.9 beta rom any chance or need to wipe data or internal storage.
3. What if after flashing twrp, I just flash magisk and reboot without flashing force encryption disabler, stock recovery will automatically overwrite twrp, will I lose any data or root.
sanjay0501 said:
Thanks for a great tutorial, this is what I needed, just a few queries.
1. After ota will I retain root or again the whole process will have to be repeated.
2. In this process if I start with an unlocked bootloader with 8.10.9 beta rom any chance or need to wipe data or internal storage.
3. What if after flashing twrp, I just flash magisk and reboot without flashing force encryption disabler, stock recovery will automatically overwrite twrp, will I lose any data or root.
Click to expand...
Click to collapse
1. For now you need to uninstall magisk root before any OTA update, and install it again after it. I don't figured it out yet, how to update OTA and keep magisk.
2. Mi Unlock App will tell you if your internal storage needs to be wiped or not after connecting your phone in fastboot mode.
For me there was a red text that my internal storage will be wiped, for you it will be propably similar.
3. In this tutorial you are not flashing TWRP, you are just booting your phone into TWRP without flashing it to get acess to Super User via ADB and to pull stock boot.img to patch it later with magisk.
Target of this tutorial is to keep stock recovery, so it wont be overwrited because you will be already using it. It shouldn't affect magisk root, but
it would be an good idea to check ,,Keep Force Encryption" in Magisk Manager app before patching boot.img if you are not going to flash Disable Force Encryption zip etc.
exepowered said:
1. It depends propably on OTA update type. Can't answer for sure now, but OTA is comming on Friday with new version of MIUI 10 Beta so I will check that.
2. Mi Unlock App will tell you if your internal storage needs to be wiped or not after connecting your phone in fastboot mode.
For me there was a red text that my internal storage will be wiped, for you it will be propably similar.
3. In this tutorial you are not flashing TWRP, you are just booting your phone into TWRP without flashing it to get acess to Super User via ADB and to pull stock boot.img to patch it later with magisk.
Target of this tutorial is to keep stock recovery, so it wont be overwrited because you will be already using it. It shouldn't affect magisk root, but
it would be an good idea to check ,,Keep Force Encryption" in Magisk Manager app before patching boot.img if you are not going to flash Disable Force Encryption zip etc.
Click to expand...
Click to collapse
Thanks for ur help.
Hi, thanks for the tutorial but I have a problem when unlocking my bootloader, when I am on the Mi unlock application and I connect my phone in fastboot mode mi unlock do not recognize my phone and therefore impossible to click unlock.
My computer recognizes the phone well but not the application do you have solutions?
Open it as administrator
Wysłane z mojego POCOPHONE F1 przy użyciu Tapatalka
uremytoy said:
Open it as administrator
Wysłane z mojego POCOPHONE F1 przy użyciu Tapatalka
Click to expand...
Click to collapse
I opened it in administrator mode, it does not work
Inside unlock tool there are drivers. Try to install them. I've had the same and it worked for me
Wysłane z mojego POCOPHONE F1 przy użyciu Tapatalka
hey dudes, can someone please upload the stock recovery for me?
everytime the phone wants to install an ota it just boots into twrp and i have to manually reboot it from there.
so if i just flash the stock poco recovery the phone would updtate the ota normally and root still would be there?
Before flashing OTA update, you need to uninstall magisk and install it after update.
WasIstDenn said:
hey dudes, can someone please upload the stock recovery for me?
everytime the phone wants to install an ota it just boots into twrp and i have to manually reboot it from there.
so if i just flash the stock poco recovery the phone would updtate the ota normally and root still would be there?
Click to expand...
Click to collapse
Stock Mi Recovery 3.0 for Pocophone F1: GOOGLE DRIVE
Before OTA update, uninstall magisk via Magisk Manager App, then after update install it again using my guide, otherwise you will get bootloop.
I don't figured it out yet, how to keep magisk live when updating.
exepowered said:
Stock Mi Recovery 3.0 for Pocophone F1: GOOGLE DRIVE
Before OTA update, uninstall magisk via Magisk Manager App, then after update install it again using my guide, otherwise you will get bootloop.
I don't figured it out yet, how to keep magisk live when updating.
Click to expand...
Click to collapse
So after uninstalling magisk and applying OTA, we need to do whole process again? pull out boot - patch it and flash it?
at this point it makes more trouble than just installing twrp.
For now there is twrp with decryption working so you can flash magisk ZIP, with booted twrp (not flashed).
I used the same boot I had before OTA and there was no problems too.
exepowered said:
For now there is twrp with decryption working so you can flash magisk ZIP, with booted twrp (not flashed).
I used the same boot I had before OTA and there was no problems too.
Click to expand...
Click to collapse
You extracted the boot image, patched it using magisk, and flashed it using fastboot.
Instead, can't we just install Magisk.zip using twrp? This way it saves us from running all those commands.
For OTA, we can uninstall magisk and flash original stock recovery, then apply ota, then flash twrp and magisk.zip.
Correct me if I am wrong.
Thanks
anirudh281998 said:
You extracted the boot image, patched it using magisk, and flashed it using fastboot.
Instead, can't we just install Magisk.zip using twrp? This way it saves us from running all those commands.
For OTA, we can uninstall magisk and flash original stock recovery, then apply ota, then flash twrp and magisk.zip.
Correct me if I am wrong.
Thanks
Click to expand...
Click to collapse
I know what I have done.
But if the same patched boot.img is not working after uninstalling and OTA update, you can skip other steps and just boot into twrp [version with working decryption] (everything is in my post) and flash ZIP. ZIP does the same thing, it patches boot.img so it's just faster for now. When I was doing this tutorial, there was no twrp with working decryption for poco...
You can try to flash same patched boot.img you had before OTA. Last time it worked for me.
You don't need to flash twrp too...
Just uninstall magisk
Do OTA update
BOOT into twrp (version with working decryption)
Flash magisk.zip
reboot
exepowered said:
I know what I have done.
But if the same patched boot.img is not working after uninstalling and OTA update, you can skip other steps and just boot into twrp [version with working decryption] (everything is in my post) and flash ZIP. ZIP does the same thing, it patches boot.img so it's just faster for now. When I was doing this tutorial, there was no twrp with working decryption for poco...
You can try to flash same patched boot.img you had before OTA. Last time it worked for me.
You don't need to flash twrp too...
Just uninstall magisk
Do OTA update
BOOT into twrp (version with working decryption)
Flash magisk.zip
reboot
Click to expand...
Click to collapse
I flash the decryption TWRP and install magisk but the phone bootloops back to recovery no matter what I try. I have to uninstall magisk using the official installer, only then the phone lets me boot into system but obviously I lose root. Any guesses what I should do to get root with formatting storage ?
Hey dude! Is there any way to unlock my poco f1 bootloader without wiping the data?
SusanooX said:
Hey dude! Is there any way to unlock my poco f1 bootloader without wiping the data?
Click to expand...
Click to collapse
Nope
Is it equal, on wich (original) ROM/Software-Verisom i´am for unlocking, flashing twrp and rooting ?
Or is it the best, to NOT update the original Rom OTA and after that unlocking, flashing twrp and rooting ?
This is a translation and rework of youyim2's executable. I've rewritten some of the batch file to make things more streamlined, as well as translated the whole thing into English. I am not the device maintainer. If you have questions, I'll help as best I can. This is only for getting TWRP, Magisk, and Xposed. You should be able to flash Open GAPPs if needed with no issue once you've got TWRP installed.
Download the zip file. Extract the contents. Run the *.bat file. Follow the instructions.
INSTRUCTIONS:
1) Unlock the bootloader first.
2) Unlock fastboot flashing.
3) Flash TWRP.
4) Reboot into recovery (TWRP)
5) Flash the version of Magisk that is included.
6) Reboot into the system
7) Install the included APK for Magisk. Official Magisk does not support this device.
8) If you want Xposed, reboot to recovery, and flash the included EdXposed zip and the riru-core zip.
9) Reboot back to the system
10) Install the included EdXposed apk
TWRP:
To get TWRP into English (or your language of choice), boot to TWRP recovery. When it shows up, slide the bar to the right to unlock it. After that, tap the button second from the bottom on the right column. This takes you to the Settings menu. In here, tap the globe icon in the top right tab. Choose your language from here.
NOTES:
1) The flashing unlock needs to be run EVERY TIME you reboot into bootloader, as it locks the flash mode every reboot. This type of unlock does not wipe data.
2) DO NOT WIPE /SYSTEM IN TWRP. It will brick your phone.
Download:
Link: Red Magic Mars-TWRP3.2.3.0-v1.1.zip
MD5: 84AB33312633B9AF91DD4E07478A059C
Size: 71.5 MB
Thanks, I can't flash twrp is fail
decscomputer said:
Thanks, I can't flash twrp is fail
Click to expand...
Click to collapse
Did you unlock the bootloader and do the flashing unlock? Both are required for TWRP to flash.
Yes, I did the process completely. I have the last Chinese Rom. The bootloader was unlocked, the fastboot Flash too but when I click the number 4 Is fail flashing twrp and there's a message saying Max limit exceded and too bootloader password Is error.
decscomputer said:
Yes, I did the process completely. I have the last Chinese Rom. The bootloader was unlocked, the fastboot Flash too but when I click the number 4 Is fail flashing twrp and there's a message saying Max limit exceded and too bootloader password Is error.
Click to expand...
Click to collapse
If you read Chinese, you could try the tool in this thread. It's what mine is based on, and may be better suited to the Chinese version.
Added options to reboot into recovery and bootloader as well as some more translation and other text adjustments.
decscomputer said:
Yes, I did the process completely. I have the last Chinese Rom. The bootloader was unlocked, the fastboot Flash too but when I click the number 4 Is fail flashing twrp and there's a message saying Max limit exceded and too bootloader password Is error.
Click to expand...
Click to collapse
OEM unlock has to be switched on in developer options do you have that switched on?
cajunflavoredbob said:
Did you unlock the bootloader and do the flashing unlock? Both are required for TWRP to flash.
Click to expand...
Click to collapse
Yes, I did the bootloader Is unlocked and I did the fastboot unlock but when I try to Flash twrp Is fail with a message exceded limit Max AND too password Is error or something like that. I try with the .exe AND directly with adb but it has the same result.
cajunflavoredbob said:
Hello friends. I have a problem and I can not find the solution .. in the magisk manager some modules are not shown when looking for them, like pix3lify, google framework, camera2api y more. The first time I rooted my nubia and installed magisk manager, the modules were shown and I could install them and they worked, but then I gave a full reset to red mars and since then I have not seen the modules never again. I have already reset the nubia more than 10 times, changed the language, installed other magisk manager apk, and nothing.
this magisk manager does not let me install modules from github and if I download and install a thirdparty zip from the web, magisk installs it but the module does not apply or is not installed for some reason.
Is the same in twrp:crying:
I do not ask for support, but if someone knows how to solve it or gives me any suggestions? please
Thanks
Click to expand...
Click to collapse
I have a problem with the bootloader
when i try to bootloader my nx619j , the bootloader failed and the message is "command write failed((too many links))" can u help me pls?
cajunflavoredbob said:
INSTRUCTIONS:
1) Unlock the bootloader first.
2) Unlock fastboot flashing.
3) Flash TWRP.
4) Reboot into recovery (TWRP)
5) Flash the version of Magisk that is included.
6) Reboot into the system
7) Install the included APK for Magisk. Official Magisk does not support this device.
8) If you want Xposed, reboot to recovery, and flash the included EdXposed zip and the riru-core zip.
9) Reboot back to the system
10) Install the included EdXposed apk
NOTES:
1) The flashing unlock needs to be run EVERY TIME you reboot into bootloader, as it locks the flash mode every reboot. This type of unlock does not wipe data.
2) DO NOT WIPE /SYSTEM IN TWRP. It will brick your phone.
Download:
Link: Red Magic Mars-TWRP3.2.3.0-v1.1.zip
MD5: 84AB33312633B9AF91DD4E07478A059C
Size: 71.5 MB
Click to expand...
Click to collapse
One thing that I have found rather disappointing with all of the "guides" (that can only be loosely called such) is that nobody has explicitly mentioned HOW you have to unlock the bootloader on Nubia devices without downloading something.
In fastboot mode, after toggling Bootloader Unlock in developer settings, one must type:
fastboot oem nubia_unlock NUBIA_NX619J
THEN you can do: fastboot flashing unlock
Flashing a boot image may require you to redo the bootloader flashing unlock to bypass the "This device is corrupt" screen.
Packed up Windows executables aren't exactly helpful for those of us using Linux or MacOS based systems. Even then, the Red Magic Mars packaged bat files/tools didn't install correct drivers for me on Win10. Could never get the device recognized within Fastboot on my Win10 Intel desktop after updating and reinstalling drivers.
There is also another quirk with the Nubia devices that I ran into that I have seen mentioned only once on another device's forum.
If you're running a Ryzen/AMD based system, you may have to issue the fastboot commands on an Intel based system instead.
Why? Beats me. It makes no sense, but after hours of pulling my hair out, I happened to come across a post suggesting it and gave it try.
Typing in the same commands with fastboot in the same OS (xUbuntu 20.04) with the same exact versions of every tool used... failed on my Ryzen desktop but worked fine on my Intel laptop. Had I known, it would have saved me several hours of swapping cables and reflashing software.
Also, for those (like me) who don't exactly like blindly trusting software found on forums.
You can download the official system images here:
REDMAGIC Mars
VERSIONS Europe & Asia: V207 North America: V111 LAST UPDATED 10/28/2019 DOWNLOAD V207: Download V111: Download Go to flash instructions UPDATED AND ADDED FEATURES Game Space: Call...
help.redmagic.gg
Pull boot.img from the update archive and use another device with Magisk installed to repackage the boot image for the Mars to flash yourself.
fastboot flash boot modified_boot_image.img
And done.
Due to the risk of bricking the Red Magic Mars within TWRP, I'd rather avoid using it entirely... so I only flashed a boot.img modified with Magisk instead.
One nice thing of note about the Red Magic Mars. It has an actual recovery partition and doesn't use the clusterfluck that is the A/B partition scheme.
Ok guys, I decided to write this up because the current state of finding good info on this is quite messy. I'm going to keep it short and to the point.
I'm not here to explain what TWRP or Magisk Root are. You can find that somewhere else.
Goal:
Install TWRP and Magisk Root on OOS 10.3.5, without losing data.
(This same method worked on earlier versions of OOS 10, and may also work on later versions.)
Requirements:
OnePlus 6 Unrooted and Unmodified Recovery
Computer/Laptop
Magisk (ZIP)
TWRP Blu_Spark (ZIP)
TWRP Q by Mauronofrio (IMG)
Important Notes:
If you have installed or upgraded to OOS 10.3.5, then your device should be returned to stock (unrooted and unmodified recovery), and you're ready to begin. Otherwise, I suggest you simply reinstall the system again (full system links here) and then you'll be ready.
To send commands from your computer to your phone, you will need Android ADB debug software and possibly OnePlus drivers.
OnePlus Drivers Installation Instructions
Download Links:
Magisk 20.4 ZIP
Magisk Uninstaller 20.4 ZIP
TWRP Blu_Spark 3.4.0-x v9.116 ZIP
TWRP Q by Mauronofrio 3.3.1-18 IMG
Begin
Step 1:
Disable all lock patterns and security on your phone.
Step 2:
Back up anything important on your phone. You accept responsibility for any lost data.
Step 3:
Copy/Save the ZIP files (Magisk + Magisk Uninstaller + TWRP Blu_Spark) to the storage in your phone. The IMG file (TWRP Q by Mauronofrio) should be saved on your Computer
Step 4:
Boot your phone to fastboot mode.
(Power off. Then press Power on + Volume Up)
Step 5:
Connect phone to computer with USB. (Don't use a crap/cheap USB cable or the connection may fail.)
Step 6:
On your Computer, Open the command line, and Run the command to fastboot the TWRP Q by Mauronofrio
fastboot boot twrp-3.3.1-18-enchilada-Q-mauronofrio.img
Step 7:
Your phone should boot into TWRP (this is a temporary boot and nothing yet has been modified on your device).
Step 8:
Use the TWRP menu to Install both ZIP files. Starting with TWRP Blu_Spark, then Magisk.
BEWARE, DO NOT REBOOT BETWEEN INSTALLS! READ CAREFULLY. TWRP MAY TRY TO REBOOT. INSTALL BOTH ZIP FILES BACK TO BACK WITHOUT REBOOT.
Step 9:
Reboot. Complete. Congratulations.
If someone could provide me a link to ADB, then I will gladly include it in the post. Thank you
BEWARE, DO NOT REBOOT BETWEEN INSTALLS! READ CAREFULLY. TWRP MAY TRY TO REBOOT. INSTALL BOTH ZIP FILES BACK TO BACK WITHOUT REBOOT.
With reboot works too. Install twrp then reboot system, then reboot recovery from system, and install magisk. Works. I tried several times.
Shyciii said:
With reboot works too. Install twrp then reboot system, then reboot recovery from system, and install magisk. Works. I tried several times.
Click to expand...
Click to collapse
I have had bad problems on an earlier version, where Blu_Spark would Not properly install Magisk, and ruined my Recovery. Let me ask, on reboot, Did you boot into TWRP Q Mauron or TWRP Blu_Spark to install Magisk?
Sepero said:
I have had bad problems on an earlier version, where Blu_Spark would Not properly install Magisk, and ruined my Recovery. Let me ask, on reboot, Did you boot into TWRP Q Mauron or TWRP Blu_Spark to install Magisk?
Click to expand...
Click to collapse
I always use Mauron-like TWRP, and never had a problem.
Shyciii said:
I always use Mauron-like TWRP, and never had a problem.
Click to expand...
Click to collapse
Well then, I should consider you luckier than me, as I've had lots of data lost due to the issues with TWRP and Magisk. According to Mauronofrio,
"after some tests i'm sure there is a compatibility problem between twrp and magisk, i was able to get only one of them, so actually i don't know how to proceed, i need to understand if it is a twrp problem or a magisk problem, TWRP is in stand-by for now."
https://forum.xda-developers.com/on...overy-unofficial-twrp-touch-recovery-t3860815
If TWRP by Mauronofrio is now working with the latest Magisk, then he it appears he has not publicly stated so. Did you install Magisk 20.4?
Sepero said:
Well then, I should consider you luckier than me, as I've had lots of data lost due to the issues with TWRP and Magisk. According to Mauronofrio,
"after some tests i'm sure there is a compatibility problem between twrp and magisk, i was able to get only one of them, so actually i don't know how to proceed, i need to understand if it is a twrp problem or a magisk problem, TWRP is in stand-by for now."
https://forum.xda-developers.com/on...overy-unofficial-twrp-touch-recovery-t3860815
If TWRP by Mauronofrio is now working with the latest Magisk, then he it appears he has not publicly stated so. Did you install Magisk 20.4?
Click to expand...
Click to collapse
Of coz. I always use the latest Magisk, so now 20.4
I've never rooted my device can i go from stock to root or.do i need to oem unlock? Tnq.
Hi, I need help.
On step 8 I can not find files I copied on step 4. How I should copy those files to find it when I need to install them in step 8?
Thank you
I got following message returned:
FAILED (remote: boot is not allowed in Lock State)
Do I have to unlock bootloader before? This would wipe all data ...
followed the second half of the guide being an idiot and just keep all security as is. workt like a charm actually.. Thanks:highfive:
We don't need to unlock the bootloader before doing this???
fastboot OEM unlock????
techstuff_18 said:
We don't need to unlock the bootloader before doing this???
fastboot OEM unlock????
Click to expand...
Click to collapse
No, first unlock bootloader because you can't run twrp in fastbot. I did this, mean installed magisk on latest oxygen.
erdock said:
I got following message returned:
FAILED (remote: boot is not allowed in Lock State)
Do I have to unlock bootloader before? This would wipe all data ...
Click to expand...
Click to collapse
i unlocked it then all worked. and yes all data wiped
So, backround is, I want to use AFWall+, which requires root, which I would like to use Magisk for.
In order to get Magisk I need TWRP, I learned so far.
I run LOS 18.1 and I used the lineage recovery/fastboot to flash it (according to the offical LOS-guide).
Changing the recovery is not the easiest thing for me.
Found this thread: https://forum.xda-developers.com/t/from-lineage-recovery-to-twrp-recovery.4253669/
but this seems to be very Samsung specific using Odin (I use a Pixel 4)
I also tried this guide: https://www.droidwin.com/boot-into-recovery-from-fastboot-mode/
but this just "deleted" my OS.
This is why I will be asking a few questions prior starting a new attempt, so please bear with my incompetence
At TWRP I read, I have to install a LZMA ramdisk kernel in order to get TWRP (https://twrp.me/google/googlepixel4.html).
I would go for elementalx, assuming it does support lzma.
From here things are getting tricky for me.
TWRPs guide tells me to get the kernel first, at Elementalx I get the instructions to use TWRP to install
It does say however its not neccessary to install TWRP permanently, but I would like to, because no matter what I want to do with my phone it requires TWRP. So I would like to change the recovery permanently.
The easiest way to do all of this seems to be this guide: https://elementalx.org/how-to-install/
But that will not change my recovery permanently...
What I would do (using a videoguide, because you know, I'm a noobish newbie):
1. Download TWRP img + zip, Magisk zip, Elementalx zip to my fastboot folder
2. Copy the Zips of TWRP, Magisk and Elementalx to my device
3. On my PC -> in the fastboot folder I run cmd as administrator
4. boot into bootloader
5. using cmd -> fastboot boot twrp.img
6. using TWRP -> flash the custom kernel
7. using TWRP -> flash TWRP
8. check if TWRP was proper installed: in TWRP -> boot -> recovery
hopefully the recovery was replaced
9. using TWRP - > flash Magisk
10. reboot
Would anyone please tell me if this will work?
Is there anything I need to do to avoid horrible things to happen?
This is not a request to blame something that could happen on someone afterwards. I just want to minimize the risk...
You can just flash the kernel from fastboot no twrp needed. Just fastboot flash boot boot.img.
You can have magisk patch a boot image then flash it from fastboot as mentioned above.
Usually its just recommended to fastboot boot twrp.img instead of flashing it to the actual device incase you want to revert back and install an OTA.
You can also just download the magisk apk from the device to patch the boot image, flash kernel from fastboot, then reboot with root and have magisk finish doing what it needs to do.
Thank you.
TWRP got stuck booting: I see the logo, "teamwin" and the version used 3.5.2_10-0
Everything was up to date, I'll try it again with an older version of TWRP.
Well, I dont know how to boot into LOS. It just froze on the mentioned screen.
Has anyone a idea what to do?
CodyF86 said:
You can just flash the kernel from fastboot no twrp needed. Just fastboot flash boot boot.img.
You can have magisk patch a boot image then flash it from fastboot as mentioned above.
Usually its just recommended to fastboot boot twrp.img instead of flashing it to the actual device incase you want to revert back and install an OTA.
You can also just download the magisk apk from the device to patch the boot image, flash kernel from fastboot, then reboot with root and have magisk finish doing what it needs to do.
Click to expand...
Click to collapse
Ok, I tried it my way - it wont work (of course). Maybe TWRP is still not supported for Android 11.
Now I'll try it your way (thx again).
In order to flash the kernel, I'll have to unzip the elementalx file, I assume. And boot the avaible image, which is called "dtbo.img".
I'll give this a go...
CodyF86 said:
You can just flash the kernel from fastboot no twrp needed. Just fastboot flash boot boot.img.
You can have magisk patch a boot image then flash it from fastboot as mentioned above.
Usually its just recommended to fastboot boot twrp.img instead of flashing it to the actual device incase you want to revert back and install an OTA.
You can also just download the magisk apk from the device to patch the boot image, flash kernel from fastboot, then reboot with root and have magisk finish doing what it needs to do.
Click to expand...
Click to collapse
fastboot flash boot boot.img did not work. I renamed the file to boot.img (did not mention this before).
Tried it twice, but nothing worked afterwards, not even recovery and I was not able to turn the device off.
Had to flash LOS again.
I also tried flashing the kernel using sideload while flashing the rom again.
Sideload did work, BUT the wifi was not working at all.
I dont want to bother you, but might there be another way?
I might have found something:
[VERY EASY GUIDE] ADB/FASTBOOT/RECOVORY *FULL GUIDE* for flashing ROMs, Kernels, APKs
Keep in mind bootloader unlock will not work if you have done the latest OTA update without previously using supercid. See bootloader unlock guide below for more details. This procedure is designed to be EXTREMELY EASY and for people using...
forum.xda-developers.com
uppon2 said:
That is all. Keep in mind things like wifi might not work if you forget to flash the kernel modules! - Just be sure it is always a 2 step process.
Click to expand...
Click to collapse
This is what I am experiencing when using sideload. It does install the kernel, but wifi wont work. I guess I do need a working (permanently or temporarly) recovery.
caraman said:
I might have found something:
[VERY EASY GUIDE] ADB/FASTBOOT/RECOVORY *FULL GUIDE* for flashing ROMs, Kernels, APKs
Keep in mind bootloader unlock will not work if you have done the latest OTA update without previously using supercid. See bootloader unlock guide below for more details. This procedure is designed to be EXTREMELY EASY and for people using...
forum.xda-developers.com
This is what I am experiencing when using sideload. It does install the kernel, but wifi wont work. I guess I do need a working (permanently or temporarly) recovery.
Click to expand...
Click to collapse
Wifi is usually a kernel module that gets loaded through an init script on boot. It's possible to build the wifi module built-in to the kernel, which makes it so it doesn't have to load separately through an init script.
So if youre not using the stock kernel you'd have to ask whoever makes the kernel you are using.
caraman said:
So, backround is, I want to use AFWall+, which requires root, which I would like to use Magisk for.
In order to get Magisk I need TWRP, I learned so far.
I run LOS 18.1 and I used the lineage recovery/fastboot to flash it (according to the offical LOS-guide).
Changing the recovery is not the easiest thing for me.
Found this thread: https://forum.xda-developers.com/t/from-lineage-recovery-to-twrp-recovery.4253669/
but this seems to be very Samsung specific using Odin (I use a Pixel 4)
I also tried this guide: https://www.droidwin.com/boot-into-recovery-from-fastboot-mode/
but this just "deleted" my OS.
This is why I will be asking a few questions prior starting a new attempt, so please bear with my incompetence
At TWRP I read, I have to install a LZMA ramdisk kernel in order to get TWRP (https://twrp.me/google/googlepixel4.html).
I would go for elementalx, assuming it does support lzma.
From here things are getting tricky for me.
TWRPs guide tells me to get the kernel first, at Elementalx I get the instructions to use TWRP to install
It does say however its not neccessary to install TWRP permanently, but I would like to, because no matter what I want to do with my phone it requires TWRP. So I would like to change the recovery permanently.
The easiest way to do all of this seems to be this guide: https://elementalx.org/how-to-install/
But that will not change my recovery permanently...
What I would do (using a videoguide, because you know, I'm a noobish newbie):
1. Download TWRP img + zip, Magisk zip, Elementalx zip to my fastboot folder
2. Copy the Zips of TWRP, Magisk and Elementalx to my device
3. On my PC -> in the fastboot folder I run cmd as administrator
4. boot into bootloader
5. using cmd -> fastboot boot twrp.img
6. using TWRP -> flash the custom kernel
7. using TWRP -> flash TWRP
8. check if TWRP was proper installed: in TWRP -> boot -> recovery
hopefully the recovery was replaced
9. using TWRP - > flash Magisk
10. reboot
Would anyone please tell me if this will work?
Is there anything I need to do to avoid horrible things to happen?
This is not a request to blame something that could happen on someone afterwards. I just want to minimize the risk...
Click to expand...
Click to collapse
Magisk should not be that complicated. All the hard work has been done and can be found in Magisk documentation. There are install instructions for just about any type device and if there is LOS for your device I'm sure it is covered. The latest Magisk is not TWRP flashable the same way as it used to be and newer devices often don't have ramdisk in boot image and root is achieved thru recovery instead. You referenced several threads and guides but no indication of Magisk instructions. Read the Magisk installation instructions for your device type, they're not just suggestions, they work.
Hey guys,
in the past I've been made a root to my phone, and I set it to unroot but did not relock the bootloader.
So - my bootloader is still unlocked.
There is any way that I can return to root device without losing data(without wiping?)?
Unlocking the bootloader is what usually causes a reset of your phone. If you have OEM Unlock still enabled, you should be able to just boot a Recovery (Nebrassy TWRP for OP7P) and install Magisk from there.
Download the latest Magisk apk from the github and rename it from .apk to .zip
Copy the .zip to internal storage
Reboot your phone to bootloader:
Power off
Hold Volume up+down and power button
Connect phone to PC
In bootloader mode and use following command:
Code:
fastboot boot twrp.img
"twrp.img" should be the name of the recovery you downloaded.
In TWRP:
Select Install
Flash Magisk zip
If you want to install the TWRP:
go to Advanced > Flash Current TWRP
Reboot
You should now have Magisk root installed.
Nightmare[ITA] said:
Unlocking the bootloader is what usually causes a reset of your phone. If you have OEM Unlock still enabled, you should be able to just boot a Recovery (Nebrassy TWRP for OP7P) and install Magisk from there.
Download the latest Magisk apk from the github and rename it from .apk to .zip
Copy the .zip to internal storage
Reboot your phone to bootloader:
Power off
Hold Volume up+down and power button
Connect phone to PC
In bootloader mode and use following command:
Code:
fastboot boot twrp.img
"twrp.img" should be the name of the recovery you downloaded.
In TWRP:
Select Install
Flash Magisk zip
If you want to install the TWRP:
go to Advanced > Flash Current TWRP
Reboot
You should now have Magisk root installed.
Click to expand...
Click to collapse
Do you have a tutorial for how to download and install twrp ?
maor23 said:
Do you have a tutorial for how to download and install twrp ?
Click to expand...
Click to collapse
Well, steps 3,4,5 & 7 are the tutorial if you just want to install TWRP. You can find the Nebrassy TWRP here.
Nightmare[ITA] said:
Well, steps 3,4,5 & 7 are the tutorial if you just want to install TWRP. You can find the Nebrassy TWRP here.
Click to expand...
Click to collapse
Thanks, mission completed!
Now, which magisk modules are recommended?
maor23 said:
Thanks, mission completed!
Now, which magisk modules are recommended?
Click to expand...
Click to collapse
Not many these days. Swift module for theming, viper4android, busybox, soundpacks maybe and systemless hosts for adblocking.