Unlock Bootloader, Install TWRP, Root OnePlus 5T and Take EFS Backup

OnePlus released the latest smartphone from the company which was named as the OnePlus 5 earlier this year which was the flagship smartphone from the company until earlier this month. OnePlus released the latest smartphone which is the successor to the OnePlus 5 which has been called the OnePlus 5T.

Talking about the latest OnePlus 5T from OnePlus, the smartphone was just announced on November 16 and the smartphone has been available in the US from November 21. Also, there was a prime-members only sale of the OnePlus 5T on Amazon India on November 21 from 4.30 PM IST. However, the smartphone is not available for Open sale until November 28 in India. The smartphone comes with a full-screen display and a rear fingerprint sensor which are the only differences from the OnePlus 5.

The smartphone is not even available yet in most parts of the world and the method to unlock bootloader, install TWRP and root the OnePlus 5T have already popped up. We have now mentioned the guide to do the same from below. After following this guide, you will be able to Unlock Bootloader, Install TWRP recovery, Root and Take Nandroid/EFS backup on your OnePlus 5T.



First of all, Rename the TWRP image file to recovery.img for ease of installation and then move it inside the adb installation folder. This is C:\Program Files (x86)\Minimal ADB and Fastboot by default unless you changed it during installation. Install TWRP and Root OnePlus 5

Unlock Bootloader on OnePlus 5T

  1. Power off your phone.
  2. Press and hold the Volume Up and Power button together on your smartphone until it boots into fastboot mode.
  3. Connect it to your PC via a USB cable and make sure the cable has been connected properly.
  4. Now go to the ADB installation folder on your PC. (C:\Program Files (x86)\Minimal ADB and Fastboot)
  5. Type in cmd in the address bar and hit enter to open a command prompt window in the folder. Install TWRP and Root OnePlus 5
  6. Now let’s see if your device is properly connected to your PC. To do this, type the command given below and hit enter.
    fastboot devices
  7. If your device is connected, you will see your phone’s serial number and if you don’t, you should check if you have installed all the required drivers.
  8. Type the command below to unlock your bootloader if your device is detected. Remember this will wipe everything on your phone.
    fastboot oem unlock
  9. On your phone, you will be warned about unlocking the bootloader, press the Volume Up button to highlight Yes and the Power button to select it.
  10. When your device reboots, power it off again and boot into recovery mode. To do this, press and hold the Power and Volume Down buttons together for a few seconds.
  11. In the stock OnePlus recovery, wipe all user data and then power off your device again.

Install TWRP recovery on OnePlus 5T

  1. Open a command window in the ADB installation folder again in case you have closed the previous one.
  2. Boot your phone into fastboot mode and connect it to your PC.
  3. Enter the following command to flash the TWRP image file.
    fastboot flash recovery recovery.img
  4. When the flashing is complete which should take a few seconds, don’t reboot your phone using any fastboot commands. Instead, manually disconnect your phone and then boot into Recovery using the Power and Volume Down buttons.
  5. Your phone should boot into TWRP recovery this time.
  6. Swipe to allow modifications if asked.

Root OnePlus 5T

  1. Now that your OnePlus 5T has TWRP recovery installed you can root it.
  2. Users who wish to decrypt their device, download the latest no-verity-opt-encrypt zip and transfer it to your phone along with SuperSU or Magisk. Then go to Wipe > Format Data and type Yes when asked if you want to mount internal storage. Those who wish their OnePlus 5 to remain encrypted can ignore this step.
  3. Download and transfer SuperSU or Magisk from the download section and transfer the files to your phone over the MTP connection.
  4. Select Install from the TWRP main menu.
  5. Navigate to the SuperSU or Magisk file that you’ve previously transferred to your phone and select it.
  6. Swipe to flash the file.
  7. You will see a Reboot system button at the bottom one the flashing is complete, tap on it.
  8. Your device will reboot and when it does, you should see the SuperSU or Magisk Manager app in your app drawer and check that you have proper root access.

