Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
How to flash and root OnePlus 3T on Linux

How to flash and root OnePlus 3T on Linux



Disclaimer: I've already done those kind of install on different phones and I'm familiar with the steps. So be sure to read the resources to get an understanding of what happens.

  • battery are >60% ;
  • know what you are doing?
  • remember that version used worked for me.

Screenshots are not mine, thanks to their author.

Flashing Recovery to TWRP

Flashing require to do a factory reset. Backup your data.

Prepare Phone and Computer

  1. enable Developer Options
  2. in Settings -> About Phone -> Build Number (at the bottom)
  3. by tap on it for 5-7 times to enable Developer Options
  4. enable USB Debugging
  5. in Settings -> Developer Options -> USB Debugging.
  6. enable OEM Unlocking (in the same list).


  1. Install adb and fastboot tooling:

     apt install android-tools-adb android-tools-fastboot

Install Recovery

  1. Reboot to bootloader either with adb reboot bootloader or through power button ;

  2. Unlock the bootloader:

     sudo fastboot oem unlock
  3. Download the latest TWRP image to flash ;

    curl --referer --location --remote-name


  1. Verify it

     curl --location --output twrp-publickey.asc
     gpg --import twrp-publickey.asc
     gpg --verify "$image_to_flash"{.asc,}
  2. Flash the recovery with TWRP:

     sudo fastboot flash recovery "$image_to_flash"
  3. Reboot to recovery to wipe cache ;

  4. Reboot to recovery to mount the device ;

Rooting with Magisk

  1. Install SuperSU
  2. Download Magisk Manager , Magisk-uninstaller 16.7 and Magisk 16.7
  3. and install

Rooting with SuperSU

  1. Download latest SuperSU and no-verity-opt-encrypt (dm-verity and forced encryption disabler) ;
  2. Copy to your smartphone Internal Storage directory (using nautilus or _nemo_¹) ;
  3. install both of them with TWRP ;
  4. reboot and enjoy!


The rooting procedure given here is not a data-loss process but it won’t hurt to have a backup of your smartphone’s personal data.


Installing ROM

I'm using either the official ROM, beta or Resurrection Remix OS.

  1. Copy the ROM's zip on your device
  2. install it through TWRP

Installing OpenGApps

⚠️ If Google service keep crashing you might want to backup your data and wipe the system and data partition.

⚠️ Troubleshooting

  • No write access to storage in TWRP? Wipe data/cache (≠ format data)
  • Rom not booting? Reinstall recovery and ROM…



  • ¹: I didn't manage to access my smartphone storage with Dolphin ;
  • ²: SR1-SuperSU-v2.79-SR1-20161221223537 didn't work for me.

This comment has been minimized.

Copy link

@07416 07416 commented Feb 9, 2021

Can you add an alternative to rooting with the proprietary SuperSU?


This comment has been minimized.

Copy link

@07416 07416 commented Feb 9, 2021

Typo with the "OpenApps", it's GApps


This comment has been minimized.

Copy link
Owner Author

@edouard-lopez edouard-lopez commented Feb 9, 2021

Sadly my Oneplus 3T screen broke, so won't update this any more.
Thanks for the typo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment