[GUIDE][Z2 FORCE XT1789-05] Bootloader/TWRP/Custom ROMs/Root/Dirty flashing/Unbrick - Moto Z2 Force Guides, News, & Discussion

First, thanks to @Uzephi and @41rw4lk for helping me to use/recover my phone. Please, read and do not underestimate the guides: our phone is tricky! We have two system partitions (slot a and b) to allow stock updates on-the-fly. This complicates the normal flashing process and if you do not follow the steps, you may bootloop. Use these guides at your own risk!
Reading this page is a good beginning to understanding the A/B partitioning scheme and how Motorola Z2 Force works:
1) Our phone has A/B partitioning, so flashing Magisk/XPosed is different
2) It does not support Project Treble (faster stock updates)
3) It does not a recovery partition, so flashing TWRP is different
Note also that the RSD Lite from Motorola has issues with Windows 10 and you’ll need to manual flash firmware if you bootloop (see Process E below). Other way is directly flashing from Qualcomm EDL mode (Emergency Download Mode) from which users can perform various tasks like unbricking, unlock bootloader, and installation of any custom ROMs.
Right now, this guide has 5 parts (maybe we can dual boot our phone in the future). If you just want to use a rooted stock ROM, please, search for other guides here on xda. These guides were written (and tested) using a Motorola Z2 Force XT1789-05 phone (Brazil), although most of it should work for other variants if you download and use proper firmware files for these other phones. For other models, better if you follow Uzephi’s guide.
A. Opening bootloader
B. Preparing the phone to move into custom ROMs (AOSP) + TWRP recovery
C. Flashing a custom AOSP ROM + rooting
D. Dirty flashing AOSP ROM updates
E. Recovering from bricks or returning to stock
F. Oreo ROM features comparison table
If you want to move your Motorola Z2 Force to Project Treble ROMs, please, check this guide.
Here is a list of the ROMs that are waiting for you.

A. Opening bootloader
With enough battery in your phone (80%), you can follow the Motorola official guide which steps are:
1. Backup everything you need. Your phone will be reseted including the internal sdcard.
2. Into the phone, enable the Developer Options clicking 7 times over the version (About section in the Settings). Go to Developer Options, click the OEM unlock option to enable it. Also enable USB debugging.
3. Install the Motorola drivers in your computer, but (in my personal experience) not the Android SDK suggested in the official guide. Instead, extract these adb/fastboot files in a blank folder of your computer.
3.1) Do not use other adb/fastboot binaries: I cannot guarantee they will work.
3.2) You need to use a USB 2.0 port of your computer. Some users report that USB 3.0 will also work.
4. Open a command line window in the adb/fastboot folder (step 3), reboot the phone into the bootloader (see adb command below or press power + volume down buttons). Plug the phone on computer (see 3.2 above). Test the connection and run the command to get the code for unlocking:
Code:
adb reboot bootloader
fastboot devices
fastboot oem get_unlock_data
You’ll get:
Code:
(bootloader) Unlock data:
(bootloader) <code 1>
(bootloader) <code 2>
(bootloader) <code 3>
(bootloader) <code 4>
(bootloader) <code 5>
5. You’ll need to join 5 codes and, after logging into your own Motorola account, check by clicking the button “Can my device be unlocked” (step 6) by Motorola here. Read the text: your warranty will be void if you go ahead. Consider if you have enough knowledge, time and money to deal with a troublesome (or bricked) device. Although, it’s not that easy to hard brick this phone (see process E below).
Code:
<code 1><code 2><code 3><code 4><code 5>
6. You’ll receive back an email with the code to unlock your bootloader (if it is available for your model). Then you’ll run the following command:
Code:
fastboot oem unlock <code 1><code 2><code 3><code 4><code 5>
7. You’ll receive a warning that all your data would be erased (see step 1 above) and need to re-run the same command to confirm. At this point, your bootloader should be unlocked. As an Android restriction, each time you boot the phone you’ll see a warning. Do nothing, wait for 5 seconds and the phone boots normally. Some users bother with this warning and try to get rid of it.

B. Preparing the phone to move into custom ROMs (AOSP) + TWRP recovery
Requirements: unlocked bootloader (see guide A) and no security lock: disable PIN, gestures and fingerprinting (because TWRP cannot read the locked/cryptographed data of the phone). Enough battery in your phone (80%).
If you do not prepare your phone to custom ROMs and if you do not have both bootloaders of the phone in the same Android version of the ROM you’ll flash, you’ll hard brick the phone and lose also the access to the bootloader! You’ve been warned: follow the guide!
Note: if you hard brick, I suggest you be prepared to follow the Unbrick Qualcomm mobiles with Step-by-step guide or the Unbrick All Qualcomm Snapdragon’s from Qualcomm HS-USB QDLoader 9008 guide, but I never tested them myself. You can also use Qualcomm Flash Image Loader (QFIL) tool.
1. Backup everything you need. Your phone will be reset including the internal sdcard.
2. Into the phone, enable the Developer Options clicking 7 times over the version (About section in the Settings). Go to Developer Options and enable USB debugging.
3. Install the Motorola drivers and the adb/fastboot files.
3.1) do not use other adb/fastboot binaries: we cannot guarantee they will work.
3.2) you need to use a USB 2.0 port of your computer. Some users report that USB 3.0 will also work.
4. Download the firmware of the same Android major version of the future ROM you’ll install (Oreo for Oreo ROMs, for instance). When (and if) we move to Android P, most probably we will need to follow this guide again.
- Retail (XT1789-05) (Europe/Brazil).
- Other models (branded): ATT, Sprint, T-Mobile (TMO), USC, Verizon.
- Note: NPXS26 versions stand for Nougat and OPXS27 for Oreo. You do not need Nougat versions for anything.
5. Extract the zip contents to a blank folder in your computer.
6. Download the FlashAll_XT1789-05.zip file, extract the content and move all files to the same firmware folder (step 5 above). Be sure to overwrite any file (if needed).
7. Run the Preparation.bat file there to generate the flashfile.bat file that will send the commands to the phone. Credits: the original preparation files were from RootJunky (can be downloaded here) and include more options that we do not need for our purpose here. Also, it includes adb/fastboot binaries that could not work with our phone.
8. Reboot the phone into the bootloader (see adb command below or power + volume down buttons). Open a command line window in the firmware folder (step 5 above), test the connection and execute the flashfile.bat file generated on step 7.
Code:
adb devices
adb reboot bootloader
fastboot devices
flashfile.bat
Never ever unplug the device from the USB 2.0 port while flashing the firmware. This could cause a hard brick and your device will be dead.
9. There is a pause at the end. You should review if everything went fine (or even click on the menu of the command line window, select all and copy&paste the contents in a .txt file for further help/revision).
10. Reboot your phone into the system (ROM) and do a quick configuration (remember that everything will be deleted when you install TWRP further…).
11. Into the phone, enable the Developer Options clicking 7 times over the version (About section in the settings). Go to Developer Options and enable USB debugging.
12. Download both the .img and .zip file of the TWRP recovery from the official site. It's the same file for all models/variants of Z2 Force phone. Put the files into our firmware folder (step 5 above). Copy the .zip file to the phone internal card. Note: versions older than 3.2.2-2 does not support PIN/Password/Fingerprint, so disable them before proceed. Most probably, ROMs before July 20th, 2018 cannot be flashed in older TWRP.
13. Now boot (not flash) the TWRP .img file using a command line window in the same firmware folder (step 5 above):
Code:
adb devices
adb reboot bootloader
fastboot devices
fastboot boot <TWRP file name>.img
14. Only now that you’re inside TWRP temporarily flash the TWRP .zip file you’ve saved into the phone (step 12 above).
15. Reboot into TWRP (use the main reboot menu in TWRP).
16. Now, you should reboot again into bootloader: inside TWRP, go to Reboot menu and choose Bootloader.
17. Now you will wipe all user data via bootloader. This is necessary to use an AOSP ROM when you come from stock. Using a command line window in the same firmware folder of your computer (step 5 above), run the following commands:
Code:
fastboot devices
fastboot -w
18. Now you can reboot the phone into System using the buttons volume up/down to navigate and confirming with the Power button. You’ll be with stock ROM and TWRP. If you want to move to a custom AOSP ROM, do a quick configuration: into the phone, enable the Developer Options clicking 7 times over the version (About section in the settings). Go to Developer Options and enable USB debugging and go to the proper guide (Process C).

