Time went by and it happened that data over mobile was accidentally enabled. And then I noticed from the mobile data traffic statistics, that Google Play services was creating traffic even without a Google account! Why does this happens its beyond my perception, but anyone is allowed to guess based on [recent history](https://en.wikipedia.org/wiki/PRISM_(surveillance_program)#/media/File:Prism_slide_5.jpg "PRISM Surveillance program"). There is an option to disable background traffic on the stock Android ROM (OxygenOS) but that works only when data over mobile is enabled. With Wi-Fi enabled, Google Play services keeps on sending suspicious traffic, back to mother Google.
So I decided to look for alternatives to replace OxygenOS with a Google-free Android ROM. These are the options I have investigated:
So I decided to go with Exodus. This guide describes the procedure and preparations I followed in order to flash the latest Exodus nightly build for OnePlus 2.
DISCLAIMER: This guide could renter your device a luxurious brick! Backup everything before you continue. The author of this guide will not be liable for any damages you may cause on your device or any data lost. Proceed at your own risk!
Now we got that out of the way, let’s continue.
apt install android-tools-adb
.There is some process we need to follow so that the OnePlus 2 device is detectable by ADB
To Enable USB Debugging we need to first enable the Developer Options:
First ensure that the device is connected:
# lsusb
...
Bus 003 Device 039: ID 2a70:f003
...
The device ID for OnePlus 2 is 0x2a70. Set this in * ~/.android/adb_usb.ini*:
# echo "0x2a70" >> ~/.android/adb_usb.ini
Download the udev rules files (Thanks Nicolas Bernaerts):
# wget --header='Accept-Encoding:none' -O /etc/udev/rules.d/51-android.rules https://raw.githubusercontent.com/NicolasBernaerts/ubuntu-scripts/master/android/51-android.rules
# chmod a+r /etc/udev/rules.d/51-android.rules
# wget --header='Accept-Encoding:none' -O /etc/udev/rules.d/69-mtp.rules https://raw.githubusercontent.com/NicolasBernaerts/ubuntu-scripts/master/android/69-mtp.rules
# chmod a+r /etc/udev/rules.d/69-mtp.rules
Restart the udev and ADB services:
# systemctl restart udev
# adb kill-server
# adb start-server
NOTE: make sure USB Debugging is enabled otherwise you will still not be able to see the device!
Verify that the device is present:
# adb devices
List of devices attached
da0afea7 unauthorized
Seems OK.
Since we are not using Google’s services we will need to manually backup all important data such as:
You can also backup your entire system with ADB:
# adb backup -f oneplus2.bck -apk -shared -all
This will take some time depending on the size of your data.
You can later restore your system back to normal, using this command:
# adb restore oneplus2.bck
Download Prepare the First Aid kit
This is a bundle that includes all the files needed to bring life to a bricked OnePlus 2 device. It includes a recovery image which we will use to install Exodus (or any other image you wish) on the device.
# wget -O Firstaid_v_2_0.zip 'http://forum.xda-developers.com/devdb/project/dl/?id=16684&task=get'
# unzip Firstaid_v_2_0.zip
All the necessary files are in the newly created, Firstaid directory.
The recovery image that comes with Firstaid is somewhat outdated. We will download a more recent version of it and replace it in the Firstaid directory. You can download the more recent TWRP image from here. Do not use wget
or other command line tools, just a normal browser to download it.
NOTE: There are more recent versions than 3.0.2-0 like 3.0.2-1 and 3.0.2-2. You can try those if you feel lucky, but be warned! Those versions did not work on my phone. You can see all the past and resent images here.
Verify the downloaded image:
# wget -O twrp-public.asc https://dl.twrp.me/public.asc
# gpg --import twrp-public.asc
# wget https://dl.twrp.me/oneplus2/twrp-3.0.2-0-oneplus2.img.asc
# gpg --verify twrp-3.0.2-0-oneplus2.img.asc twrp-3.0.2-0-oneplus2.img
If you get Good signature from "TeamWin <admin @teamw.in>"
that means the image is correct. Now replace the TWRP image that comes with Firstaid with this one:
# cp twrp-3.0.2-0-oneplus2.img Firstaid/twrp.img
Reboot to fastboot mode:
# adb reboot-bootloader
Alternatively you can poweroff the OnePlus 2 and press the Volume UP + Power buttons simultaneously.
Verify the presence of the device:
# fastboot devices
da0afea7 fastboot
Unlock the phone:
fastboot oem unlock
Flash Firstaid with the recent TWRP recovery image:
# cd Firstaid
# ./firstaid.sh
Now unplug the phone from the PC, poweroff and the press the Volume DOWN + Power buttons simultaneously. This will bring your phone into TWRP recovery.
Download the latest Exodus image for OnePlus 2 here:
# wget http://exodus-developers.net/exodus-6.0/oneplus2/exodus-6.0-20161111-NIGHTLY-oneplus2.zip
# wget http://exodus-developers.net/exodus-6.0/oneplus2/exodus-6.0-20161111-NIGHTLY-oneplus2.zip.md5
Verify that the download is correct:
# cat exodus-6.0-20161111-NIGHTLY-oneplus2.zip.md5 ; md5sum exodus-6.0-20161111-NIGHTLY-oneplus2.zip
35dcf9ea73648682a36e673f5ed8f0eb /android/exodus-6.0/out/target/product/oneplus2/exodus-6.0-20161111-NIGHTLY-oneplus2.zip
35dcf9ea73648682a36e673f5ed8f0eb exodus-6.0-20161111-NIGHTLY-oneplus2.zip
Seems OK
Plug the phone back to the PC and ensure that it is detectable by ADB:
# adb devices
List of devices attached
da0afea7 device
Follow these steps:
# adb sideload exodus-6.0-20161111-NIGHTLY-oneplus2.zip
Wait and then reboot into the new Exodus system when done.
By default Exodus has a minimal set of apps. Since we are not using Google Apps we will need to install F-Droid:
# wget https://f-droid.org/FDroid.apk
# adb install FDroid.apk
Setup a PIN or Pattern to lock the screen of your phone when not in use: Settings -> Security -> Screen Lock. Avoid fingerprint as it can be easily bypassed.
Encrypting your phone will protect your data if it gets stolen or confiscated. These are the steps Settings -> Security -> Encrypt phone. Your phone will need to be plugged to charger and charged to 80% or above, otherwise the system will refuse to start the encryption process.
If you decide that you don’t like Exodus or any other MOD that you have installed, you can restore your phone back to the stock OxygenOS. These instructions can also be used to restore your phone’s functionality after you have accidentally bricked it.
Download the stock OxygenOS 3.0.2 image from here. Verify the download with:
# echo 46b1fde116275d83d05c2dd89422069f ; md5sum OnePlus2Oxygen_14_OTA_019_all_1606041303.zip
46b1fde116275d83d05c2dd89422069f
46b1fde116275d83d05c2dd89422069f OnePlus2Oxygen_14_OTA_019_all_1606041303.zip
Download the upgrade patch for Oxygen 3.1.0 from here. Verify the download with:
# echo 9cfa9a2a4c7fada6f9db79ea660251d0 ; md5sum OnePlus2Oxygen_14_OTA_019-020_patch_1608262242.zip
9cfa9a2a4c7fada6f9db79ea660251d0
9cfa9a2a4c7fada6f9db79ea660251d0 OnePlus2Oxygen_14_OTA_019-020_patch_1608262242.zip
Optionally you can download the SuperSU image if you would like your OxygenOS rooted:
# wget -O supersu.zip 'https://download.chainfire.eu/743/SuperSU/BETA-SuperSU-v2.52.zip?retrieve_file=1'
First we need to restore the recovery ROM from Firstaid:
# cd Firstaid
# ./firstaid.sh
Before we install the OxygenOS image it is recommended to wipe the phone: From the TWRP menu select Wipe and then Swipe to factory reset. If the system was previously encrypted you will need to use TWRP to format it before the wipe.
Then we need to set the device into Sideload mode: Select Advanced -> ADB Sideload -> Swipe to Start Sideload.
First install the OxygenOS 3.0.2 image:
adb sideload OnePlus2Oxygen_14_OTA_019_all_1606041303.zip
Then re-enable ADB Sideload and load the Oxygen 3.2.0 patch:
adb sideload OnePlus2Oxygen_14_OTA_019-020_patch_1608262242.zip
Optionally you can also load the SuperSU application as well
adb sideload supersu.zip
Finally reboot into the new system and enjoy your freshly formatted phone.