[Guide] [Android 9/10] [7/7Pro] Unlock, TWRP, Root, and Update - OnePlus 7 Pro Guides, News, & Discussion

------------------------------------------
Latest update to guide: Jul. 5, 2020
------------------------------------------
Hi everyone!
Many users browse these forums coming from Google or YouTube and have trouble navigating between many guides and threads expecting a working knowledge of Android devices. Many may say that if you don't know what you are getting into, don't do it, but this warning is not followed by many people. Instead of having to deal with the pleas for help from lost users with soft bricked phones, I decided we need a 'megathread' with accurate, easy to follow instructions with correct grammar and concise descriptions.
This thread is constantly updated. Please inform me with a reply or PM if you want anything modified
Sections:
Unlock the bootloader (required for most other modifications)
Install the TWRP custom recovery
Install Magisk for superuser/root
Install an OTA update while rooted

Section 1: Unlocking the bootloader (Windows Only)
If your device is a T-Mobile version, you must first request an unlock token from this website to complete this section. Your device may also need to be SIM unlocked. Check your carrier website for details. Using the cable included in the box is also recommended.
Step 1: With your phone turned on, open Settings. Scroll down to the bottom and select About phone. Touch Build number quickly until a toast message (grey rectangle at the bottom of the screen) appears reading You are now a developer!. Go back one screen to the main settings list and select System. Select Developer options. Turn on the switch next to OEM unlocking. Scroll down a small bit and turn on the switch beside Advanced reboot. Scroll down a bit more and turn on the switch beside USB debugging. Go back to the home screen.
Step 2: Plug your phone into your computer with the cable supplied in the box. On your phone, look in the notifications for a message that says: "Android System Charging this device via USB." Touch the notification once to expand it and again to open it. Choose File transfer from the list. Download and extract this zip file by right clicking it, clicking Extract All, then Extract. (File Credit: Google) This file contains the official ADB and Fastboot binaries. Open File Explorer and navigate to This PC. Under Devices and drives, click on the CD drive labelled with a bunch of numbers. Click on OnePlus_USB_Drivers_Setup and click yes in the User Account Control popup. Click Ok then Install, then Finish. Navigate back to the extracted ADB and fastboot files (the folder will likely be named platform-tools). With this folder open, hold shift and right click on the blank space. Click Open command window here or Open PowerShell window here. Unlock/wake up your phone. Type in the terminal window on your computer followed by the enter key
Code:
adb devices
A prompt should appear on your phone. Click Ok. Type followed by the enter key
Code:
adb reboot bootloader
Your phone screen should show the OnePlus logo as well as the words FastBoot Mode briefly. Type followed by the enter key
Code:
fastboot oem unlock
Warning: This next step will wipe your phone. On your phone, use the volume down key to select Unlock the bootloader and then the power key to select. Your phone will then be wiped and restart automatically.
Step 3: Follow the phone's initial setup exactly how you would if you were setting up a new phone. Restore any backup you have now. Once completely set up, follow the instructions from Step 1, ignoring the OEM unlocking switch. I also recommend typing this followed by enter
Code:
adb devices
A prompt should appear on your phone. Click Ok.
Your device is now Bootloader Unlocked.

Section 2: Installing TWRP (Windows Only)
Your bootloader must already be unlocked, and you must be on the latest version of OxygenOS. Using the cable included in the box is also recommended.
Step 1: With your phone turned on, hold the power button and until the reboot options menu appears on the right side. Click Bootloader. Plug your phone into your computer with the cable supplied in the box. Download these two files (File 1 for Android 10, File 1 for Android 9, File 2), which now work on both the OnePlus 7 Pro and OnePlus 7. (File Credit: @mauronofrio and Team Win Recovery Project). Put these files somewhere accessible, such as your Desktop.
Step 2: Open the folder with your ADB and Fastboot binaries (the folder will likely be named platform-tools). With this folder open, hold shift and right click on the blank space. Click Open command window here or Open PowerShell window here. Type in the terminal window
Code:
fastboot boot
followed by a space. Drag the image/img file you downloaded called twrp-3.3.1-79-guacamole-unified-Q-mauronofrio into your terminal window. The resulting command in your terminal window should read something like this
Code:
fastboot boot C:/Users/Arden/Desktop/twrp-3.3.1-79-guacamole-unified-Q-mauronofrio.img
If it does, click the enter key.
Step 3: On your phone, enter your PIN/Password/Pattern if requested. You should now see a screen with grey boxes. This is the TWRP recovery. Click Advanced, then ADB Sideload, then swipe the bar at the bottom to the right. On your computer, type
Code:
adb sideload
followed by a space. Drag the zip file you downloaded called twrp-3.3.1-79-guacamole-unified-installer-mauronofrio into your terminal window. The resulting command in your terminal window should read something like this
Code:
adb sideload C:/Users/Arden/Desktop/twrp-3.3.1-79-guacamole-unified-installer-mauronofrio.zip
If it does, click the enter key. On your phone, you will see some text scrolling in a black box. Once the button appears on the bottom right, click Reboot.
Your device now has the TWRP custom recovery.

Section 3: Installing Magisk
You must already have TWRP installed to complete this section.
Step 1: On your phone, download the Magisk installer zip (File Credit: topjohnwu). If you are not already in the TWRP recovery, hold the power button and until the reboot options menu appears on the right side. Click Recovery.
Step 2: Enter your PIN/Password/Pattern if requested. You should now see a screen with grey boxes. Choose Install and navigate to the folder you downloaded the Magisk file to. Select the Magisk file (likely named Magisk-20.4.zip) and swipe the bar at the bottom to the right. Once the button appears in the bottom right, click Reboot.
You now have Magisk root.

Section 4: Installing an OTA update while rooted
You must be rooted to complete this section.
Step 1: If you have any themes installed, such as Renovate ICE, Swift Themes, RoundyUI, or Substratum themes, remove them before continuing. Remove the Call Recording Enabler module if you have it. Restart if needed.
Step 2: Click on the system update notification. If it does not appear, open Settings, scroll to the bottom and click System, scroll to the bottom and click System updates. Click on the Install or Download and Install button and let it complete. Do NOT click Reboot.
Step 3: Open Magisk Manager and click the hamburger menu in the top left (3 horizontal lines). Click Downloads and then click the search icon (magnifying glass) in the top right corner. Type "TWRP" and click enter. Click the download arrow beside the module named TWRP A/B Retention Script. Do NOT click Reboot.
Step 4: Click the back button in the top left, followed by the hamburger menu in the top left as well (3 horizontal lines). Click Magisk and then click the top Install button, followed by Install again, then Install to Inactive Slot. You may now click Reboot.
You now have updated your phone's OxygenOS. Reinstall any modules or themes deleted in this process if they are compatible.

(reserved extra section)

Great idea, very thorough!

You forgot the very first step, which is to get sim unlocked. Without this OEM unlock will be greyed out

anoymonos said:
You forgot the very first step, which is to get sim unlocked. Without this OEM unlock will be greyed out
Click to expand...
Click to collapse
Oh, my bad. In my country it's illegal to sell locked phones

Arden144 said:
Section 1: Unlocking the bootloader (Windows Only)
<snip> Type followed by the enter key
Code:
fastboot flashing unlock
Warning: This next step will wipe your phone. On your phone, use the volume down key to select Unlock the bootloader and then the power key to select. Your phone will then be wiped and restart automatically.
Click to expand...
Click to collapse
I am curious about this step. For most all time with a phone that has an unlockable bootloader the command has always been:
Code:
fastboot [B]oem[/B] unlock
Why do we use 'flashing' instead of 'oem' in that command for this phone?

teddyearp said:
Section 1: Unlocking the bootloader (Windows Only)
<snip> Type followed by the enter key
I am curious about this step. For most all time with a phone that has an unlockable bootloader the command has always been:
Why do we use 'flashing' instead of 'oem' in that command for this phone?
Click to expand...
Click to collapse
Good question, actually. I'm not entirely sure why the wording change, but the command has been different on close to stock devices since the Nexus 6P/5X. If someone more knowledgeable could explain, that would be great

Arden144 said:
Code:
fastboot boot C:/Users/Arden/Desktop/twrp-3.3.1-3-guacamole.img
Click to expand...
Click to collapse
On earlier OOS versions, the command "fastboot boot" is broken, and this won't work. Process in that case is to flash a patched boot image, root with Magisk, and then flash TWRP like a Magisk module.
Your method works for those that have updated to more recent OOS versions. However, there are folks still out there with older OOS versions, where "fastboot boot" won't work (don't know the cutoff exactly).

redpoint73 said:
On earlier OOS versions, the command "fastboot boot" is broken, and this won't work. Process in that case is to flash a patched boot image, root with Magisk, and then flash TWRP like a Magisk module.
Your method works for those that have updated to more recent OOS versions. However, there are folks still out there with older OOS versions, where "fastboot boot" won't work (don't know the cutoff exactly).
Click to expand...
Click to collapse
Thanks for the info. I'm not going to add the patched image way, as extracting the boot.img is annoying and I'm trying to avoid methods that rely on someone else providing files. However, I'll add a note to the TWRP install section asking for 9.5.7 minimum as everyone should be on that update by now