C. Flashing a custom AOSP ROM + rooting
1. Requirements:
1.1 Motorola drivers.
1.2 Our custom adb/fastboot files (others may not work!).
1.3 USB debugging enabled into the Developer Options.
1.4 If you're using TWRP older than 3.2.2-2, disable disable PIN/gestures/fingerprinting. Also, most probably, ROMs after July 20th, 2018 cannot be flashed in older TWRP.
1.5 An USB 2.0 port of your computer (some users report that USB 3.0 will also work).
1.6 Two Oreo bootloaders (process B above).
1.7 Permanent TWRP
1.8 Enough battery in your phone (80%).
2. Download the AOSP ROM you want and move the .zip files to the phone. Right now, we have:
2.1 Dirty Unicorns: no need for Gapps. Official and Weeklies can be dirty flashed interchangeably. RC has a different signature. Support on Google+ page. More about DU kernel.
2.2 Lineage OS 15.1. MindTheGapps needed. OpenGapps not compatible yet. XDA thread.
2.3 Mokee: Gapps needed. Take care: online guides assume that you already have an AOSP ROM, TWRP and rooted device.
Deprecated (?)
2.4 AOSiP: no need for Gapps. XDA thread.
2.5 Invictrix. Gapps are built in. XDA thread
3. Choose the root method and download the .zip files: Magisk (suggested) or LineageOS SU Addon. Move the .zip files to phone. Note: if you bootloop on Magisk, most probably you’re flashing a wrong/different version of Magisk or you did not reboot between flashing ROM/Gapps and Magisk. Note: SuperSu is deprecated.
4. Reboot into TWRP:
Code:
adb reboot recovery
Then flash the ROM. It will be flashed in two steps only in the “other” slot. We have two slots, A and B. Our phone can be upgraded on-the-fly because the update is always applied to the slot not booted, the “other” slot. Then, immediately, flash the .zip TWRP or you will lose it.
5. Go to Reboot menu of TWRP and reboot into bootloader. Then, in the folder with adb/fastboot binaries (see 1.2 above), you need to wipe data (including sdcard) with the following commands:
Code:
fastboot devices
fastboot -w
6. Now you need to reboot the phone into System using the buttons volume up/down and confirming with the Power button (or typing fastboot reboot into the command line windows). You’ll be with an AOSP ROM and TWRP.
7. Once into the phone, enable the Developer Options clicking 7 times over the version (About section in the settings). Go to Developer Options and enable USB debugging if you intend to dirty flash ROM updates.
8. Reboot into TWRP again, flash Magisk (your settings and modules will be preserved). Note: if you bootloop on Magisk, remember it is mandatory to reboot between ROM flash (step 4 above) and GApps/Addon flash due to verity/slot-swap logic.
9. A good place to read what is not working is in the section known problems of LineageOS.

D. Dirty flashing AOSP ROM updates
1. If you follow all the processes above, you can dirty flash updates because you have:
1.1 Motorola drivers installed.
1.2 Specific adb/fastboot files for our phone and an USB 2.0 port in a Windows computer (some users report that USB 3.0 will also work).
1.3 Unlocked bootloaders (Process A above).
1.4 Permanent TWRP running and TWRP .zip file placed inside your phone and ready to be flashed again.
1.5 An AOSP ROM already running.
1.6 Developer Options and USB debugging enabled.
1.7 If you're using TWRP older than 3.2.2-2, disable disable PIN/gestures/fingerprinting. Also, most probably, ROMs after July 20th, 2018 cannot be flashed in older TWRP.
1.8 Enough battery in your phone (80%)
2. Download your ROM .zip update, copy it into the phone sdcard and reboot your phone into TWRP. See download links here.
3. Within TWRP you should flash (install) things in the following order:
3.1 ROM update .zip file. Remember that, at this time, the update will be flashed int the other slot and inside phone you’ll have both the system before update (in the booted slot) and updated ROM in the other slot.
3.2 TWRP .zip file (step 1.4 above) once again (do not skip this step or you’ll bootloop!).
4. Reboot to System: if you skip this step, you’ll bootloop.
5. Reboot into TWRP again, flash Magisk (your settings and modules will be preserved) or LineageOS SU Addon .zip file. Note: if you bootloop on Magisk, most probably you’re flashing a wrong/different version of Magisk. I suggest v16.0 and, after you got rooted with 16.0, you can update. It is mandatory to reboot between ROM flash (step 4 above) and GApps/Addon flash due to verity/slot-swap logic.
Note: SuperSu is deprecated.
6. Wipe Dalvik/ART cache: go to Wipe menu of TWRP > Advanced Wipe > Dalvik/ART Cache only.
7. Reboot your phone into System (ROM) will use the “other” slot, the one with the updated ROM.
8. You can use XPosed installer app (and reboot).
9. Now you can add your PIN, fingerprint, gestures back until next flashing.

