How to root OnePlus X [Onyx] and install Cyanogenmod from a mac

14 July, 2016

I rooted my OnePlus X using a mac. The instructions are a little random since they're just the notes I took during the process. I'll try and annotate them a little bit though!

Install adb and fastboot. I used Brew, a software package for linux-esque package management.

$ brew install android-platform-tools

On the device, in settings:

  1. enable debugging
  2. enable oem unlock

On the mac, in terminal:

$ adb devices
$ adb reboot bootloader
$ fast oem unlock

I found the appropriate twrp.img file (I linked to it below, but it has likely been updated by now). Back in terminal on the mac (keeping twrp.img in the active folder):

$ adb reboot bootloader
$ fastboot devices
$ fastboot flash recovery twrp.img

I restarted the device by pressing and holding the volume down and power buttons simultaneously. At the pop-ups,

  1. swipe agree
  2. swipe to install supersu and finish rooting the device

Allow the device to restart itself. When it booted up, I followed supersu instructions (I used twrp, not play)

To test if the device is rooted, from the macs terminal:

$ adb shell
$ su

If it's root it'll become evident (the screen on your phone may request that you provide permission).

The device is now rooted! Time to start installing cyanogenmod.

  1. download cmod and gplay apps (links below, but again they've probably updated so grab whatever's newest).

From terminal on the mac:

$ adb push both.zips /sdcard/
$ adb reboot recovery

On the device:

  1. wipe -> factory reset (swipe)
  2. Install -> find the cyanogenmod zip file and install it
  3. Install -> find the GooglePlay Apps zip file and install it
  4. Reboot -> System