100
Guide Ubuntu & OnePlus One: unlock the bootloader, install TWRP and SuperSU.

  1. nguser KitKat Jul 13, 2014

    nguser, Jul 13, 2014 :
    If you are on Windows and you're having problems with ADB and USB drivers, you can follow my guide using an Ubuntu Linux virtual machine on VirtualBox. Follow this complementary walkthrough by @Rapante to know how to set everything up properly: [GUIDE] Set-up VirtualBox with Ubuntu on Windows to unlock the bootloader of the OnePlus One.

    -----------------------------------------------------------------------------------------------------------------
    Disclaimer
    I am not responsible of any damage or loss of data that may occur before, during and after the whole process. By following this guide, your warranty will not be voided.
    -----------------------------------------------------------------------------------------------------------------​

    Hello everyone,

    I wrote this walkthrough to show you how to unlock the bootloader, install TWRP custom recovery and gain root privileges on your OnePlus One by using Ubuntu Linux operating system.

    Some of the instructions in this guide are not mandatory to accomplish the task but I decided to include them anyway just for informational purposes because this guide is intended for novice users.

    This is my personal method and I will provide you with detailed information to avoid mistakes so read carefully and have fun.

    Requisites:
    • Backup your data before proceeding!
    • OnePlus One Global Version with factory settings (locked bootloader, stock recovery, CyanogenMod 11S / Cyanogen OS 12);
    • Ubuntu Linux (I used Xubuntu 13.10 64bit, tag me in a comment and let me know if the walkthrough works on your version too);
    • SuperSU .zip file (latest version available here);
    • TWRP Recovery .img file (latest version available here);

    Let's begin.


    Chapter 1: Developer options, Android debugging & Android Tools
    • Phase 1: Developer options and Android debugging.
    Go to Settings > About phone and tap 7 times on Build number to enable Developer options. You will see a little pop-up that says "You have enabled development settings!".

    1_about_phone.png 2_build_number.png 3_development_settings_enabled.png
    Go back to Settings menu and scroll down to Developer options. Tap on it and then enable Android debugging. You will be asked to allow USB Debugging, confirm by tapping on OK.

    4_developer_options.png 5_android_debugging.png 6_allow_usb_debugging.png

    • Phase 2: Installing Android tools (ADB & Fastboot) on Ubuntu Linux.
    The android-tools package has been added to Ubuntu "Universe" repository starting from version 12.10 Quantal Quetzal. If you are using an older version then you may need to follow this guide to install android-tools via PPA.

    Open Software & Updates and make sure that Universe repository is enabled. If not, enable it and insert the password if requested. Click on Close, then on Reload to update the package list. Wait until the update process is over.

    7_universe_repository.png 8_universe_repository.png 9_universe_repository.png
    Open Terminal and run this command to install ADB and Fastboot tools:

    Code:
    sudo apt-get install android-tools-adb android-tools-fastboot

    Chapter 2: Unlock the bootloader.


    In this chapter we will focus on the Linux Terminal rather than the phone. Don't be scared, it will be easy enough and you will have the opportunity to learn something new.


    Now you can connect the OnePlus One to your computer.

    Once the OnePlus One has been connected to your pc, open the Terminal and run this command:

    Code:
    adb devices
    Check the phone. Your computer's RSA fingerprint will be shown and you will be asked to allow USB debugging. Confirm by tapping on OK.

    10_rsa_fingerprint.png
    Check the Terminal. It should look like this:

    11_adb.png
    If you see offline instead of device, run the adb devices command once again.

    If adb devices output looks like this:

    Code:
    * daemon not running. starting it now on port 5037 *
    * daemon started successfully *
    List of devices attached
    ???????????? no permissions
    Run these commands:

    Code:
    sudo adb kill-server
    sudo adb start-server
    sudo adb devices


    Put your OnePlus One in Fastboot Mode by running this command:

    Code:
    adb reboot-bootloader


    12_adb.png 13_fastboot_mode.png
    Commands in Fastboot Mode need Administrator privileges on your pc, that's why we will use sudo.

    Run this command to make sure that Fastboot Mode is working correctly:

    Code:
    sudo fastboot devices
    Terminal should look like this:

    14_fastboot_devices.png

    Next command will unlock the bootloader:

    Code:
    sudo fastboot oem unlock

    15_sudo_fastboot_oem_unlock.png
    The phone will reboot and it will restore factory settings. All personal data and settings will be lost. Once the reboot is complete, copy the SuperSU .zip file to your phone and then put the device back in Fastboot Mode.


    Chapter 3: Install TWRP Recovery.


    Put the TWRP Recovery .img file on Desktop and rename it to twrp.img. On Terminal, change the current working directory by running this command:

    Code:
    cd Desktop

    16_cd_desktop.png
    Install TWRP Recovery by running this command:

    Code:
    sudo fastboot flash recovery twrp.img


    17_flash_recovery.png
    Warning: OTA updates can overwrite the recovery partition and restore the stock CyanogenMod Simple Recovery. To avoid this, go to Developer options and make sure that Update CM recovery option is disabled.
    Now it's time to enter Recovery Mode. To do that, hold down Power button and Volume down.

    18_twrp.png


    Chapter 4: Install SuperSU.


    Here we are, it's time to install SuperSU.

    In TWRP Recovery tap on Install, scroll down to the SuperSU .zip archive and select it. Perform a swipe to confirm the installation and lastly reboot the OnePlus One.

    19_twrp_supersu_1.png 20_twrp_supersu_2.png 21_twrp_supersu_3.png 22_twrp_supersu_4.png
    Once the reboot is complete, open SuperSU and make sure that "Respect CM root settings" option is not checked. If it is, uncheck it. This is because CyanogenMod 11S does not include root controls like CyanogenMod 11 does. That option, if enabled, may cause problems with apps that require root permissions.

    23_supersu.png

    Congratulations, you made it!

    Enjoy the OnePlus One and leave a comment for questions and suggestions. Ciao!​


    Feel free to translate this guide in your language and share it on regional forums.
    Spread the knowledge ;)

    Italian translation here.
     
    Last edited: May 25, 2015

    #1
  2. nguser KitKat Jul 13, 2014

    nguser, Jul 13, 2014 :
    This guide also works on the following Linux distributions:
    • Arch Linux (install android-sdk-platform-tools from AUR)
    • Debian Jessie
    • Ubuntu 12.04
    • Ubuntu 14.04
    • Kubuntu 14.04
    • Linux Mint 17
    • Lubuntu 14.04
    • OpenSuSE 13.1 (install android-tools)
    • OpenSuSE 13.2 (install android-tools)
    • Fedora 20 (install android-tools)
    • Gentoo (install android-tools)
     
    Last edited: Jul 13, 2015

    #2
  3. nguser KitKat Jul 13, 2014

  4. magischerherbst Ice Cream Sandwich Jul 13, 2014


    #4
    Adam Krisko likes this.
  5. xaser240 Jelly Bean Senior Moderator Jul 13, 2014


    #5
  6. Adam Krisko Beta PM and Dev Relations Staff Member Jul 13, 2014


    #6
  7. yossigrosskopf Froyo Jul 13, 2014


    #7
  8. nickmurphyphotos Froyo Jul 13, 2014


    #8
  9. tntpop Honeycomb Jul 13, 2014


    #9
  10. Shaitian Donut Jul 13, 2014

    Shaitian, Jul 13, 2014 :
    I intended to do this as soon as I got the phone, haha thanks for the step by step guide to give me a refresher since I haven't done this in a while
     

    #10
  11. Armand Ice Cream Sandwich Jul 13, 2014


    #11
  12. nguser KitKat Jul 13, 2014

    nguser, Jul 13, 2014 :
    Glad to help.

    Honestly, It's a piece of cake ;)

    Sorry man, I didn't mean to steal your job :p
     

    #12
  13. Shaitian Donut Jul 13, 2014


    #13
  14. fozknots Ice Cream Sandwich Jul 13, 2014


    #14
    Adam Krisko likes this.
  15. Sachin07 Gingerbread Jul 13, 2014


    #15
    Adam Krisko likes this.
  16. DanielFran Jelly Bean Jul 13, 2014


    #16
  17. nschong Honeycomb Jul 15, 2014

    nschong, Jul 15, 2014 :
    Hi @nguser, I don't have a Oneplus yet but wanted to know if the "fastboot boot" option still works?

    That way it should be able to leave the stock recovery as it is but achieve the same goal.
     

    #17
  18. Elisha Siegelman Froyo Jul 15, 2014

    Elisha Siegelman, Jul 15, 2014 :
    Still too complicated.:p
     

    #18
  19. nguser KitKat Jul 15, 2014

    nguser, Jul 15, 2014 :
    Yes, fastboot boot works. I'm considering to add that step to the guide.
     

    #19
    PRK.R and nschong like this.
  20. UVBU Gingerbread Jul 15, 2014

    UVBU, Jul 15, 2014 :
    Epic. Will try this when I get the phone. Are there any screenshots though??
     

    #20