E. Recovering from soft bricks or returning to Stock
If you’re reading this is because you already unlock your bootloader (see guide A) and anything went wrong, but you still can boot your phone into bootloader. Plug your phone and get enough battery (even if you do not see any charging signal).
1. Install the Motorola drivers and the specific adb/fastboot files for our phone. Remember, follow the rules because our device is tricky!
1.1) Do not use other adb/fastboot binaries: we cannot guarantee they will work.
1.2) You need to use a USB 2.0 port of your computer (some users report that USB 3.0 will also work).
2. Download the latest firmware for your model:
- Retail (XT1789-05) (Europe/Brazil).
- Other models (branded): ATT, Sprint, T-Mobile (TMO), USC, Verizon.
- Note: NPXS26 versions stand for Nougat and OPXS27 for Oreo. You do not need Nougat versions for anything.
3. Extract the zip contents to a blank folder in your computer.
4. Download the FlashAll_XT1789-05.zip file (it should work for other Motorola Z2 Force models as well), extract the content and move all files to the same firmware folder (step 2 above). Be sure to overwrite any file (if needed).
5. Run the Preparation.bat file there to generate the flashfile.bat file that will send the commands to the phone. Credits: the original preparation files were from RootJunky (can be downloaded here) and include more options that we do not need for our purpose here. Also, it includes adb/fastboot binaries that could not work with our phone.
6. Reboot the phone into the bootloader (see adb command below or power + volume down). Open a command line window in the firmware folder (step 5 above), test the connection and execute the flashfile.bat file generated on step 5.
Code:
adb reboot bootloader
fastboot devices
flashfile.bat
Never ever unplug the device from the USB 2.0 port while flashing the firmware. This could cause a hard brick and your device will be dead.
7. There is a pause at the end. You should review if everything went fine (or even click on the menu of the command line window, select all and copy&paste the contents in a .txt file for further help/revision).
8. Reboot your phone into system (ROM) and do not forget, later, to enable the Developer Options and USB debugging again.
Note: if you hard brick, I suggest you be prepared to follow the Unbrick Qualcomm mobiles with Step-by-step guide or the Unbrick All Qualcomm Snapdragon’s from Qualcomm HS-USB QDLoader 9008 guide, but I never tested them myself. You can also use Qualcomm Flash Image Loader (QFIL) tool. Maybe these Latest 2017 Qualcomm Diag QD-Loader Windows 10 Drivers signed will help you.

F. Oreo ROM features comparison
This is a table for Oreo ROM features comparison for Motorola Z2 Force - nash.
I would like to receive feedback and updates from the users, as I can't keep changing from one ROM to another and they get new features, updates, improvements, etc.
I consider Lineage OS 15.1 our stock ROM regarding to customization. So, it's not listed there.
Legend:
Code:
X = Feature present
XX = ROM excels in this particular feature (in my opinion).

If you want to move your Motorola Z2 Force to Project Treble ROMs, please, check this guide.
Here is a list of the ROMs that are waiting for you.

I came back to stock ROM. the problem is that it gets stuck in the initial configurations of the android trying to find a wifi network, to continue the configuration, without success, because I see in fastboot that the baseband is unknown, and I also can not install any rom, or recovery image because I have the following message in fastboot: FLASHING_LOCKED. and since I can not get past the initial android settings, I also can not unlock the developer options to enable OEM unlocking. now I'm standing in a rom that does not leave the initial configuration, it does not connect to any network and a fastboot that does not let me install anything. and I also tried the recovery mode and even tried to install an update via sideload, without success. I do not know what else to do if you can give me a light.

renanjones said:
I came back to stock ROM. the problem is that it gets stuck in the initial configurations of the android trying to find a wifi network, to continue the configuration, without success, because I see in fastboot that the baseband is unknown, and I also can not install any rom, or recovery image because I have the following message in fastboot: FLASHING_LOCKED. and since I can not get past the initial android settings, I also can not unlock the developer options to enable OEM unlocking. now I'm standing in a rom that does not leave the initial configuration, it does not connect to any network and a fastboot that does not let me install anything. and I also tried the recovery mode and even tried to install an update via sideload, without success. I do not know what else to do if you can give me a light.
Click to expand...
Click to collapse
I see two possible scenarios:
1. Your bootloader is locked (yet) (see guide A).
2. Your in a "false locked" situation that, maybe, could be solved by resetting data via recovery or in bootloader (with the command: fastboot -w).

Great tutorial, but I did not get 4g in any of the roms, only 3g

Gutto said:
Great tutorial, but I did not get 4g in any of the roms, only 3g
Click to expand...
Click to collapse
I got 4G in any ROM... AOSIP, DU or Invictrix...
Are you using a branded (carrier) phone? If not, maybe you should return to stock (to recover any changes on partitions).

Technical said:
I got 4G in any ROM... AOSIP, DU or Invictrix...
Are you using a branded (carrier) phone? If not, maybe you should return to stock (to recover any changes on partitions).
Click to expand...
Click to collapse
My cell phone and Sprint, I did every process that you indicated, but not 4G

So I followed the instructions as noted, as soon as I got to the root installation part, it started throwing a "cannot mount /system" error. I thought a reboot would solve the issue, but now I think I'm bricked. Can't boot into anything, all I can do is plug my phone in and listen to it keep disconnecting every 10 seconds or so. The phone had booted up fine prior to starting the installation process, and I don't see how just a bad ROM install is preventing me from getting into either bootloader or recovery. Any advice?
For clarity, i'm unable to use QBOOT to do anything since after it hits the "powered on" state I'm assuming it's in, it just resets and does the same thing over and over again

shalpp said:
So I followed the instructions as noted, as soon as I got to the root installation part, it started throwing a "cannot mount /system" error. I thought a reboot would solve the issue, but now I think I'm bricked. Can't boot into anything, all I can do is plug my phone in and listen to it keep disconnecting every 10 seconds or so. The phone had booted up fine prior to starting the installation process, and I don't see how just a bad ROM install is preventing me from getting into either bootloader or recovery. Any advice?
For clarity, i'm unable to use QBOOT to do anything since after it hits the "powered on" state I'm assuming it's in, it just resets and does the same thing over and over again
Click to expand...
Click to collapse
Have you tried holding vol dwn + pwr btn to force it into bootloader mode? If you can get there, then you can use the keys to get to recovery and try a factory reset. If that don't work, go back to bootloader mode and try flashing back to stock. Might double check that the battery has plenty of charge.

41rw4lk said:
Have you tried holding vol dwn + pwr btn to force it into bootloader mode? If you can get there, then you can use the keys to get to recovery and try a factory reset. If that don't work, go back to bootloader mode and try flashing back to stock. Might double check that the battery has plenty of charge.
Click to expand...
Click to collapse
I'm unable to get the phone out of qboot (or whatever it's called). I've tried using a blank-flash but all that happens is device restarts as made evident by the "device disconnect" sound playing every few seconds. The phone had around 80% when I started the process. Should I just let it die and try loading into BL after a few hours of this thing power cycling itself?