I hope this gets stickied. Thank you for the guide

just an update, fastboot flashing unlock didnt work for me, but fastboot oem unlock did

Yayodroid said:
just an update, fastboot flashing unlock didnt work for me, but fastboot oem unlock did
Click to expand...
Click to collapse
For me also...the right command seems still fastboot oem unlock

Is this method applicable to all versions ? Im getting the GM1910: China version , I have used this method when i had my OP6 so i just have to get the correct TWRP version, if the IMG boots the TWRP i guess the zip will be good to go when flashing .
Cheers

Yayodroid said:
just an update, fastboot flashing unlock didnt work for me, but fastboot oem unlock did
Click to expand...
Click to collapse
I confirm this. Tried this tutorial but was stuck at flashing stage. A YouTube video provided further assistance. Fastboot oem unlock worked.

I think it's great you're supplying these basics. Wish I had it when I first rooted first Android device (htc Evo 4g on sprint). Kudos.

ph1dft said:
For me also...the right command seems still fastboot oem unlock
Click to expand...
Click to collapse
I'm skeptical that the command "fastboot flashing unlock" is applicable for this device. I think it may just be a carryover from some other device(s). The original poster responsed that it is applicable to "close to stock devices since the Nexus 6P/5X" but never explicitly stated whether it even worked for him on the 7 Pro.
Far as I can tell "fastboot oem unlock" is the correct and only command on this, and other previous OnePlus devices (and is also the command that worked for me).

Related

Use fastboot to flash 4.4.3 without waiting for OTA

