Notice! Do not ignore this!
1. Please don't wipe your data partition if TWRP cannot decrypt it. Instead, make an effort to gather logs to help solve the issue!
2. Themes from 3.0.0 to 3.0.3 are incompatible with 3.0.4. Sorry! (small theme engine changes regarding backlight control)
3. If you are using encrypted Ext4, please flash https://build.nethunter.com/android-...e-swap-5.1.zip immediately after installing TWRP and reboot recovery. This will fix an Ext4 decryption bug that could cause loss of data.
This is a unified build for both the OnePlus 3 and the OnePlus 3T!
WARNING: The OnePlus 3 & 3T stock boot image has dm-verity, which prevents you from booting if you swipe to enable system modifications!
SOLUTION: Follow the full rooting steps below, in order, to allow system modifications without the risk of a boot loop!
WHAT IS TWRP?
Oh come on, you know what it is - don't try to fool me!
In case you're serious, though...
Team Win Recovery Project is a custom recovery for Android devices.
It allows you to back up and restore your data, flash custom ROMs to your device, repair broken file systems, and root your device. Read more about TWRP here: https://twrp.me/about/
You can find the device page here:
Use 3.0.4-0 for now, rather than the builds on twrp.me until an official release happens. You will have problems with 3.0.3 on Nougat!
For now, please download the build from:
Officially 3.0.4 has not been released yet, but it has critical fixes for this device on Nougat, so please be patient.
There is a download link there, as well as instructions on how to flash it.
You can find up to date fastboot & adb binaries here!
Full Steps For Obtaining Root
Follow these instructions until someone nice comes along and makes a video from them (without ads):
Extract/install adb & fastboot to your computer.
Download TWRP for OnePlus 3 & 3T (oneplus3).
In your ROM, go to Settings -> About device. Tap 7 times on Build number to enable Developer options.
Now go to Settings -> Developer options. (above About device)
You need to enable OEM unlock, otherwise you might end up with boot problems or be unable to flash later on.
Reboot your device into fastboot mode. To do this, select reboot from the power menu and hold the [Volume Up] + [Power] buttons while your device reboots or boots from power off.
Once you're in fastboot mode, you need to unlock your bootloader. To do this, run the command:
fastboot oem unlock
WARNING: Unlocking your bootloader will erase all userdata on the device! Your device will be completely reset to factory defaults!
Once your bootloader is unlocked, you're ready to flash TWRP. To do this, run the command (replacing twrp.img with the actual image name):
fastboot flash recovery twrp.img
Once the image is flashed, you should use your volume keys to navigate to RECOVERY and the press the power key to select it.
At this point, you will reach the screen asking you if you want to allow system modifications.
By swiping right, you will trigger dm-verity, and if you don't follow the next step you will be unable to boot!
If you are going to root your device and follow the rest of these steps, then it is safe to swipe right and enable modifications.
If your device asks for a password to mount internal storage, and your password doesn't work or you haven't set one, see below under known issues for a fix!
If you want to be rooted with SuperSU:
Download the latest SuperSU Stable by Chainfire.
Without exiting TWRP, transfer the SuperSU zip to your device over MTP* and flash it using [Install] in TWRP.
---or (not both) ---
If you want to be rooted with something else or just want a bootable system:
Download the latest dm-verity and forced encryption disabler zip.
Without exiting TWRP, transfer the no-verity-opt-encrypt zip to your device over MTP* and flash it using [Install] in TWRP.
This will also allow you to use [Format Data] to completely disable your encryption if desired.
Go to [Reboot] -> [System].
Wait 2-5 minutes for your device to finish setting itself up. (SuperSU will reboot you a few times)
* MTP, known as Media Transfer Protocol, is the same way you transfer files from your PC to your device when booted into system.
To update TWRP, simply download the new twrp.img on your phone, then boot into your current TWRP and flash it.
To flash a twrp.img, navigate to [Install] -> [Flash Image] -> select your twrp.img -> [x] Recovery -> Flash!
After that, just use [Reboot] -> [Recovery] to reboot into the updated TWRP.
v3.0.4-0 (build.nethunter.com) - Capability restoration for Nougat, F2FS backport support, EXT4 decryption support
v3.0.3-0 (twrp.me) - Same as 3.0.3-1-rc2. In sync with the OnePlus 3T device tree (3.0.3-1).
v3.0.3-1-rc2 (build.nethunter.com) - Redo the device tree for OOS 4.0, including dynamic encryption support (pull libs from ROM)
USB OTG storage support
Hardware Qualcomm-based full-disk encryption support
f2fs file system support (read, write, format, backup & restore)
exFAT file system support (read, write, format)
NTFS file system support (read, write, format)
Full SELinux support
Built in android 6.0 tree
Allows OnePlus full OTA flashing
F2FS takes a long time to boot, see below.
Why Does F2fs Make Twrp So Slow?
When TWRP boots up or wipes partitions and a few other scenarios, it checks each partition to see how much disk space is used. Ext4 handles disk usage calls quite efficiently and will finish this very fast. F2FS on the other hand is very slow when it comes to checking disk usage. We're unsure why this is. Every file on the F2FS formatted partition adds a little more time, and a device that is 30 GB full could take up to 10 minutes to boot TWRP!
I suggest switching your data partition to ext4 - all the f2fs hype is merely from benchmarks that don't actually represent real world use (ie. you're not writing thousands of files per second)
For someone who doesn't do lots of write access to their data partition, ext4 can actually be advantageous (it has faster access times and reads!)
Why Won't My Data Decrypt / Why Is My Password Invalid In Twrp?
In order for encryption to work in TWRP, it must pull the encryption libraries from your current ROM. It does this during TWRP boot logo. If you have no ROM installed, then it will fall back to the default OxygenOS 4.0.2 encryption libraries included in the TWRP image.
The crypto daemon in recovery will not be able to decrypt unless the version of the encryption key matches the version of the libraries. This is an unusual restriction that was added by OnePlus.
You can usually fix this by simply booting into your ROM and changing your boot up password. You can change it back or remove it if you want immediately after. This will generate a new crypto key which should be compatible when you next enter TWRP.
TWRP: https://github.com/omnirom/android_bootable_recovery (android-7.1)
Device tree: https://github.com/TeamWin/android_d...eplus_oneplus3 (android-6.0)
Kernel: https://github.com/jcadduono/android...neplus_msm8996 (twrp-7.0)
Gerrit for TWRP: http://gerrit.omnirom.org/
Gerrit for officially supported devices: http://gerrit.twrp.me/
Team Win Recovery Project for the OnePlus 3 & 3T, Tool/Utility for the OnePlus 3
jcadduono, Team Win
Source Code: https://github.com/jcadduono/android...eplus_oneplus3
Current Stable Version: 3.0.4-0
Stable Release Date: 2017-01-22
Documentations source: link