shalpp said:
I'm unable to get the phone out of qboot (or whatever it's called). I've tried using a blank-flash but all that happens is device restarts as made evident by the "device disconnect" sound playing every few seconds. The phone had around 80% when I started the process. Should I just let it die and try loading into BL after a few hours of this thing power cycling itself?
Click to expand...
Click to collapse
It's weird that it is power cycling like that. Have you tired unplugging the phone and booting? Whether it's recovery, bootloader, qboot; you need to get to one place or the other if possible because power cycling won't allow you to do anything. If you can get a stable boot in any mode I would suggest moving your cable to another port so any corruptions aren't a factor anymore. I don't think a drain will resolve anything, but I've never heard anyone mention power cycling like that.

41rw4lk said:
It's weird that it is power cycling like that. Have you tired unplugging the phone and booting? Whether it's recovery, bootloader, qboot; you need to get to one place or the other if possible because power cycling won't allow you to do anything. If you can get a stable boot in any mode I would suggest moving your cable to another port so any corruptions aren't a factor anymore. I don't think a drain will resolve anything, but I've never heard anyone mention power cycling like that.
Click to expand...
Click to collapse
Power cycling is just an assumption since regardless of whatever port its in it keeps an endless loop of connect, disconnect". Basically after rebooting the device after attempting to install the ROM is when it went black and started not doing anything other than connect, disconnect

shalpp said:
Power cycling is just an assumption since regardless of whatever port its in it keeps an endless loop of connect, disconnect". Basically after rebooting the device after attempting to install the ROM is when it went black and started not doing anything other than connect, disconnect
Click to expand...
Click to collapse
When it's trying to connect do you have a pop up on your pc showing what it sees the phone as? Does it say nash fastboot, or 9008, Z2? That might give some idea of where it's failing.

41rw4lk said:
When it's trying to connect do you have a pop up on your pc showing what it sees the phone as? Does it say nash fastboot, or 9008, Z2? That might give some idea of where it's failing.
Click to expand...
Click to collapse
It appears as Qualcomm 9008
It only starts the loop after starting a blankflash. That's about the only response I get out of the device, otherwise it does absolutely nothing, no combination of buttons do anything
Edit: Confirmed connect/disconnect on another machine with the same driver configuration

Related

[GUIDE] Nexus 5 - How to Unlock Bootloader, Install Custom Recovery and Root