Note before taking/restoring Nandroid backup

  • Nandroid backup is a full backup of your device which contains all the data as well as apps from the current build of the smartphone. This is needed when something goes wrong on your device and you need to restore your phone.
  • Before taking a Nandroid backup, you have to compulsorily remove your lock screen password like Pin/Fingerprint/Pattern. Otherwise, you will have to forcefully factory reset your phone if you try to enter the pin on restoring the Nandroid backup as it will not accept the Password/Pin even if it is correct.
  • In order to remove your device’s Lock screen security, head over to Settings –> Security > Screen Lock and select the Swipe or None option.

Taking Nandroid backup on OnePlus 5T

  • First of all, boot into TWRP recovery by turning off your device again and pressing and holding Power + Volume Down button until you see the TWRP logo on the screen.
  • After that, go to Backup option inside TWRP recovery and select all the partitions including Data.
  • Now, you have an option to rename the backup to your liking or else it will be named according to TWRP standards which includes the date and time of the backup.
  • Just swipe to take backup inside the recovery and it will take 5-10 minutes for the process to complete and it may take more time if you have plenty of data.
  • Once done, reboot to system and you will see that the backup is created inside the TWRP folder on your device’s SD card.
  • Store this backup in a safe place so that you can restore this backup at any time if needed.

Restoring a Nandroid backup

  • To restore Nandroid backup, power off your device and boot into TWRP recovery once again by pressing and holding Power + Volume Down button combination at the same time.
  • After that, go to Restore menu inside TWRP and you will see the backup that you have just created.
  • Now, select the backup or any other backup of your choice and restore it by Swiping inside TWRP.
  • Once restoration is completed, you will have to reboot to system and your phone will have exact settings before the backup took place.

Note before taking/restoring EFS backup

  • EFS backup contains the backup of all the cellular data on the smartphone which includes the IMEI information of the SIM cards along with the operator data.
  • It is also important to take the EFS backup same as the Nandroid backup to ensure that you do not lose cellular connectivity in case anything goes wrong while tinkering with your device

Taking EFS backup

  • You will need to download the Terminal Emulator application on your smartphone which was mentioned in the Downloads section above.
  • Once installed, open the application and enter the command below to gain root access on your smartphone
  • If you are asked to grant root access from Magisk or SuperSU, you will have to grant the permission.
  • After this, you have to enter following commands to take EFS backup:
dd if=/dev/block/sdf1 of=/sdcard/modemst1.bin bs=512
dd if=/dev/block/sdf2 of=/sdcard/modemst2.bin bs=512
  • Now, you will find two files named as modemst1.bin and modemst2.bin in your smartphone’s internal storage which is the EFS backup of your OnePlus 5T.

Restore EFS backup on your OnePlus 5T

  • In case, you manage to corrupt or wipe your EFS partition on the smartphone then you will need to restore the EFS backup which you should have taken from above.
  • To do so, boot into bootloader/fastboot mode by turning off your device and press Power + Volume Up button.
  • In bootloader mode, you will have to connect your device via USB cable and open Command Prompt window on your PC.
  • Now, check if your device is recognized by Fastboot by entering the command mentioned below:
fastboot devices
  • If you see an alpha-numeric code besides fastboot then your device is recognized and you can proceed further.
  • Enter the below commands to restore the EFS backup on your smartphone
fastboot flash modemst1 modemst1.bin
fastboot flash modemst2 modemst2.bin
  • Once completed with the codes above, reboot your device and you should have the IMEI information on your smartphone again.

Once you have completed all the steps mentioned in the detailed guide above, you will be able to unlock the bootloader, install TWRP recovery, Root and take Nandroid/EFS backup on your new OnePlus 5T.

If you are stuck at any of steps mentioned in this guide then feel free to comment on your questions below in the comments section.

source: xda

Be the first to comment

Leave a Reply

Your email address will not be published.