This is the well-established way to flash factory images without waiting for the OTA, using a Windows computer.
You can have a custom recovery, but you must otherwise be stock.
Your bootloader must be unlocked.
You should not lose apps (except for non-stock system apps) or data, but don't hold me responsible if you do.
You will have to reload non-stock system apps like Xposed framework (in fact, I uninstalled the Xposed framework using the Xposed framework installer before starting this process).
This is a modification of the process explained here, which I have mostly cut-and-pasted:
http://forum.xda-developers.com/nexus-4/general/flash-android-4-3-build-clean-flash-t2376681
(Credit to mc704.)
1. You must have ADB, fastboot, and USB drivers for the N4 on your PC. Not hard to find; the thread referenced above tells you one way to get them. Put adb.exe, fastboot.exe, AdbWinApi.dll, and AdbWinUsbApi.dll in a folder on your PC - let's call it C:\N4Update
2. Enable USB Debugging via Developer settings on your phone.
3. The Nexus 4 (mako) 4.4.3 image can be obtained from Google
Image Link: https://developers.google.com/android/nexus/images#occamktu84l
Step 1: Use 7zip or an equivalent compression program to extract the stock 4.4.3 image file that has extension .TGZ
Step 2: You should see a stock image file that has extension .TAR...extract this once again with 7zip (or equivalent) into C:\N4Update
Step 3: Plug your device into the PC (USB debugging should be enabled)
Step 4: Launch command prompt from C:\N4Update, or alternatively start a command prompt (start --> run --> "cmd") and cd to it (cd C:\N4Update)
Step 5: Verify that the PC is detecting your device by typing in command prompt "adb devices" (you should see a code representing your device, and then "device" following it); if not, recheck usb debugging, and unplug and replug the phone back into your PC
Step 6: Turn your N4 off and go into fastboot (bootloader) mode (hold power button + Volume Up & Down all together)
Step 7: Type in the command prompt each step one at a time and wait for it to complete (obviously, don't enter the quotation marks):
"fastboot flash bootloader bootloader-mako-makoz30d.img"
"fastboot reboot-bootloader"
"fastboot flash radio radio-mako-m9615a-cefwmazm-2.0.1701.02.img"
"fastboot reboot-bootloader"
"fastboot update image-occam-ktu84l.zip"
Step 8: At this point, your N4 will reboot. This will take some time as your apps are re-initialized, but it should be clear what's going on.
Step 9: You will now have 4.4.3. You will be unrooted and have stock recovery. If you want, you can stop here.
If you want to install the TWRP custom recovery and regain root:
Step 10: Download the new version of SuperSU onto the N4 from here: http://download.chainfire.eu/446/SuperSU/UPDATE-SuperSU-v1.99r3.zip
Step 11: Download TWRP onto your PC in C:\N4Update from here: http://techerrata.com/file/twrp2/mako/openrecovery-twrp-2.7.0.0-mako.img
Step 12: Boot N4 back into fastboot (bootloader) mode while connected to the PC.
Step 13: With the command prompt from Step 4 above, type "fastboot flash recovery openrecovery-twrp-2.7.0.0-mako.img"
Step 14: Boot from the bootloader into Recovery by pressing volume up to display "Recovery" and then the power button to select.
Step 15: Use TWRP to install the zip (SuperSU) file from Step 10 to regain root.
Step 16: Reboot system.
You should now have a rooted system, with all of your old apps and data (except for system apps, which need to be reinstalled), and the latest TWRP custom recovery.
Don't wanna sound rude, but is there point in creating another how-to thread, along the other threads which some(link) are even mentioned in sticky roll-up threads? Plus it's 99% copy/paste, which you even mention so that's nice from you.
It's nice that someone have will to write(or even copy/paste/edit) tutorials, but by having more threads help is harder to find(search).
Just my humble opinion and experience
Also you can jsut remove the recovery img from the update package to keep your custom recovery
well I for one appreciate you posting this as now I don't have to search all over gods creation to find the old thread
Nevermind
i did all steps... but im spammed google now launcher has stopped
will factory reset help?
Night5talker said:
i did all steps... but im spammed google now launcher has stopped
will factory reset help?
Click to expand...
Click to collapse
Factory reset seems extreme. How about just uninstalling and reinstalling the launcher? (I assume the stock launcher still works.)
NYZack said:
Factory reset seems extreme. How about just uninstalling and reinstalling the launcher? (I assume the stock launcher still works.)
Click to expand...
Click to collapse
i did factory reset but apps did left on my phone storage and when i turned it on google play started to download it everything again
ps couldnt do anything it was poping right back up wheni press ok even if i go to another launcher
Night5talker said:
i did factory reset but apps did left on my phone storage and when i turned it on google play started to download it everything again
ps couldnt do anything it was poping right back up wheni press ok even if i go to another launcher
Click to expand...
Click to collapse
Well, sorry, don't quite understand: you could always just uninstall the Google Now launcher, make sure everything else is working, and then reinstall it once you confirm there's no other problem.
Anyone could just mention the procedure for doing same thing but through Wug toolkit.
In general I prefer to avoid fastboot commands and flash everything though pc.
Unleashed by my Nexus 4
No need to do all these steps (flashboot). They included scripts that will run all things
On Windows you can just run "flash-all.bat" or on Unix "flash-all.sh".
DarsVaeda said:
No need to do all these steps (flashboot). They included scripts that will run all things
On Windows you can just run "flash-all.bat" or on Unix "flash-all.sh".
Click to expand...
Click to collapse
Yeah but edit it with notepad and remove the -w flag to disable the wipe also remove the recovery.img from the zip to keep the custom recovery !
mashedbymachines said:
Yeah but edit it with notepad and remove the -w flag to disable the wipe also remove the recovery.img from the zip to keep the custom recovery !
Click to expand...
Click to collapse
Yeah, this is the key point - if that -w flag is not removed, you will lose all apps/data. One of the reasons I put this up is that I think the step-by-step method is interesting, instructive (you can see what's actually happening), not much more time-consuming than running the automated script, and lets you have more granular control.
(And I apologize if it's littering the forum and semi-plagiarism, but I thought a very detailed, confirmed step-by-step guide with up-to-date precise download links might be useful to people who haven't gone through the process before.)
What the ....
So I edited my flash-all.bat and removed the -w
It looks like this:
@ECHO OFF
PATH=%PATH%;"%SYSTEMROOT%\System32"
fastboot flash bootloader bootloader-mako-makoz30d.img
fastboot reboot-bootloader
ping -n 5 127.0.0.1 >nul
fastboot flash radio radio-mako-m9615a-cefwmazm-2.0.1701.02.img
fastboot reboot-bootloader
ping -n 5 127.0.0.1 >nul
fastboot update image-occam-ktu84l.zip
echo Press any key to exit...
pause >nul
Click to expand...
Click to collapse
And yet my phone was wiped.... sigh
** Update **
Nevermind, it was Notepad++ that screwed me over. The changes to the bat file was not written to the file, only kept in Notepad++'s temporary memory. ****ing bull**** feature.
Erroneus said:
What the ....
So I edited my flash-all.bat and removed the -w
It looks like this:
And yet my phone was wiped.... sigh
** Update **
Nevermind, it was Notepad++ that screwed me over. The changes to the bat file was not written to the file, only kept in Notepad++'s temporary memory. ****ing bull**** feature.
Click to expand...
Click to collapse
so in order to run this comand you only need to unzip the tar(?) file downloaded and then you are done, you don't have to unzip the actual factory image, correct?
fdg59 said:
so in order to run this comand you only need to unzip the tar(?) file downloaded and then you are done, you don't have to unzip the actual factory image, correct?
Click to expand...
Click to collapse
Actually, you have to run the unzip program twice:
For example, when updating to Android version 4.4.4 (Yes, a new version has already been released since this post):
Here is the downloaded file
occam-ktu84p-factory-b6ac3ad6.tar
Unzipping it will give you this:
occam-ktu84p-factory-b6ac3ad6
And unzipping that one more time will give you the directory "occam-ktu84p" containing the following files:
bootloader-mako-makoz30d.img
flash-all.bat
flash-all.sh
flash-base.sh
image-occam-ktu84p.zip
radio-mako-m9615a-cefwmazm-2.0.1701.03.img
WARNING: As was mentioned many times, remove the -w from the following line in the flash-all.bat file unless you intend to wipe your phone clean. I don't understand the issue with Notepad++ noted in a previous post, as you have to hit "save" like any other program (It is the program that I use as well).
fastboot -w update image-occam-ktu84p.zip
If what you were really asking is whether you need to unzip the file image-occam-ktu84p.zip.......The answer is no.
ah ah yes 4.4.4, that's why i am asking, because i always used to unzip everything and the flash items individually using fastboot which i always liked. The problem however was that my nexus 4 has 16gb and after flashing and wiping everything clean the memory showed up at 8gb so i had to factory reset through stock recovery which i didn't enjoy as much. thanks for all the help!

[TUTORIAL] Install MMB29X and Rooting

As the title says i am ready to show you guys how to install MMB29X and then how to root the device.
First of all , the requirements ofcourse..
1. A Nexus 5 with an unlocked bootloader obviously .. if not i'm gonna show you how to unlock the bootloader safe and fast.
2. Usb Cable ,preferably micro-usb , the size does not matter at all ..
3. ADB and FASTBOOT Drivers , you can download them from here
4. Original Firmware package from here
5. SuperSU Beta 2.66 from here
6. CWM Recovery , i used it in process you can use it too , worked for me ,it should work for you too.. here
7. Some Time
First Of all , download everything and install the drivers systemwide (reccomended)
1.0 Unlock your bootloader.. WARNING (THIS WILL WIPE YOUR DEVICE!)
1.1 - To do that put your phone into fastboot bode and connect it to the computer and search for adb in the programs , press windows key and search for adb , you will see a program called adb.exe don't panic and click the file! right click and open file location.
1.2 - After you will probably see fastboot and adb programs exe's good , that means you installed everything corectly congratulations!
1.3 - Shift+ Right click on a blank space and select open command window here.
1.4 - With the Device connected to pc via fastboot type in that command window ,without commas "fastboot oem unlock" that will unlock your bootloader , then type "reboot bootloader" to reboot to bootloader again. then you have to restart the phone normally and proceed to the next step.
2.0 Flashing MMB29X Image
2.1 - Put your phone into bootloader mode , power off the device and put it into bootloader mode vol.down + power then connect it to the computer ( hope you backed up your data! )
2.2 - On the computer ,copy the downloaded image file to the adb root folder that i talked in the first step then right click on the .tgz image file and extract it in there.
2.3 - Shift + Right click again on a blank space and select open command window here.
2.4 - Navigate onto the folder called "hammerhead-mmb29x" and run "flash-all.bat" file , that batch file will flash everything just take a break and relax until is finished then power up the device and configure it , wifi , google account etc..
2.5 - Copy SuperSU .zip file into sdcard directory
3.0 Custom Recovery and Root!! Finally ..
3.1 - After you completed step 2.5 power off your device and put it into bootloader mode and connect it to the computer.
3.2 - Copy "recovery-clockwork-touch-6.0.4.5-hammerhead.img" into that adb folder that we used before and rename it into "cwm.img"
3.3 - Shift + Right Click and select open command window here and type "fastboot flash recovery cwm.img"
3.4 - After the process is finished , go straight without rebooting into recovery mode by pressing the vol. down button 2 times and press power button to select the option to enter into the recovery mode.
3.5 - Select install zip > choose zip from sdcard > 0/ > and select supersu zip file , then install it! then go back and reboot the phone , IT WILL PROBABLY ASK YOU TO ROOT THE DEVICE , JUST PRESS NO AND LEAVE THE PHONE TO REBOOT !!
3.6 - Wait the phone to reboot and enjoy your rooted device!
3.7 - Press Thanks if i helped :good:
You've come a long way in a short time...
But your tutorial needs a proper proof-read. Did you walk through these steps yourself to make sure that the instructions are correct?
"SuperSU Beta 2.66" - why not the newest version?
"Usb Cable ,preferably micro-usb" - what other type will fit?
Step 1.0 You haven't mentioned in big red capital underlined letters "This will wipe your phone".
Step 1.4 "then you have to restart the phone normally" - why, since the next step is "Put your phone into bootloader mode"?
Step 2.1 "Put your phone into bootloader mode , power off the device and put it into bootloader mode" doesn't really make sense.
Step 2.4 You haven't mentioned in big red capital underlined letters "This will wipe your phone".
Step 3.2 says "rename it into "cwm.img"" and the following flash command refers to "zip".
Step 3.3 "type "flash recovery cwm.zip"" - wrong. "Fastboot flash recovery cwm.img".
But kudos for writing the tutorial and posting it as a help to others. Can you correct at least the errors so that new users don't get in a mess? And this time I suggest that you then walk through it step by step to be sure that you've got it all right.
Here is the complete guide for update to the latest firmware for those who have rooted phone:
[GUIDE] Update stock rooted/modified rom to last 6.0 Marshmallow w/o losing your data
I think it is sufficient and complete ...
dahawthorne said:
You've come a long way in a short time...
But your tutorial needs a proper proof-read. Did you walk through these steps yourself to make sure that the instructions are correct?
"SuperSU Beta 2.66" - why not the newest version?
"Usb Cable ,preferably micro-usb" - what other type will fit?
Step 1.0 You haven't mentioned in big red capital underlined letters "This will wipe your phone".
Step 1.4 "then you have to restart the phone normally" - why, since the next step is "Put your phone into bootloader mode"?
Step 2.1 "Put your phone into bootloader mode , power off the device and put it into bootloader mode" doesn't really make sense.
Step 2.4 You haven't mentioned in big red capital underlined letters "This will wipe your phone".
Step 3.2 says "rename it into "cwm.img"" and the following flash command refers to "zip".
Step 3.3 "type "flash recovery cwm.zip"" - wrong. "Fastboot flash recovery cwm.img".
But kudos for writing the tutorial and posting it as a help to others. Can you correct at least the errors so that new users don't get in a mess? And this time I suggest that you then walk through it step by step to be sure that you've got it all right.
Click to expand...
Click to collapse
Fixed!
Sent from my Nexus 5 using XDA-Developers mobile app
Really? I still see v2.66, "preferably micro-USB"... I stopped reading after that.
And you haven't confirmed that you've walked through the instructions to test that they now work.
Have you heard the saying "A little knowledge is a dangerous thing"?
And finally a general message - maybe I should add it to my signature:
(P.S. A plea to everyone in these forums. Don't reply to a simple 1-page thread post copying the entire post to which you're replying. I've already read the original - I don't need to read it again. Copy the original post only where necessary - e.g. if it's on a previous page. And even then copy only the point to which you're replying, not the entire post. The result will be clearer and shorter threads which will be more enjoyable to read.)
While we do appreciate your effort , the guide is incomplete and incoherent.
It might brick phones of new users.
Thread closed.
XDA Staff

[Easiest Method] Tutorial to Unlock Bootloader | Install Twrp | Root | Decrypt Data

Hi All ,
Steps To Unlock Bootloader
1. At First, open About phone on setting menu , then tap 4 times on Build Number. Now Developer Mode is enabled.
2. Open developer Mode menu and set oem unlock and usb debugging to ON. [Important Step]
3. Download and Extract the zip file which you have downloaded from the link given below.
4. Now enter into fastboot mode :
Press volume + power button and then phone will boot into fastboot interface.
5. Now connect the phone to computer and then open a command prompt window on the desktop (Shift + Right Click -> Open Command Window here)
Now type:
Code:
fastboot devices
The list of devices connected will be displayed.
Then enter the command :
Code:
fastboot oem unlock
6. Now you will see a Unlock Bootloader Warning page. Hit the Vol button to select Yes and turn it Blue and Hit Power Button to confirm the selection.
7. Thats it . Now your Bootloader is unlocked.
Steps To Install TWRP Recovery
1. After you have successfully unlocked the bootloader, now enter into the fastboot mode and connect the phone to pc.
2. Now navigate to the folder where you have extracted the downloaded zip file and open a command prompt window on the desktop (Shift + Right Click -> Open Command Window here)
Now type:
Code:
fastboot devices
3. The list of devices connected will be displayed.
4. Then enter the command :
Code:
fastboot flash recovery twrp-3.1.1-0-oneplus5.img
or
Code:
fastboot flash recovery (name of the twrp file).img
5. When the file is flashed successfully , unplug your phone from pc and manually boot the phone into recovery by pressing Power + Volume Down button.
6. Now the TWRP Recovery will be opened .
For the Users who face Max download error while flashing Twrp, Kindly check the post here
Steps To Disable Forced Encryption i.e, Decrypt Data
1. At first time when you open twrp, it will ask you to allow system modification.
2. Allow it and then flash the no-verity-opt-encrypt.zip file .
3. Then Go to Wipe-->Format Data.
4. Type Yes to confirm wiping of Internal Storage.
5. Now you have decrypted the data sucessfully.
Note: Dont try to restore the nanodroid backup which you have taken before. It may end in bootloop.
Steps To Root Your Phone
1. Download the SuperSu SR1 flashable zip from here and copy that zip file into internal storage.
2. Now Enter into the TWRP Recovery.
3. Now navigate to the downloaded SuperSu Zip file and Swipe to install SuperSu.
4. Reboot your device.
5. Now your device is rooted successfully. :fingers-crossed:
Steps To Backup IMEI [Important]:
For some cases you may lead to lose your device's Imei. It will lead to loose of network signals etc.
So we have to take backup of Imei and we can restore it on any such case.
There are two method to backup imei.
Method 1 :
Boot the phone to Twrp , take Backup of EFS partition to internal storage and copy the backup files to PC . In case , if you have lost your IMEI, this backup will help you to restore imei back.
Method 2 :
1. This method works on the Terminal window. So download any Terminal App .
2. Open the app and type su , then grant SuperUser permission when you are prompted to do so.
When you see the Terminal Emulator box, type the following command:
Code:
dd if=/dev/block/sdf1 of=/sdcard/modemst1.bin bs=512
Code:
dd if=/dev/block/sdf1 of=/sdcard/modemst2.bin bs=512
Please note that all commands are case sensitive and even a minor mistake will hider the successful backup. Type the command line carefully.
Now you have successfully took backup of imei to you internal storage . Copy that to your pc .
To Restore
Enter the following commands in Terminal Emulator Box:
Code:
dd if=/sdcard/modemst1.bin of=/dev/block/sdf1 bs=512
Code:
dd if=/sdcard/modemst2.bin of=/dev/block/sdf1 bs=512
Thats it your imei is restored :fingers-crossed:
Download Section
For TWRP recovery and other files Download Here
If u need Only twrp, Den click here
1. twrp-3.1.1-1-cheeseburger.img[official]
2. twrp-3.1.1-0-oneplus5.img [chinese]
3. Twrp latest by xdvs23
Thank you very much! Good to see TWRP here
HatRiGt said:
Hi All,
Steps To Unlock Bootloader
1. At First, open About phone on setting menu , then tap 4 times on Build Number. Now Developer Mode is enabled.
2. Open developer Mode menu and set oem unlock and usb debugging to ON. [Important Step]
3. Download and Extract the zip file which you have downloaded from the link given below.
4. Now enter into fastboot mode :
Press volume + power button and then phone will boot into fastboot interface.
5. Now connect the phone to computer and then open a command prompt window on the desktop (Shift + Right Click -> Open Command Window here)
Now type:
The list of devices connected will be displayed.
Then enter the command :
6. Now you will see a Unlock Bootloader Warning page. Hit the Vol button to select Yes and turn it Blue and Hit Power Button to confirm the selection.
7. Thats it . Now your Bootloader is unlocked.
Steps To Install TWRP Recovery
1. After you have successfully unlocked the bootloader, now enter into the fastboot mode and connect the phone to pc.
2. Now navigate to the folder where you have extracted the downloaded zip file and open a command prompt window on the desktop (Shift + Right Click -> Open Command Window here)
Now type:
3. The list of devices connected will be displayed.
4. Then enter the command :
5. When the file is flashed successfully , unplug your phone from pc and manually boot the phone into recovery by pressing Power + Volume Down button.
6. Now the TWRP Recovery will be opened .
Steps To Root Your Phone
1. Download the SuperSu flashable zip from here and copy that zip file into internal storage.
2. Now Enter into the TWRP Recovery.
3. Now navigate to the downloaded SuperSu Zip file and Swipe to install SuperSu.
4. Reboot your device.
5. Now your device is rooted successfully.
Download Section
Download the required zip file from Here
Credits : Thanks to chinese Dev for Twrp
Click to expand...
Click to collapse
Hey,
Thanks for the guide. However, where does the TWRP comme from? I'm a bit afraid of this, truth to be told ^^'
matssa said:
Hey,
Thanks for the guide. However, where does the TWRP comme from? I'm a bit afraid of this, truth to be told ^^'
Click to expand...
Click to collapse
source link added . check bro.
HatRiGt said:
source link added . check bro.
Click to expand...
Click to collapse
Erm, "Chinese dev" doesn't mean anything really. Don't you have a thread link, a github link, or anything in particular? It's almost like saying "Here an app", without really saying where it comes from. Kinda risky... Especially if it isn't the "Chinese dev" that shares it.
EDIT/// NVM, just was the source link... Sorry for that, was refreshing the wrong one...
matssa said:
Erm, "Chinese dev" doesn't mean anything really. Don't you have a thread link, a github link, or anything in particular? It's almost like saying "Here an app", without really saying where it comes from. Kinda risky... Especially if it isn't the "Chinese dev" that shares it.
Click to expand...
Click to collapse
kindly check the source link i.e, thread link
-----
Tested by me. Works fine.
HatRiGt said:
kindly check the source link i.e, thread link
Click to expand...
Click to collapse
Yeah just edited my comment, wasn't looking at the correct page... Gonna take a look, might wait a bit before testing.
I went to the source OP provided. It's 30 pages of people saying thanks...so I bit the bullet (after unlocking bootloader).
It works. Just flashed Magisk 13 beta using TWRP provided by OP.
SafetyNet passes with Magisk Hide. Cheers!
it work for me, thanks
HatRiGt said:
kindly check the source link i.e, thread link
Click to expand...
Click to collapse
When checking your link, I can't really see if everyone managed to test it correctly, Google translation shows some icky stuff in terms of device bricking.
matssa said:
Yeah just edited my comment, wasn't looking at the correct page... Gonna take a look, might wait a bit before testing.
Click to expand...
Click to collapse
I'm in the same boat, I like that it's done but the fact it isn't open-sourced and is provided by a sketchy Chinese version of a fake Oneplus site (take a look at the lack of SSL for example), I think I may hold off..
Thanks for sharing though OP, hope this might spark what we need to get the official version!
SonicSamZ said:
I went to the source OP provided. It's 30 pages of people saying thanks...so I bit the bullet (after unlocking bootloader).
It works. Just flashed Magisk 13 beta using TWRP provided by OP.
SafetyNet passes with Magisk Hide. Cheers!
Click to expand...
Click to collapse
bretzelpopo said:
it work for me, thanks
Click to expand...
Click to collapse
How did you make this work? Tried flashing in fastboot using
fastboot flash recovery twrp.....
However, doesn't work, still on OP recovery
EDIT/// Apparently worked Can't wait for a more open and official one
Have make a backup and this working. Only light dimming not work for now.
SonicSamZ said:
I went to the source OP provided. It's 30 pages of people saying thanks...so I bit the bullet (after unlocking bootloader).
It works. Just flashed Magisk 13 beta using TWRP provided by OP.
SafetyNet passes with Magisk Hide. Cheers!
Click to expand...
Click to collapse
Flashed it too after reading your post. Working flawless.
The China TWRP only work first time. After reboot again i see the stock recovery.
Schrotty35 said:
The China TWRP only work first time. After reboot again i see the stock recovery.
Click to expand...
Click to collapse
Maybe you need to delete recovery-from-boot.p from your system folder, and the twrp will be permanently
mauronofrio said:
Maybe you need to delete recovery-from-boot.p from your system folder, and the twrp will be permanently
Click to expand...
Click to collapse
Have you test this?
Schrotty35 said:
Have you test this?
Click to expand...
Click to collapse
If I had OnePlus 5 I would have resolved the problem inside the twrp, but no device is impossible for me. A complete recovery will soon be released.
The recovery-from-boot.p is the file that restore stock recovery when you reboot your phone (It is in all android firmware)
Schrotty35 said:
Have you test this?
Click to expand...
Click to collapse
did you restore your backup, after reboot . If yes, just uncheck boot when you restore and you dont need to format anything when flash recovery or kernel because these thing boot before system . For me twrp work good for me, the only thing is that i have flash supersu and when i want to switch to magisk, i delete all root on supersu app, and then impossible to boot on twrp, even after flash it with bootloader . The trick is to flash stock recovery from folder and then flash twrp .
Thanks

How to install Android 12 ( Derpfest ) for noobs!

In this guide, ill be showing you how to install a custom rom onto your OnePlus 7T Pro device. Ill be assuming your phone is completely stock and you haven't done any modifications. This is done at your own risk, i am not responsible for corrupted images, bricked devices etc.
*NOTE: This guide is for the OnePlus 7T Pro only*
What you will need:
A windows PC - idk buy one lol? *NOTE* You will need a Windows 10 PC, Windows 11 can't recognize your phone in fastboot for some reason. You can manually install the adb drivers to the PC If you must use windows 11.
Platform tools SDK - https://developer.android.com/studio/releases/platform-tools
USB cable that came with the phone
Derpfest ROM - https://sourceforge.net/projects/derpfest/files/hotdog/ (This was made by @NurKeinNeid, It's truly an amazing rom and would recommend it to anyone who wants android 12 on their devices! XDA forum for the ROM - https://forum.xda-developers.com/t/rom-12-0-derpfest-for-oneplus-7t-pro-official-hotdog.4250469/ ) Download the .img.zip, not just the .zip!
Orange Fox Recovery - https://orangefox.download/device/hotdog
Payload Dumper - https://androidfilehost.com/?fid=818070582850510260
Custom Flashing Script - https://github.com/AlaistairP/Install-Scripts
Step 1: Unlocking your Bootloader.
(i) In order to install software onto your phone you must have an unlocked bootloader. To start, go to settings - about phone - tap on the build number 7 times, input your password and developer options should then be enabled.
(ii) Then go into the main settings page - system - developer options. Enable the 'OEM UNLOCKING' feature. After that scroll down and enable USB Debugging. At this stage, plug your device into your pc. A dialogue should come up to allow the computer to connect to your phone, click yes.
(iii) Now on your computer, navigate to the platform tools folder you downloaded, in the main directory with all the files, in the search bar type cmd and press enter. You now need to boot your phone into fastboot mode. To do this, turn your phone off. Then, hold the power button with the volume up and down button! You should see a menu with green text saying 'Start' at the top.
(iv) Plug your phone into your computer, and in the cmd menu you opened, type 'fastboot devices', you should see the word fastboot followed by a string of numbers. Now type - 'fastboot oem unlocking' A dialogue will appear on your phone, using the volume keys select the option to unlock the bootloader. *NOTE - ALL DATA WILL BE REMOVED'
Step 2: Flashing a custom recovery
Reboot your phone to fastboot, then connect your phone to your pc. Type in 'fastboot reboot fastboot' your device should reboot into 'fastbootd' Now using the recovery.img file you downloaded from Firefox, type the following command, `'fastboot flash recovery 'PATH TO RECOVERY.IMG FILE'
Once the file has flashed, restart your phone into fastboot mode and using the volume keys, navigate to recovery mode. You should now boot into Orange Fox recovery. Now, in orangefox, go to Wipe - Format Data - then type yes and wait for the process to finish.
Voila!
Step 3: Flashing the ROM!
Open your downloaded version of derpfest, you should see a file called payload.bin, place that into the payload dumper input folder, then run the programme and wait for it complete, you should have loads of .img files. Copy all of these into your platform tools folder! Now download the custom script and place that into the platform tool folder as well.
Reboot your phone into fastboot mode, and once again type 'fastboot reboot fastboot' Once you're in fastbootd mode, right click the flash-all.bat script and run as admin, click more info if you have microsoft defender and click run anyway, The rest is done in the script!
*HOW TO UPDATE*
Once you have downloaded and extracted the new files from the most recent payload.bin file which the dev releases, copy these files into your platform-tools folder. You need to make sure there are no .img files from the old Rom remaining. Now, connect your phone to your pc. Open a cmd windows inside the platform-tools window and type 'adb reboot fastboot', once your phone has entered fastboot, type 'fastboot reboot fastbootd' Once your in fastbootd, simply run the update.bat script and voila!
After, reboot your phone and you should load into your new Android 12 OS!
If you have any questions please dont hesitate to ask!
If i have made any mistakes in this guide, or you guys think i should make any changes, let me know, im new to this!
*NOTE - I intend to make a full video walk through soon, ill have the youtube video linked here in the near future*
astroarchcraft said:
In this guide, ill be showing you how to install a custom rom onto your OnePlus 7T Pro device. Ill be assuming your phone is completely stock and you haven't done any modifications. This is done at your own risk, i am not responsible for corrupted images, bricked devices etc.
*NOTE: This guide is for the OnePlus 7T Pro only*
What you will need:
A windows PC - idk buy one lol?
Platform tools SDK - https://developer.android.com/studio/releases/platform-tools
USB cable that came with the phone
Derpfest ROM - https://sourceforge.net/projects/derpfest/files/hotdog/ (This was made by @NurKeinNeid, It's truly an amazing rom and would recommend it to anyone who wants android 12 on their devices! XDA forum for the ROM - https://forum.xda-developers.com/t/rom-12-0-derpfest-for-oneplus-7t-pro-official-hotdog.4250469/ ) Download the .img, not zip!
Orange Fox Recovery - https://orangefox.download/device/hotdog
Payload Dumper - https://androidfilehost.com/?fid=818070582850510260
Custom Flashing Script - https://github.com/astroarchcraft/A12script/tree/main
Step 1: Unlocking your Bootloader.
(i) In order to install software onto your phone you must have an unlocked bootloader. To start, go to settings - about phone - tap on the build number 7 times, input your password and developer options should then be enabled.
(ii) Then go into the main settings page - system - developer options. Enable the 'OEM UNLOCKING' feature. After that scroll down and enable USB Debugging. At this stage, plug your device into your pc. A dialogue should come up to allow the computer to connect to your phone, click yes.
(iii) Now on your computer, navigate to the platform tools folder you downloaded, in the main directory with all the files, in the search bar type cmd and press enter. You now need to boot your phone into fastboot mode. To do this, turn your phone off. Then, hold the power button with the volume up and down button! You should see a menu with green text saying 'Start' at the top.
(iv) Plug your phone into your computer, and in the cmd menu you opened, type 'fastboot devices', you should see the word fastboot followed by a string of numbers. Now type - 'fastboot oem unlocking' A dialogue will appear on your phone, using the volume keys select the option to unlock the bootloader. *NOTE - ALL DATA WILL BE REMOVED'
Step 2: Flashing a custom recovery
Reboot your phone to fastboot, then connect your phone to your pc. Type in 'fastboot reboot fastboot' your device should reboot into 'fastbootd' Now using the recovery.img file you downloaded from Firefox, type the following command, `'fastboot flash recovery 'PATH TO RECOVERY.IMG FILE'
Once the file has flashed, restart your phone into fastboot mode and using the volume keys, navigate to recovery mode. You should now boot into Orange Fox recovery. Now, in orangefox, go to Wipe - Format Data - then type yes and wait for the process to finish.
Voila!
Step 3: Flashing the ROM!
Open your downloaded version of derpfest, you should see a file called payload.bin, place that into the payload dumper input folder, then run the programme and wait for it complete, you should have loads of .img files. Copy all of these into your platform tools folder! Now download the custom script and place that into the platform tool folder as well.
Reboot your phone into fastboot mode, and once again type 'fastboot reboot fastboot' Once you're in fastbootd mode, right click the script and run as admin, click more info if you have microsoft defender and click run anyway, The rest is done in the script!
After, reboot your phone and you should load into your new Android 12 OS!
If you have any questions please dont hesitate to ask!
If i have made any mistakes in this guide, or you guys think i should make any changes, let me know, im new to this!
Click to expand...
Click to collapse
I really appreciate the time and work you put into it. Thank you very much!
Btw I will release new build tonight. Now I can link to this post in the update announcement as well.
NurKeinNeid said:
I really appreciate the time and work you put into it. Thank you very much!
Btw I will release new build tonight. Now I can link to this post in the update announcement as well.
Click to expand...
Click to collapse
No Problem, Quite satisfying to write actually! Thanks so much for all the effort you put into the ROM, Best one I have used on my phone yet! Looking forward to the new build
Hi Team, this method with flashing Orange Fox recovery and formatting Data, do you know if will enable backup/restore and viewable sdcard for Android 12/Derp?
The only thing I haven't been willing to try is formatting/converting Data, as I've re-setup my phone about 5 times now trying various methods over several days trying to get a working custom recovery for Derp
somemadcaaant said:
Hi Team, this method with flashing Orange Fox recovery and formatting Data, do you know if will enable backup/restore and viewable sdcard for Android 12/Derp?
The only thing I haven't been willing to try is formatting/converting Data, as I've re-setup my phone about 5 times now trying various methods over several days trying to get a working custom recovery for Derp
Click to expand...
Click to collapse
Hey I'm not sure about the backup/restore, but after formatting the drive, they'll no longer be encrypted so Orange Fox should be able to read the data on your drive.
Thought as much, time for another reinstall. Thanks again have a thumbs up.
Hi Astroarchcraft, thank you for this guide! If you only put it out 2 days earlier you'd have saved me from a soft brick! (from which I recovered luckily ahahh)
Anyway, could you please also add the guide on how to update to a newer build? Is there a way to do it without losing all data? Thanks!
Looking forward to move to the new 2022-01-07 build!
Instead of going to fastbootd after flashing orangefox recovery, it just goes to orangefox's fastboot mode and did the script there. Should it work the same? (I'm still waiting for the flash to finish, will update what will happen after) Thanks!
Edit: Looks like it works just the same even if you run flash all script inside orangefox recovery fastboot.
Anyways, thanks for the nice guide. Really helpful! I know i've been flashing ROMs ever since back then. But its always nice to have a guide here and there. So kudos to you for making this one. Thanks!
What if I'm on a A12 AOSP ROM and want to try Derpfest ROm? can I just flash it in TWRP or are there any instructions to follow?
iSyncX said:
Instead of going to fastbootd after flashing orangefox recovery, it just goes to orangefox's fastboot mode and did the script there. Should it work the same? (I'm still waiting for the flash to finish, will update what will happen after) Thanks!
Edit: Looks like it works just the same even if you run flash all script inside orangefox recovery fastboot.
Anyways, thanks for the nice guide. Really helpful! I know i've been flashing ROMs ever since back then. But its always nice to have a guide here and there. So kudos to you for making this one. Thanks!
Click to expand...
Click to collapse
Yup, orange Fox fastboot is fastbootd if you do it from the bootloader
salomaoa said:
What if I'm on a A12 AOSP ROM and want to try Derpfest ROm? can I just flash it in TWRP or are there any instructions to follow?
Click to expand...
Click to collapse
Nope, it's a fastboot ROM so it must be done via fastboot!
Ninotzz said:
Hi Astroarchcraft, thank you for this guide! If only you put it out 2 days earlier you'd have saved me from a soft brick! (from which I recovered luckily ahahh)
Anyway, could you please also add the guide on how to update to a newer build? Is there a way to do it without losing all data? Thanks!
Looking forward to move to the new 2022-01-07 build!
Click to expand...
Click to collapse
I'll make a guide later, but for the moment, all you need to do it download the update files, instead of the original files, and don't erase the data when given the option in the script!
astroarchcraft said:
I'll make a guide later, but for the moment, all you need to do it download the update files, instead of the original files, and don't erase the data when given the option in the script!
Click to expand...
Click to collapse
So won't I have problems with my data being encrypted by the previous version of the ROM? Will the new one be able to read it anyway?
Cheers ✌
I've updated and it was perfect, my recommendation for the moment is to go to the how to update section on the official ROM page and do what is said from there, like I said, I'll make a guide as soon as I get a chance
astroarchcraft said:
I've updated and it was perfect, my recommendation for the moment is to go to the how to update section on the official ROM page and do what is said from there, like I said, I'll make a guide as soon as I get a chance
Click to expand...
Click to collapse
Unfortunately NurKein removed it from the post in favor of the link to your guide So I'll try to follow what you told me in this thread for now
astroarchcraft said:
In this guide, ill be showing you how to install a custom rom onto your OnePlus 7T Pro device. Ill be assuming your phone is completely stock and you haven't done any modifications. This is done at your own risk, i am not responsible for corrupted images, bricked devices etc.
*NOTE: This guide is for the OnePlus 7T Pro only*
What you will need:
A windows PC - idk buy one lol?
Platform tools SDK - https://developer.android.com/studio/releases/platform-tools
USB cable that came with the phone
Derpfest ROM - https://sourceforge.net/projects/derpfest/files/hotdog/ (This was made by @NurKeinNeid, It's truly an amazing rom and would recommend it to anyone who wants android 12 on their devices! XDA forum for the ROM - https://forum.xda-developers.com/t/rom-12-0-derpfest-for-oneplus-7t-pro-official-hotdog.4250469/ ) Download the .img, not zip!
Orange Fox Recovery - https://orangefox.download/device/hotdog
Payload Dumper - https://androidfilehost.com/?fid=818070582850510260
Custom Flashing Script - https://github.com/astroarchcraft/A12script/tree/main
Step 1: Unlocking your Bootloader.
(i) In order to install software onto your phone you must have an unlocked bootloader. To start, go to settings - about phone - tap on the build number 7 times, input your password and developer options should then be enabled.
(ii) Then go into the main settings page - system - developer options. Enable the 'OEM UNLOCKING' feature. After that scroll down and enable USB Debugging. At this stage, plug your device into your pc. A dialogue should come up to allow the computer to connect to your phone, click yes.
(iii) Now on your computer, navigate to the platform tools folder you downloaded, in the main directory with all the files, in the search bar type cmd and press enter. You now need to boot your phone into fastboot mode. To do this, turn your phone off. Then, hold the power button with the volume up and down button! You should see a menu with green text saying 'Start' at the top.
(iv) Plug your phone into your computer, and in the cmd menu you opened, type 'fastboot devices', you should see the word fastboot followed by a string of numbers. Now type - 'fastboot oem unlocking' A dialogue will appear on your phone, using the volume keys select the option to unlock the bootloader. *NOTE - ALL DATA WILL BE REMOVED'
Step 2: Flashing a custom recovery
Reboot your phone to fastboot, then connect your phone to your pc. Type in 'fastboot reboot fastboot' your device should reboot into 'fastbootd' Now using the recovery.img file you downloaded from Firefox, type the following command, `'fastboot flash recovery 'PATH TO RECOVERY.IMG FILE'
Once the file has flashed, restart your phone into fastboot mode and using the volume keys, navigate to recovery mode. You should now boot into Orange Fox recovery. Now, in orangefox, go to Wipe - Format Data - then type yes and wait for the process to finish.
Voila!
Step 3: Flashing the ROM!
Open your downloaded version of derpfest, you should see a file called payload.bin, place that into the payload dumper input folder, then run the programme and wait for it complete, you should have loads of .img files. Copy all of these into your platform tools folder! Now download the custom script and place that into the platform tool folder as well.
Reboot your phone into fastboot mode, and once again type 'fastboot reboot fastboot' Once you're in fastbootd mode, right click the script and run as admin, click more info if you have microsoft defender and click run anyway, The rest is done in the script!
After, reboot your phone and you should load into your new Android 12 OS!
If you have any questions please dont hesitate to ask!
If i have made any mistakes in this guide, or you guys think i should make any changes, let me know, im new to this!
*NOTE - I intend to make a full video walk through soon, ill have the youtube video linked here in the near future*
Click to expand...
Click to collapse
Thank you for the awesome guide, I have some questions, since this wipes all my data, what is the most efficient way of backing up my device data as I always don't know what people do to not lose their data while constantly switching ROMs, keeping in mind that this is my first time installing a custom ROM ever!
as well as, what's your experience with the ROM so far, any bugs popped up? Widevine still L1 and SafetyNet passes?
Did you find a way of installing OxygenOS camera? if not, what GCAM are you using?
i think you should add "How to dirty flash an update " also.
0mar32 said:
Thank you for the awesome guide, I have some questions, since this wipes all my data, what is the most efficient way of backing up my device data as I always don't know what people do to not lose their data while constantly switching ROMs, keeping in mind that this is my first time installing a custom ROM ever!
as well as, what's your experience with the ROM so far, any bugs popped up? Widevine still L1 and SafetyNet passes?
Did you find a way of installing OxygenOS camera? if not, what GCAM are you using?
Click to expand...
Click to collapse
Some minor bugs have popped up, like apps closing randomly, but that was because of my magisk root, as soon as I got rid of it, all the apps worked. Oxygen OS Camera wouldn't work so I'm using a Gcam mod for the 7T Pro. As for keeping your data, i would advice performing a nandroid backup. There's guides on YouTube as to how to do this.
amitkuliyal said:
i think you should add "How to dirty flash an update " also.
Click to expand...
Click to collapse
About to start work on an updating part now
astroarchcraft said:
Some minor bugs have popped up, like apps closing randomly, but that was because of my magisk root, as soon as I got rid of it, all the apps worked. Oxygen OS Camera wouldn't work so I'm using a Gcam mod for the 7T Pro. As for keeping your data, i would advice performing a nandroid backup. There's guides on YouTube as to how to do this.
Click to expand...
Click to collapse
So nothing other than apps randomly closing, hmm, good, does Derpfest have a Parallel Apps feature like OOS? as I employ 2 WhatsApp accounts (Personal and Work accounts).
Are you using the recommended GCAM from the ROM Post? https://forum.xda-developers.com/t/...official-hotdog.4250469/page-18#post-86176205
anything else I need to be on the lookout for before I start, coming from OOS I mean, something missing from Derpfest that was on OOS?
Sorry for hammering you, it's just my first time flashing a custom ROM and I'm minutes away from doing it.

How To Guide (Guide) Install TWRP + Root + Install Magisk + Bypass Safetynet

Please note, the TWRP image used IS NOT the official TWRP image.
I am not responsible for any any harm, such as bricking, or bootloops, which may happen to your device. This is what worked for me.
Warning
As stated by @beatbreakee , do not flash anything on a T-Mobile related device.
Please read beatbreakee's comment regarding this.
Warning
This has only been tested on Android 13. This guide may not work for other Android versions.
Prerequisites
Unlocked Bootloader
Magisk 25.2 Installation ZIP (see attached files)
TWRP Image (download from GDrive)
ADB and Fastboot tools are installed on your machine. Please see this guide
Android 13
Spoiler: Step 1 - Unlocking Bootloader
Step 1 - Unlocking Bootloader:
1.A - Enable OEM Unlocking:
1. Open Settings Application -> About device -> Version -> Tap on Build Number 7 times
2. Open Settings Application -> Additional Settings -> Developer Options
3. Enable OEM Unlocking
4. Enable USB Debugging
1.B - Entering Bootloader
The bootloader must be unlocked in order to flash the recovery.
Ensure the device is connected to the computer via ADB by entering the following command
Code:
adb devices
The output should be something similar to this:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
(note the device name on the left will not be the same)
Reboot into the bootloader by entering the following command:
Code:
adb reboot bootloader
1.C - Unlock
Once entered, enter the following command:
Code:
fastboot flashing unlock
WARNING: THIS WILL WIPE ALL DATA ON THE DEVICE
Use the volume keys to select unlocking, and then use the power button to confirm.
Once complete, enter the following command:
Code:
fastboot reboot
You will now have to go through the device setup.
Repeat steps 1.A and 1.B to enter back into the bootloader
Spoiler: Step 2 - Flashing TWRP
Step 2 - Flashing TWRP:
2.A - Entering Bootloader
Repeat steps 1.A and 1.B to re-enter the bootloader
2.B - Flashing TWRP:
Again, this IS NOT the official TWRP image. I am not responsible for any harm which this may cause to this device. That being said, it appears to be functional.
The image used is from a leak found on this XDA post
This is not a bootable image. You must flash. fastboot boot img will not work
Enter the following commands to flash the TWRP image:
Code:
fastboot flash recovery_a twrp.img
Code:
fastboot flash recovery_b twrp.img
Code:
fastboot reboot recovery
You should notice you are in TWRP.
You may need to change the language to English.
2.C - Changing TWRP Language:
1. Tap on the button on the Second column, Third Row
2. Tap on the World icon
3. Select your language
4. Tap on the button on the bottom right corner of your display.
2.D - Booting into your phone
1. Select Reboot
2. Select System
You should now have successfully booted in the system with TWRP installed as your recovery
Spoiler: Step 3 - Flashing Magisk
Step 3 - Flashing Magisk:
3.A Preparing the Device:
1. Move the Magisk-v25-2.zip to your device
2. Reboot into your recovery / TWRP
This can be done by entering the following ADB command:
Code:
adb reboot recovery
3.B - Flashing Magisk:
1. Tap Install
2. Select the Magisk-v25-2.zip
3. Swipe to flash (this may take some time)
4. Tap Reboot
5. Tap System
You should now enter the device
3.C - Installing Magisk APK
Install the Magisk APK, click here to download the APK.
Install the APK, and you should have root!
Spoiler: Fixing Data Backup [Optional]
If you encounter a createTarFork() exited with error 255, do the following:
1. Reboot into TWRP
2. Select File Manager
3. Navigate to /data
4. Copy /data/fonts into /sdcard/
5. Copy /data/nandswap into /sdcard/
6. Delete /data/fonts
7. Delete /data/nandswap
The error should now be resolved
The deleted files should not cause any issues. If any issues do occur, then promptly restore them using the backups made to /sdcard/.
Spoiler: Bypassing Safetynet [Optional]
Step - Bypassing Safetynet:
This is optional; however, highly recommend
Note, due to the nature of Safetynet, this can change at anytime and may begin failing in the future.
A - Repackaging Magisk
1. Launch Magisk Manager
2. Tap Settings Icon (Top Right Corner)
3. Tap "Hide The Magisk App"
4. Enter New Application Name
5. Click OK and wait
6. Uninstall original Magisk APK if it has persisted
B - Enable Zygisk & Deny List
1. Launch Magisk Manager
2. Tap Settings Icon (Top Right Corner)
3. Enable "Zygisk"
4. Enable "Enforce Deny List"
C - Configure Deny List
it is recommended to add any application you would like to hide from Magisk here
1. Launch Magisk Manager
2. Tap Settings Icon (Top Right Corner)
3. Tap "Configure DenyList"
4. Tap the 3 dots in the top right and select "Show System Apps"
5. Select the following applications:
~ Android System
~ Google Play Store
~ Google Play Services
~ Google Services Framework
D - Delete App Data
1. Launch Settings Application
2. Select Apps
3. Select App Management
4. Clear data for the following apps:
~ Google Play Store
~ Google Play Services
~ Google Services Framework
5. Reboot the device
E - Flash Universal Safetynet Fix
1. Download the Universal Safetynet Fix
2. Launch Magisk
3. Select Modules
4. Select "Install From Storage"
5. Select Universal Safetynet Fix
6. Wait for Flashing to complete
7. Reboot
F - Test Safetynet
1. Install YASNAC
2. Grant Super User rights
3. Select "Run Safetynet Attestation"
If both checks pass, you successfully have passed Safetynet!
PlasmaTornado said:
Please note, the TWRP image used IS NOT the official TWRP image.
I am not responsible for any any harm, such as bricking, or bootloops, which may happen to your device. This is what worked for me.
Prerequisites
Unlocked Bootloader
Magisk 25.2 Installation ZIP (see attached files)
TWRP Image (download from GDrive)
ADB and Fastboot tools are installed on your machine. Please see this guide
Step 1 - Unlocking Bootloader:
1.A - Enable OEM Unlocking:
1. Open Settings -> About -> Tap on Build Number 7 times
2. Open Developer Settings
3. Enable OEM Unlocking
4. Enable Android Debugging Bridge (ADB)
1.B - Entering Bootloader
The bootloader must be unlocked in order to flash the recovery.
Ensure the device is connected to the computer via ADB by entering the following command
Code:
adb devices
The output should be something similar to this:
View attachment 5792895
(note the device name on the left will not be the same)
Reboot into the bootloader by entering the following command:
Code:
adb reboot bootloader
1.C - Unlock
Once entered, enter the following command:
Code:
fastboot oem unlock
WARNING: THIS WILL WIPE ALL DATA ON THE DEVICE
Then finally:
Code:
fastboot reboot
You will now have to go through the device setup.
Repeat steps 1.A and 1.B to enter back into the bootloader
Step 2 - Flashing TWRP Image:
2.A - Entering Bootloader
Repeat steps 1.A and 1.B to re-enter the bootloader
2.B - Flashing TWRP:
Again, this IS NOT the official TWRP image. I am not responsible for any harm which this may cause to this device. That being said, it appears to be functional.
The image used is from a leak found on this XDA post
! It is HIGHLY recommended that you boot into the twrp.img before flashing to ensure that TWRPworks . I did not, but I recommend you do. !
To test this, enter the following command:
Code:
fastboot boot twrp.img
Enter the following commands to flash the TWRP image:
Code:
fastboot flash recovery_a twrp.image
Code:
fastboot flash recovery_b twrp.image
Code:
fastboot reboot recovery
You should notice you are in TWRP.
You may need to change the language to English.
2.C - Changing TWRP Language:
1. Tap on the button on the Second column, Third Row
2. Tap on the World icon
3. Select your language
4. Tap on the button on the bottom right corner of your display.
2.D - Booting into your phone
1. Select Reboot
2. Select System
You should now have successfully booted in the system with TWRP installed as your recovery
Step 3 - Flashing Magisk:
3.A Preparing the Device:
1. Move the Magisk-v25-2.zip to your device
2. Reboot into your recovery / TWRP
This can be done by entering the following ADB command:
Code:
adb reboot recovery
3.B - Flashing Magisk:
1. Tap Install
2. Select the Magisk-v25-2.zip
3. Swipe to flash (this may take some time)
4. Tap Reboot
You should now enter the device
3.C - Installing Magisk APK
If for some reason the Magisk Installer did not install the Magisk APK, click here to download the APK.
Install the APK, and you should have root!
Click to expand...
Click to collapse
Good post but one problem...to unlock is " fastboot flashing unlock"
Canuck Knarf said:
Good post but one problem...to unlock is " fastboot flashing unlock"
Click to expand...
Click to collapse
Of course! Thank you, used to the old way of unlocking
I wonder about any major issues with this TWRP as of now. Updating ZIP OOS13 with flashing magisk direclty is working etc.?
kouzelnik3 said:
I wonder about any major issues with this TWRP as of now. Updating ZIP OOS13 with flashing magisk direclty is working etc.?
Click to expand...
Click to collapse
Following the method created by @dladz should still work perfectly fine!
There could still be issues with this TWRP as this is not an official image.
AFAIK Switching ROM is still untested, but decryption, backups and flashing are all confirmed working, which for me makes me feel significantly more comfortable
I won't switch ROMs as there aren't any, so this is ok. I was just asking if installing official OOS updates can be done via twrp now with flashing magisk right after for example.
But I glad decryption, backups and flashing zips working fine now. This is great news!
kouzelnik3 said:
I won't switch ROMs as there aren't any, so this is ok. I was just asking if installing official OOS updates can be done via twrp now with flashing magisk right after for example.
But I glad decryption, backups and flashing zips working fine now. This is great news!
Click to expand...
Click to collapse
This has yet to be tested but I have high hopes! If anyone could confirm in the near future it would be fantastic!
PlasmaTornado said:
This has yet to be tested but I have high hopes! If anyone could confirm in the near future it would be fantastic!
Click to expand...
Click to collapse
I will try factory wipe...flash flash from 2213...to 2215...might work
Canuck Knarf said:
I will try factory wipe...flash flash from 2213...to 2215...might work
Click to expand...
Click to collapse
Fantastic news. Let us know the results!
i wouldnt advise ANYONE with an original TMOBILE device, ANY attempt to flash ANY firmware from the official builds just yet. Tmobile embedded a VERY WELL HIDDEN check into the EFS partition that only appeared in builds after 11_A.14 ... This check forcefully activates a lock triggered by the CarrierDevicePolicy.xml in the efs system... and if the Region and model does not match the original build that it came with, all of your apps will be completely disabled and there is nothing accessible but the settings button. It also disables ADB/USB debugging completely, and deauthorizes your computer from the adb wireless keys too... then it removes the USB DEBUGGING toggle from settings, followed by a persistent message that your phone is "Violating Contract Policy... Please contact after sales for support" ... Tmobile cannot remove this warning... and even them sending an UNLOCK request to your phone for APPROVED will get ignored by your phone. You can hear ringing, but cannot accept calls... hear emails but not open them,.. and you dialer is in emergency calls only!...
At this point you will think panic is the only option, but instead just Pull your sim card, and use your buttons to force reboot and enter recovery .... Then do a Format Data ,,,, followed by a reboot, but do not put your sim back in... Until you go thru the whole setup wizard, enable usb debugging, and then flash a rollback package to a fw earlier than the one i listed above, your phone will INSTANTLY lock again any time you insert ANY sim card.
Im very sure that there is a system process that can be disabled which will at least block the lockout.... but i dont have that knowledge as to which process(es) are calling it! A logcat generated about 15 screens on my computer as soon as i plugged a sim in... so that was too much for me to sift thru. This is present on both the 10 Pro and 10 T so be warned.... If you are already not using your original T-MO firmware, but you also have been loading other regions with no problem, that does not matter.... I have found an exact reference to the ORIGINAL FW build and Model # that was loaded by TMO at the factory level, in several different TXT and XML files inside the EFS part. AND my 10T and 10 Pro BOTH have been fully bricked, then formatted and flashed thru an authorized MSM Account.... Doing an ERASE ENTIRE FILE SYSTEM, thru msm, did not get rid of this file, so i doubt a twrp level wipe will do it either... MAYBE an "unlock Critical" in Fastboot, followed by a "Fastboot wipe", "DM-verity disable", and "VB-Meta erasure" MIGHT take out this crazy security system, but i know this .... if you flash an original FW using TWRP, it has protections in it to keep IT (twrp) from being overwritten, so you might find yourself in bootloop territory if you region hop.... cuz the fw might notice the changes to the partitions... For now, until someone is brave enough to challenge the Android 12 kernel and remove these trapdoors, I would just be happy you have TWRP, and wait for the person who finds and slays the Tmobile Dragon hidden in our phones! But this is truly an android 12 function that was put in place for Carrier and Manufacturer benefit ONLY. Another strike against 1+
beatbreakee said:
i wouldnt advise ANYONE with an original TMOBILE device, ANY attempt to flash ANY firmware from the official builds just yet. Tmobile embedded a VERY WELL HIDDEN check into the EFS partition that only appeared in builds after 11_A.14 ... This check forcefully activates a lock triggered by the CarrierDevicePolicy.xml in the efs system... and if the Region and model does not match the original build that it came with, all of your apps will be completely disabled and there is nothing accessible but the settings button. It also disables ADB/USB debugging completely, and deauthorizes your computer from the adb wireless keys too... then it removes the USB DEBUGGING toggle from settings, followed by a persistent message that your phone is "Violating Contract Policy... Please contact after sales for support" ... Tmobile cannot remove this warning... and even them sending an UNLOCK request to your phone for APPROVED will get ignored by your phone. You can hear ringing, but cannot accept calls... hear emails but not open them,.. and you dialer is in emergency calls only!...
At this point you will think panic is the only option, but instead just Pull your sim card, and use your buttons to force reboot and enter recovery .... Then do a Format Data ,,,, followed by a reboot, but do not put your sim back in... Until you go thru the whole setup wizard, enable usb debugging, and then flash a rollback package to a fw earlier than the one i listed above, your phone will INSTANTLY lock again any time you insert ANY sim card.
Im very sure that there is a system process that can be disabled which will at least block the lockout.... but i dont have that knowledge as to which process(es) are calling it! A logcat generated about 15 screens on my computer as soon as i plugged a sim in... so that was too much for me to sift thru. This is present on both the 10 Pro and 10 T so be warned.... If you are already not using your original T-MO firmware, but you also have been loading other regions with no problem, that does not matter.... I have found an exact reference to the ORIGINAL FW build and Model # that was loaded by TMO at the factory level, in several different TXT and XML files inside the EFS part. So this is truly an android 12 function that was put in place for Carrier benefit ONLY. Another strike against 1+
Click to expand...
Click to collapse
Absolutely despicable and such an anti-consumer technique.
This stands against everything OnePlus was. It's sad to see OnePlus turn into such an anti-developer phone
A Carrier should never have this much power over a device. It is absurd
heres a google drive link to my account if anyone wants to see a video of what you will go thru if triggered!
feel free to share or re-upload the link/video to anywhere... ppl need to know this is happening thanks to Tmobile and Oneplus collaboration. I have not seen any reference to another carrier inside any of the device policy files, and my phone was restored to a NON TMO branded build of android 12 for the 2217 NA model, so it should NOT have even recognized the TMO policies cuz i even used a new sim card after the MSM Unbrick, and it still instantly locked in less than a second of plugging it in... heres the vid
https://drive.google.com/file/d/17H6YpGrUCe1Y7PoFji4gperdpTHNX5AI/view?usp=sharing
also everyone should know, that EVERY fw on the internet no matter whether it is labeled, 2213, or 2215... 2217, as well as 2413-2419 ALL have EVERY other model's manifest built in and all of the restrictions / bloatware that each region comes with, saved into the OFP extracted files.... so there really is nothing that expressly was bricking your phones by simply flashing a different labeled FW..... the brick came from the manifest reading the region identifiers that the manifests are labeled under.... it is a file that is again picked by some random hidden check inside the TMO EFS, and as soon as your phone tries to boot the newly flashed FW, the TMO Lock is what bricks your phone, to either a bootloop state, or if you continue to force a flash by using Fastboot , you will have a non responsive phone, thanks to this stupid security issue. If unresponsive, the only way out is MSM Tool... and i can help you locate your test points if your buttons dont work.
I cannot publicly post a picture nor a description of where the test points lie inside the 10T , because i already got a cease and desist letter from BBK and i dont know if they have said anything to the mods here about posting Undisclosed hardware access points.... but ive been a member here almost 10 years, and i aint risking a ban from a tattle tale company! There are test points on the 10 t though,.. just well hidden!
The 2nd pic is of the 2217 Unpacked OFP , yet the build prop shows a 2210-2211 base in one and a 2413-2415 base in the.... with NO 2217 in either prop,or manifest file, yet when my phone was flashed back from Brick status, THIS is the FW that was used, and my phone identifies as a 2217 NA now..... can oneplus be any more clear that they have completely turned against us, by straight SHOWING US that they are being super cryptic and sneaky in something as common as the BUILD.PROP files?!?
The weird thing happened to me. I was doing "fastboot boot twrp.img" and adb gave me an error "Too many links" and the device only shows a OP logo for a half second, then turned off and then again repetatively.
Even if I turned off the device by holding power button + volume up + volume down, then turned on, same behavior happened.
Well, my fastboot was accessible so I did "fastboot boot boot.img" which worked and system booted up. But what happened, what might been wrong?
kouzelnik3 said:
The weird thing happened to me. I was doing "fastboot boot twrp.img" and adb gave me an error "Too many links" and the device only shows a OP logo for a half second, then turned off and then again repetatively.
Even if I turned off the device by holding power button + volume up + volume down, then turned on, same behavior happened.
Well, my fastboot was accessible so I did "fastboot boot boot.img" which worked and system booted up. But what happened, what might been wrong?
Click to expand...
Click to collapse
It could been...cause you might of had to many things open containing the same file...plus you might want to try the command ( fastboot flash recovery_a )....then ( fastboot flash recovery_b )
Canuck Knarf said:
It could been...cause you might of had to many things open containing the same file...plus you might want to try the command ( fastboot flash recovery_a )....then ( fastboot flash recovery_b )
Click to expand...
Click to collapse
Oh. I had opened like two or three folders containing that file, yes. But this can cause it? Wow. And I wanted to try to boot it first instead of flashing it.
kouzelnik3 said:
Oh. I had opened like two or three folders containing that file, yes. But this can cause it? Wow. And I wanted to try to boot it first instead of flashing it.
Click to expand...
Click to collapse
Yeah i hear you but I'm not sure if this a bootable version or a just install version....I will try it on mine to see if i get the same as you
Don't use command "fastboot boot twrp.img"....your phone will keep rebooting to op logo...but fastboot still works
Canuck Knarf said:
Don't use command "fastboot boot twrp.img"....your phone will keep rebooting to op logo...but fastboot still works
Click to expand...
Click to collapse
Yeah, I realised that, this happened to me. Thanks to fastboot I was able to boot into stock boot image, so nothign really happened, but hey. So if I dont want to flash it but only try it, what willl be the command? Fastboot boot recovery twrp.img?
kouzelnik3 said:
Yeah, I realised that, this happened to me. Thanks to fastboot I was able to boot into stock boot image, so nothign really happened, but hey. So if I dont want to flash it but only try it, what willl be the command? Fastboot boot recovery twrp.img?
Click to expand...
Click to collapse
It appears the image is not bootable. As stated, this is the one thing I didn't try.
I have amended the guide. Thank you

Categories

Resources