{
"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"
}
Setup, Preparation and Prerequisites
Basic tasks that I may refer to throughout this guide:
Open command prompt - Press Window Key + R, type in "cmd" (without the quotes), and hit enter.
Enter the bootloader - Turn the phone off. Hold volume down + power. The bootloader is also known as fastboot mode.
ADB and Fastboot Installation
Download the full Android SDK here (scroll to the bottom of the page>DOWNLOAD FOR OTHER PLATFORMS>SDK Tools Only) or get a slimmed version containing only the essential components(Thanks @El Daddy)
Link removed since it expired
Extract the zip and place the android-sdk-windows folder on your desktop.
**If you chose to download the slimmed sdk skip to step 5**
Only if you downloaded the full sdk: Go into the android-sdk-windows folder and run SDK Manager.exe. Install the following packages (there are a total of 4 packages):
- Tools > Android SDK Tools, Android SDK Platform-tools
- Extras > Android Support Library, Google USB Driver
Only if you downloaded the full sdk: Go back into the android-sdk-windows directory, and you should see a new folder named platform-tools. If you don't see this new folder, repeat the step above.
To confirm that it is indeed working, open a command prompt window and enter the following commands:
Code:
cd Desktop/android-sdk-windows/platform-tools
adb version
If it displays "Android Debug Bridge version x.x.xx" it is working. If it is gives an error saying that adb is not a recognized command, it has not been successful. Carefully repeat the steps above if this is the case. Close the command prompt window when you are done.
USB Debugging - On your phone go to Settings > About phone > Tap on Build number 7 times. This will enable Developer options. Now go back to Settings > Developer options > Enable USB debugging
Show File Extensions - Open a command prompt window and run "Control folders" (without the quotes). Go to the View tab and uncheck the "Hide extensions for known file types" option. This will help avoid confusion when renaming files.
Battery - Ensure that your phone has at least 60% battery remaining, and that your PC is plugged in and wont shut down spontaneously during the process. The procedure doesn't take very long (5-15 minutes), but its best to have enough charge in case something goes wrong.
Backup (Optional) - Unlocking the bootloader will completely wipe all data from the device. This includes apps, settings and even the contents of the internal sdcard (pictures, music, etc.). Copy all important files off the phone onto a PC or upload them to a cloud.
Driver Installation - Try this first, but if that doesn't work look here. Still having issues? Give this a try. None of these working? Hopefully this does the trick.
Downloads
Download a custom recovery of your choice and the SuperSU zip below. Place both files (recovery image and root zip) in the platform-tools folder located on your desktop within the android-sdk-windows folder.
Custom Recovery:
TeamWin Recovery Project (TWRP) or ClockworkMod (CWM)
Root:
SuperSU
Information
Rooting a nexus device is actually quite a simple and easy process. Before you begin, it is recommended that you at least try to understand what each part of the process will do. Although this guide will elongate each step in order to show all of the details, the method used can be broken up into 3 main steps: Unlocking the Bootloader, Installing a Custom Recovery and finally Rooting. Each new step relies on the previous step to have been completed, and a basic summary of each part is:
Unlocking Bootloader: Opens the door to the internal memory of the device to be written on to. This allows you to flash images onto the main partitions of the phone.
Installing a Custom Recovery: A custom recovery is flashed onto the recovery partition of the device and overwrites the stock recovery that exists by default. Custom recoveries bring lots of functionality and give you the ability to perform wipes, install flashable zips, create full backups of your NAND (Nandroid backup), and various other features. An unlocked bootloader is needed to install a custom recovery.
Rooting: You can gain root by either flashing via recovery a pre rooted custom rom, or flashing a zip containing the SuperSU binaries. A custom recovery is necessary to do this.
After completing these steps your phone will be rooted, the phone will have a custom recovery installed, and the phones bootloader will be unlocked. This, in my opinion, is the most practical and beneficial method for rooting your phone. It gives you some basic adb/fastboot knowledge, and should hopefully help you have a decent understanding of what is going on. Also this method will work regardless of what android version your phone has. Using a toolkit will only make things worse in the long run...learn to do it properly. It has been proven that every time you use a toolkit, god kills a kitten. Save the kittens.
If you are confused by anything in this guide, I would highly suggest getting it clarified being before moving on. Ask your question in this thread and I or someone else will likely answer. Also I'd suggest that you read over the whole thread a few times before actually doing anything to the phone.
Understand? Good...lets begin:
1. Unlocking Bootloader
Turn the phone off. Then boot it into the bootloader/fastboot mode by holding volume down + power.
Plug the phone into your PC, then open a command prompt window window and type:
Code:
cd Desktop/android-sdk-windows/platform-tools
Code:
fastboot devices
This command will list the connected devices. If your phones serial number shows up you are good to go and may continue. If the phone is NOT listed this indicates that your drivers are not installed correctly. In order for you to continue you must fix your drivers so that your phone is listed under fastboot devices.
If the phone has been recognized by the command above, proceed to unlocking the bootloader with the following command:
Remember that this step will wipe EVERYTHING off the phone
Code:
fastboot oem unlock
On the phone a screen should pop up asking whether or not you would like to unlock the bootloader. Use the volume rockers to highlight "Yes" then press power to confirm the action.
After the above command has finished excuting, run the following (DO NOT skip this step, it is more important than you think):
Code:
fastboot reboot
The phone will reboot. Next you will be presented with a screen containing an android logo and a progress bar (this may take up to ten minutes to complete). Wait until the phone has fully booted up into android, then proceed onto the next section of the guide.
Close the command prompt window.
2. Installing a Custom Recovery
Turn the phone off. Then boot it into the bootloader/fastboot mode by holding volume down + power.
Rename the recovery file that you downloaded above to recovery.img. *Make sure that you rename it to recovery.img NOT recovery.img.img* Remember that you should place the file in the platform-tools folder inside of the android-sdk-windows folder on your desktop.
Open command prompt and run the following commands:
Code:
cd Desktop/android-sdk-windows/platform-tools
Code:
fastboot flash recovery recovery.img
On the phone, use the volume buttons to scroll onto "Restart Bootloader" and hit power to select it. After the bootloader reloads, use the volume buttons to scroll onto "Recovery Mode" and power to select it. You should then be greeted with your newly installed custom recovery.
Close the command prompt window.
3. Rooting
Now that your phone has an unlocked bootloader and a custom recovery installed you have a two options to gain root (Pick one or the other. You don't need to do both)
Option A) Flash SuperSU binaries which will give you root with the stock rom
Confirm that you have downloaded the SuperSU zip from the downloads section above and that it is located in the platform-tools folder inside of the android-sdk-windows folder on your desktop.
Turn the phone off then boot into the bootloader. (volume down + power). Once in the bootloader use the volume rockers to scroll onto Recovery Mode, then press power to select it. This should bring you into your newly installed custom recovery. Leave the phone at the home page of the custom recovery.
Open a command prompt window and run the following commands:
Code:
cd Desktop/android-sdk-windows/platform-tools
Code:
adb push UPDATE-SuperSU-v[COLOR="Red"]X[/COLOR].[COLOR="red"]XX[/COLOR].zip /sdcard/
This will copy the SuperSU zip onto your phone. Once the command has completed continue.
Instructions for TeamWin Recovery Project (TWRP):
Install > browse to SuperSU zip and select the it
Swipe to confirm the installation. Then reboot.
Instructions for ClockworkMod (CWM):
install zip from sdcard > choose zip from sdcard.
Next, browse to the location where you previously copied the SuperSU zip and select the it.
To confirm the installation, scroll down to "Yes" and select it. The installation shouldn't take very long, and once it has completed you may reboot.
Option B) Flash a custom rom which will come pre-rooted
Note that not all custom roms will be pre rooted, however the majority of them are. Read the OP of the ROM thread to see what the verdict is.
Copy a custom rom (you can find these in the Nexus 5 Android Development and Nexus 5 Original Android Development section) onto the phone (remember the location where you copy it to)
Turn the phone off then boot into the bootloader. (volume down + power). Once in the bootloader use the volume rockers to scroll onto Recovery Mode, then press power to select it. This should bring you into your newly installed custom recovery. To install a custom rom the general procedure to follow is: factory reset, wipe cache + dalvik cache, flash ROM, flash GApps. Here are the recovery specific instructions:
Instructions for TeamWin Recovery Project (TWRP):
Wipe > Swipe to Factory Reset
Install > browse to the location where you previously copied the ROM zip and select it > Swipe to confirm the installation
Install GApps using same process as ROM, then reboot.
Instructions for ClockworkMod (CWM):
wipe data/factory reset
wipe cache partition
advanced > wipe dalvik cache
install zip from sdcard > choose zip from sdcard > navigate to the location of the rom > select the rom > confirm the installation by selecting "Yes"
After that you may install the GApps using the same method for flashing the rom, and finally reboot the phone.
Keep in mind that the first boot after installing a custom rom & wiping the phone may take longer than usual, as the phone will need to rebuild the dalvik cache and initialize other first boot stuff.
Congrats! That is all! Your phone now has an unlocked bootloader, a custom recovery installed and is rooted...Plus you saved a kitten. Enjoy
Troubleshooting & FAQ
Why am I seeing a red triangle with a dead android when booting into recovery even after I flashed a custom recovery?
What you are seeing is the stock recovery, meaning that the custom recovery that you flashed did not install correctly. Try the following suggestions:
Make sure you are using the USB cable that came with your phone. Only use other ones, if the stock one isn't working
Try using different USB ports. USB 2.0 ports (the ones that ARE NOT blue) are preferable. USB 3.0 ports (the blue ones) may cause problems with connectivity.
If you are on a desktop, use the ports on the back of the tower instead of the ones in the front. These ports are directly connected to the motherboard, rather than the ones in the front which are usually attached to a header cable which then indirectly connects to the motherboard.
My phone wont boot into android. I can only access the bootloader and custom recovery. What do I do?
Suggestion 1: Factory reset via recovery.
TWRP Instructions:
Boot into recovery
Wipe > Swipe to Factory Reset
Reboot
CWM Instructions:
Boot into recovery
wipe data/factory reset
wipe cache partition
advanced > wipe dalvik cache
Reboot
If that doesn't work continue onto Suggestion 2.
Suggestion 2: Push a ROM to your phone and flash it.
Download a ROM onto your computer. If you don't have time to look for a ROM, just download the stock ROM.
Move the downloaded ROM onto your desktop, and rename the file to "ROM.zip" (without the quotation marks)
Boot phone into recovery
Open command prompt and run the following commands:
Code:
cd Desktop
adb push ROM.zip /sdcard/
Wait for it to finish copying the file, then flash the ROM. If you need further details on how to flash a ROM take a look at the OP, section 3. Rooting, Option B)
If that doesn't work continue onto Suggestion 3.
Suggestion 3: Flash the factory images.
Flash the factory images
My phone wont boot into android. I can only access the bootloader. What do I do?
Flash the factory images
My phone exploded. What do I do?
Tape it back together then flash the factory images
Awesome post. Got a question: if I ONLY unlock bootloader will I still be able to get and install OTA updates?
Sent from my Nexus 4 using Tapatalk
dombera said:
Awesome post. Got a question: if I ONLY unlock bootloader will I still be able to get and install OTA updates?
Sent from my Nexus 4 using Tapatalk
Click to expand...
Click to collapse
Yes, if you only unlock the bootloader you will still be able to get ota's. The lock state of your bootloader will not affect your ability to receive ota's.
Chromium_ said:
Yes, if you only unlock the bootloader you will still be able to get ota's. The lock state of your bootloader will not affect your ability to receive ota's.
Click to expand...
Click to collapse
Awesome, thx
Sent from my Nexus 4 using Tapatalk
This is awesome, will come in handy.
Sent from my HTC Desire using XDA Premium 4 mobile app
Chromium_ said:
Yes, if you only unlock the bootloader you will still be able to get ota's. The lock state of your bootloader will not affect your ability to receive ota's.
Click to expand...
Click to collapse
What about if you unlock the boot loader and root, will you be able to get OTAs then? I guess a better question is what's the point of no return (without reflashing the factory image) where you break OTA updates? Thanks for the thread btw!
Can people please post confirmation of TWRP or CWM recoveries + rooting working without problems if they've done it? I know it's unofficially supported at this time, but getting some data collected would be useful.
---------- Post added at 01:43 AM ---------- Previous post was at 01:41 AM ----------
Xero258 said:
What about if you unlock the boot loader and root, will you be able to get OTAs then? I guess a better question is what's the point of no return (without reflashing the factory image) where you break OTA updates? Thanks for the thread btw!
Click to expand...
Click to collapse
If you unlock bootloader & root, and modify some system files, OTAs may not be able to pass some pre-install checks, at least this has happened to me on N4 before. I added one line to /etc/build.prop, also one of the older SuperSU versions had to be uninstalled for pre-install OTA checks to pass.
Whyzor said:
Can people please post confirmation of TWRP or CWM recoveries + rooting working without problems if they've done it? I know it's unofficially supported at this time, but getting some data collected would be useful.
Click to expand...
Click to collapse
There isn't *yet* a booting custom recovery for the Nexus 5. Give it a couple of days.
I see some Desire folks
Did u order one chromium?
Is unlocking the bootloader going to be the same as on my GNex, where it wipes the device in the process? If so, this will be the first thing I do when I get it out of the box on Monday.
talz13 said:
Is unlocking the bootloader going to be the same as on my GNex, where it wipes the device in the process? If so, this will be the first thing I do when I get it out of the box on Monday.
Click to expand...
Click to collapse
If you wipe cache exactly after you unlock the bootloader, without booting, no.
Nbsss said:
I see some Desire folks
Did u order one chromium?
Click to expand...
Click to collapse
Not yet. Hoping to eventually get it though.
Whyzor said:
Can people please post confirmation of TWRP or CWM recoveries + rooting working without problems if they've done it? I know it's unofficially supported at this time, but getting some data collected would be useful
Click to expand...
Click to collapse
There are currently no working custom recoveries, so it really only makes sense to unlock the bootloader for now. That way you'll be ready to continue on with the guide right when a stable recovery is released.
Sent using xda-developers app
Nbsss said:
I see some Desire folks
Did u order one chromium?
Click to expand...
Click to collapse
I'm not a really famous desire user but yes I bought it. Did you buy it to? Happy to see some other desire users.
Sent from my HTC Desire using XDA Premium 4 mobile app
Maybe it's a silly question, but can I unlock the bootloader before even booting up the phone for the first time? Can this cause some problems?
boysetsfire said:
Maybe it's a silly question, but can I unlock the bootloader before even booting up the phone for the first time? Can this cause some problems?
Click to expand...
Click to collapse
It should work fine, but whats wrong with booting it up for the first time?
Chromium_ said:
It should work fine, but whats wrong with booting it up for the first time?
Click to expand...
Click to collapse
Nothing wrong, just the laziness of not wanting to do the initial setup two times
Chromium_ said:
There are currently no working custom recoveries, so it really only makes sense to unlock the bootloader for now. That way you'll be ready to continue on with the guide right when a stable recovery is released.
Sent using xda-developers app
Click to expand...
Click to collapse
abaaaabbbb63 said:
There isn't *yet* a booting custom recovery for the Nexus 5. Give it a couple of days.
Click to expand...
Click to collapse
Ok, the wording in OP is:
"Currently neither recovery has official support for the Nexus 5, so the download links below are unofficial and may not be functioning 100% correctly."
and:
"**Warning: Currently there are no officially stable custom recoveries, so i would only recommend unlocking the bootloader for now**"
Which implied that it does work, just not thoroughly tested. Now from the recent replies you're saying it DOES NOT boot at all into recovery?
Whyzor said:
Ok, the wording in OP is:
"Currently neither recovery has official support for the Nexus 5, so the download links below are unofficial and may not be functioning 100% correctly."
and:
"**Warning: Currently there are no officially stable custom recoveries, so i would only recommend unlocking the bootloader for now**"
Which implied that it does work, just not thoroughly tested. Now from the recent replies you're saying it DOES NOT boot at all into recovery?
Click to expand...
Click to collapse
Yes that is correct, they do not boot. I will update the OP now, sorry for the confusion.
Originally I had read the following threads and it seemed that they were somewhat functioning, but it is now confirmed that neither one boots.
TWRP
CWM

