From SpectLog
Jump to: navigation, search

This page is simply more specific one for Fedora 23 Linux and based on the following resources:

Software

There are two types of software required:

  • Workstation - tools for the workstation used only during the root-ing process.
  • Workstation OS'es drivers to interface the phone over USB cable.
NOTE: Fedora 23 already has required drivers - nothing to do.
  • Android SDK to manage phone from Workstation OS.
Install standard Fedora distribution package:
sudo dnf install android-tools
  • Phone - utilities installed on the phone to keep it root-ed.
  • TWRP - custom recovery for Android:
https://twrp.me/devices/oneplustwo.html
Download, for example, version used at the time of writing:
https://dl.twrp.me/oneplus2/twrp-2.8.7.0-oneplus2.img
  • SuperSu - superuser access management tool:
Download, for example, version used at the time of writing:
https://download.chainfire.eu/696/SuperSU/UPDATE-SuperSU-v2.46.zip?retrieve_file=1


The steps assume the downloaded files are inside ~/oneplus directory:

  • mkdir ~/oneplus
  • mv twrp-2.8.7.0-oneplus2.img ~/oneplus
  • mv UPDATE-SuperSU-v2.46.zip ~/oneplus


Allow phone control over USB

  • Go to Settings > About phone.
  • Tap Build number 7 times.


  • Connect phone to Workstation by USB cable.
  • Make sure phone is connected as Media device (MTP).


  • Go to Settings > Developer options.
  • Enable USB debugging.
Accept the warning.
  • Enable OEM Unlocking.
Authenticate as phone owner (if necessary).
Accept the warning.
  • Enable Advanced reboot.


Unlock the phone

  • Reboot into fastboot mode.
sudo adb reboot bootloader
Confirm MAC-based authorization on the phone if required.


  • Unlock the phone.
This step has to be done in fastboot mode.
sudo fastboot oem unlock
It prompts for user confirmation to erase user data.
Confirm by pressing Power button.
The step will boot the phone.


Root the phone

The unlocked phone will boot with all settings reset.
Skip through initial phone setup.
  • Repeat steps in Allow phone control over USB again.


  • Upload SuperSU.
cd ~/oneplus
adb push UPDATE-SuperSU-v2.46.zip /sdcard/


  • Reboot into fastboot mode.
sudo adb reboot bootloader


  • Flash TWRP custom recovery.
cd ~/oneplus
sudo fastboot flash recovery twrp-2.8.7.0-oneplus2.img
  • Erase cache.
sudo fastboot erase cache
  • Boot the phone.
sudo fastboot reboot


  • Reboot the phone into recovery.
adb reboot recovery
This will enter the TWRP.
  • Use Swipe to Allow Modifications.
  • Select Install.
  • Scroll to and select UPDATE-SuperSU-v2.46.zip.
  • Use Swipe to Confirm Flash.
  • Select Reboot System.


Subsequent OxygenOS update

Example is based on update from 2.2.0 to 2.2.1.



  • Upload ROM to phone:
adb push OnePlus2Oxygen_14_OTA_012_all_1602261837.zip /sdcard/
It may take (block) few minutes (for example, 203 seconds).


  • Follow official steps for OxygenOS with a TWRP Recovery:
* Start reboot.
* Boot into recovery (holding the power and volume down buttons simultaneously).
* Select "Install" option in TWRP recovery.
* Select the ROM zip file that you have copied to your phone.
* Swipe to flash and then reboot your device.


END