Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 9 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save edouard-lopez/44d14602e9c30490513b9f5aa12300fb to your computer and use it in GitHub Desktop.
Save edouard-lopez/44d14602e9c30490513b9f5aa12300fb to your computer and use it in GitHub Desktop.
How to flash and root OnePlus 3T on Linux

How to flash and root OnePlus 3T on Linux

Update

Requirements

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).

developer-options

  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 https://eu.dl.twrp.me/oneplus3/twrp-3.3.1-1-oneplus3.img.html --location --remote-name https://eu.dl.twrp.me/oneplus
    

3/twrp-3.3.1-1-oneplus3.img

  1. Verify it

     image_to_flash=twrp-3.3.1-1-oneplus3.img
     curl --location --output twrp-publickey.asc https://dl.twrp.me/public.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!

Root

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.

source

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…

Resources

Footnote

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

ghost commented Feb 9, 2021

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

Copy link

ghost commented Feb 9, 2021

Typo with the "OpenApps", it's GApps

@edouard-lopez
Copy link
Author

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