[NO ROOT] How to Install TWRP & custom ROM without root on Galaxy S5 G900

Hello!
This thread is to teach you how to flash TWRP, along with a custom ROM on your T-Mobile Galaxy S5 WITHOUT root!
DISCLAIMER:
Read the whole thread at least one before trying!
Anything you do to your device is your own decision. I am not forcing you to do this. If you screw something up during the process, that isn't my fault.
Custom ROMs can sometimes be unstable. PLEASE make sure you are downloading the correct file for your device model.
Tampering with your device's firmware, including custom recoveries, ROMs, or rooting your device WILL VOID THE WARRANTY.
Flashing a custom ROM WILL DELETE YOUR DATA. Consider backing up your apps, photos, videos, files, etc. online or to an external storage.
Before we start, we need to download a few things.
*Do not download anything with Safari! Safari unzips zip files, but we want them to stay zipped. DO NOT RE-ZIP THE FILE YOURSELF!!! It will not be zipped in the correct format!*
1. Odin v3.12.3: (Odin)
2. The TWRP recovery tar file: (TWRP)
3. Your custom ROM zip file. (There are many ROMs out there, but Lineage is a pretty good one: (Lineage OS klte) Choose the most recent release.) IMPORTANT: Make sure you download this to your phone's internal/external storage to an easily accessible location.
4. A GApps package. This is required if you want to be able to download apps from the Google Play Store. Go to the Open GApps page and choose ARM, and Android 7.1. You shouldn't need anything more that micro. IMPORTANT: This file also goes onto your phone's internal/external storage.
5. Your device drivers. Most of the time, Windows will automatically install the required drivers once you put in the device, but in the case this doesn't happen, try googling your devices model number and "windows drivers." Follow the process to install.
Alright, with that out of the way, let's install TWRP.
1. With your phone unplugged, boot into "Download mode." Power off your device. Then hold down the Power, Home, and Vol- buttons until you see a warning pop up.
2. Accept the warning by clicking Vol+.
3. Run the Odin exe file we downloaded earlier. (You may have to unzip the file first.)
4. Go to Options and disable auto reboot. Go back to the Log tab.
5. Plug your device into the computer. You should see Odin say "ADDED!" on the side.
6. Click "AP" and locate the TWRP recovery tar file we downloaded earlier.
7. Once you select the file, click "Start."
8. When finished, it should say "PASS" at the top. This is where you unplug your phone and remove the battery.
9. Wait 10 seconds before putting the battery back in.
10. Try booting into recovery by holding down the Power, Home, and Vol+ buttons. If it reads "Team Win Recovery Project" at the top, then congrats! You've successfully flashed TWRP! If it says at the top "stock recovery," try the whole process again from step #1.
Now we can flash your custom ROM!
1. This is where we wipe your phone's data. Click on "Wipe." Then Swipe to factory reset.
2. After you have wiped your device, click on "Install"
3. Now navigate to the ROM zip file and select it.
4. Click on "Add more zips"
5. Navigate to the GApps zip file and select it.
6. Swipe to install. This can take some time, so grab a cup of coffee and maybe check out my Youtube channel?
7. The moment of truth: click on Reboot, then System. The first boot can take a minute. If it doesn't show up after 5 minutes, remove the battery and try wiping and flashing again.
CONGRATULATIONS!! You've installed a custom ROM! Enjoy! :laugh:
EXTRA:
If you want to enable root on your Lineage OS device, you must flash an additional file first.
1. Go to this link and download the first su (arm) file and save it to an easily accessible location.
2. Boot into recovery mode once again by powering off your device, then pressing and holding Power, Home, and Vol+ until TWRP appears.
3. Click on install.
4. Select the su zip file we downloaded earlier.
5. Swipe to install.
6. Once it is installed, boot back into system.
7. Navigate to developer options in settings.
8. Scroll down to"Root Access" and change it to either Apps, or Apps and ADB.
Awesome, now you have root!
Thanks for the help:
[url]https://forum.xda-developers.com/tmobile-galaxy-s5/general/root-how-to-root-sm-g900t-firmware-t3358190[/URL]
I did not work for me, when I go recovery mode it shows:
Could not do normal boot
Odin mode.
I'm definitely not an pro at this, so can anyone help me please
Worked perfectly on the latest stock OTA!
Doesn't work for me. When I reboot in recovery ode, instead of TWRP loading I get a generic Android Recovery screen with a few options - reboot system now, reboot to bootloaded, apply update from ADB apply update from SD card, wipe data/factory reset, wipe cache partition, mount /system, view recovery logs, power off. Now sure how to proceed....
bradmccoy said:
Doesn't work for me. When I reboot in recovery ode, instead of TWRP loading I get a generic Android Recovery screen with a few options - reboot system now, reboot to bootloaded, apply update from ADB apply update from SD card, wipe data/factory reset, wipe cache partition, mount /system, view recovery logs, power off. Now sure how to proceed....
Click to expand...
Click to collapse
We’re you sure to unplug and remove the battery? This is essential to ensure the phone powers down. If you just power down the phone will reset the recovery to avoid TWRP. You have to remove any power source to force a shutdown before it can reset. Please feel free to respond and I’ll be happy to help to the best of my abilities!
Thank you so much for this tutorial. It worked perfectly in my SM-G900MD, and it's easier than the method suggested by the Lineage OS page itself. :good:
Thanks, these steps worked just fine on an SM-G900T, and were very easy to follow.
Thank you! This worked beautifully.
Only thing that didn't work the first time is, is that it told me to download the Gapps Android 8.1 file instead of 7.1.
I hear people talking of unlocking the bootloader in order to install a custom ROM. Why haven't you mentioned that in this article?
Had the "FAIL! (Auth)" problem with flashing TWRP with Odin.
It seems that after I have disabled Reactivation Lock (the standard feature that requires activation of the phone with Samsung account) it helped to succeed flashing TWRP.
Hi All,
Thanks for a great and useful guide. Whilst it says this can be achieved without root, which is fantastic... It doesn't mention anything about tripping Knox or not?? I assume this will trip the Knox counter, won't it ?? Or do this method bypass that ??
Thanks, Lister
adult supervision needed for Samsung S5 Lineage 17 install
Hi, I'm good with adb and fastboot, running Linux with the commandline Odin4. I can get the phone to the warning screen about the danger of installing other Roms. How do I proceed? What are the commandline options to use to flash the LineageOS 17 with odin4 ? The Odin4 help file isn't very helpful.
Could not do normal boot
I am not an expert at this and I am having the same issue as The Verg
I have a message at the top "Could not do normal boot" same as him
I've been at this for 2 days now I'm just about at my ends wit
My phone is a Samsung S5 Active model SM-G870W
and I can easily rooted it or reinstall the stock file and put it back to original
and I've done that hump time but this TWRP file I just can't install it
to update this phone to a more recent software and basically install
an S8 or S9 software in it (mind you version 9 Pie would be OK0
and make this old phone a real beast.
I read somewhere about the OEM button which does not exist on this phone
whatever explanation they are giving to unlock it and make the button appear
all of a sudden is bs in my book.
Now please help me with this phone and the other guy by the same token
Is there another way I can get into this phone and wipe it clean and
boot it with thru the abd file or access the sd card or the internal
storage of the phone.
How can I add a picture of my phone to this thread

Noob-friendly guide to get from vanilla to lineage

This is a step-by-step guide that will get you to a fully working lineageos on your sony xa2 ultra, starting from a device that was just purchased.
I used Linux, but everything should be more than doable on Windows as well.
Make sure you have:
A copy of platform-tools from google (ubuntu's version works to some extent, i had to use binaries from both). You need:
fastboot
adb
The TWRP image for XA2 ultra: twrp-3.2.3-0-discovery.img
A working copy of xperifirm. If you're on Linux set a light UI theme, or it won't work. Also
Code:
export TERM=xterm
before launching it.
A working copy of newflasher. You can build it on linux by typing
Code:
make newflasher.x64
newflasher.x64 will be the name of the binary.
A fresh lineageos build for your phone (from now on referred to as lineage.zip)
A build of gapps, if you want them
The first thing you have to do is to
Unlock your bootloader
Preliminary operations:
Start your phone
Connect to the internet (3g or wifi)
Go to Settings > System > Device info, tap "Build number" until developer mode is active
Go back, open developer options
Tick USB Debugging and OEM Unlock
Open the phone dialer and type
Code:
*#*#7378423#*#*
this will open the service menu. It could take a few seconds.
Go to Service info
Enter 'Model info', write down the string (e.g. H4213) somewhere
Go back and enter 'Configuration'.
Check that "Bootloader unlockable" is 'yes', if it's not you can't proceed.
Write down the IMEI code. If it's a dual sim, you need to write down the "Sub1" one.
Go here, select the device and paste the IMEI that you wrote down
Write down the unlock code
Put phone in fastboot mode and unlock the bootloader:
Shut down the phone completely, unplug the USB cable if plugged
Hold VolumeUp, plug USB cable
Phone should power on, press Power if it doesn't
Wait until you have a fixed blue light on the led
You are now in fastboot mode
Code:
fastboot oem unlock xxxxx
where xxxxx is the unlock code that you obtained from the previous step
Flash an updated firmware
First you need to obtain the latest firmware for your device:
Run xperifirm
Open Sony XA2 discovery
Select whatever you wrote down from the 'Model info' section of the service menu
Download whatever firmware has the highest build number
If you're on Linux xperifirm will fail to unpack the firmware. You can work around it by entering the firmware directory on a shell and running:
Code:
for i in FILE_* ; do unzip $i ; done
unzip boot.zip -d boot
Remove a bunch of files, you can copy/paste this string after 'rm' or delete them manually:
Code:
kernel_X-FLASH-ALL-18AE_0x00.hash kernel_X-FLASH-ALL-18AE.sin persist_X-FLASH-ALL-18AE_0x00.hash persist_X-FLASH-ALL-18AE.sin system_other_X-FLASH-ALL-18AE_0x00.hash system_other_X-FLASH-ALL-18AE.sin system_other_X-FLASH-ALL-9B8D_0x00.hash system_X-FLASH-ALL-18AE_0x00.hash system_X-FLASH-ALL-18AE.sin system_X-FLASH-ALL-9B8D_0x00.hash userdata_X-FLASH-CUST-18AE.sin vendor_X-FLASH-ALL-18AE_0x00.hash vendor_X-FLASH-ALL-18AE.sin vendor_X-FLASH-ALL-9B8D_0x00.hash
Put your phone in flashing mode.
Shut down the phone completely, unplug the USB cable if plugged
Hold VolumeDown, plug USB cable
Phone should power on, press Power if it doesn't
Wait until you have a fixed green light on the led
You are now in flashing mode
Run
Code:
newflasher
(or newflasher.x64 if you built it yourself) from the directory where you have the remaining firmware files. It could ask you whether to dump the TA section, feel free to answer 'n'.
Go back in fastboot mode, and run:
Code:
fastboot set_active other
Then rerun the last list (go to flashing mode, run newflasher).
If 'other' doesn't work, run "fastboot getvar current-slot" in fastboot mode and then use either 'a' or 'b' instead of 'other' - whatever is not the one returned by getvar.
Flash lineage
Boot into TWRP:
Put your phone in fastboot mode (see above)
Code:
fastboot boot twrp-3.2.3-0-discovery.img
You are now in TWRP
When I first tried this my phone kept power cycling. If this happens to you too, here is how to fix it:
Hold VolUp and let it power cycle until it goes into fastboot mode again (fixed blue led)
Code:
fastboot -w
Try booting into TWRP again
Flash lineage:
On TWRP go to advanced, enable sideload
On your computer run:
Code:
adb sideload lineage.zip
It should start flashing by itself, if it doesn't, make it.
If you want to also flash gapps, repeat steps from 'Boot into TWRP' and flash the gapps zip file.
Reboot your phone into fastboot one last time, and run
Code:
fastboot -w
.
Reboot with
Code:
fastboot reboot
.
Congratulations, you're now running lineage!
Thanks @xstasi for the write up. However, I have a question.
After flashing the firmware with newflasher the first time, I then went to download mode, found I was on "b" so I set it to the "a" slot. But after powering down, now my phone will not do anything. I can't get back into the flash mode, or fastboot mode. No matter what I press, when I plug in the USB cord, the light blinks green several times but never goes solid. Any advice on how to fix this?
So im lost here on how to start this process on win10. Play by play, where did you enter codes.
N00b question:
The automatically generated lineageos installation instructions recommend backing up the "trim area partition" as it contains "the" DRM keys:
https://wiki.lineageos.org/devices/discovery/install#unlocking-the-bootloader
There seems to be a tool on XDA for this: https://forum.xda-developers.com/crossdevice-dev/sony/universal-dirtycow-based-ta-backup-t3514236
Why do I need to bother with that? What would I need the DRM keys for? Does it make a difference when running lineage? Or reverting back to stock?
BR
voidling42 said:
N00b question:
The automatically generated lineageos installation instructions recommend backing up the "trim area partition" as it contains "the" DRM keys:
https://wiki.lineageos.org/devices/discovery/install#unlocking-the-bootloader
There seems to be a tool on XDA for this: https://forum.xda-developers.com/crossdevice-dev/sony/universal-dirtycow-based-ta-backup-t3514236
Why do I need to bother with that? What would I need the DRM keys for? Does it make a difference when running lineage? Or reverting back to stock?
BR
Click to expand...
Click to collapse
You backup the TA Partition once you've booted into TWRP. Theres a section where you can backup the TA Partition through there... Unfortunately it isn't mentioned here.
---------- Post added at 04:22 AM ---------- Previous post was at 04:20 AM ----------
Hmmm, I would have recommended the 'Minimal Adb and Fastboot' instead of the 'platform-tools' from Google. Less bloaty, quicker installation and same instructions as above. All thats needed is the twrp.img in the same folder where the 'Minimal Adb and Fastboot' is installed and voila!
You never mentioned the Add On SU, to add rooting capability into Lineage itself rather than third party apps, activated from the developer options once flashed.
I know GApps are a rather personal preference from person to person. But I'd personally recommend installing the Aroma package from Open GApps. Whilst it is essentially the Super package (Where it has all the Google Apps), Aroma unlike Super has a GUI where you can select what Google Apps you do and don't want installed from it. So you can add as much or as little as you need to. further on, It also has extra really useful features; before installing you can tell if you want Aroma to replace the Lineage apps with the Google versions (Such as Gallery, Camera, Contacts and Messaging... etc), because normally it will just overwrite them anyway. Finally, the most useful feature before installing GApps, is that you get the option to uninstall Lineage features. There's only 3 options (LineageOS Recorder, LineageOS Setup Wizard and LineageOS Updater), the rest dont really apply to Lineage. At the very least I'd recommend uninstalling the LineageOS Setup Wizard (But I usually uninstall all 3). I say that because Aroma also installs a Google setup wizard, thats much more useful than the Lineage one, particularly if you're updating Lineage and have previously made a backup with Google and want to quickly reinstall all your apps and settings, rather than reinstalling them one by one.
Hello guys,
I found some differences with other Newflash guides:
- you do not delete *.ta files in main folder and in boot folder;
- you delete kernel_* files instead of boot_* files in main folder;
I can't tell if those different steps make any difference, anyway.
You should mention that DRM keys are lost with bootloader unlock and that TA partition should be backup up via TWRP before flashing lineage.
I'm very excited about the hardware on this phone. While I might be late to this game, can anyone tell me if Volte is working properly in US? Losing 3G is a few months is forcing me to find a new phone.

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