In September 2017 a security hole concerning Bluetooth was discovered in Android and published under the name “BlueBorne”. Unfortunately Sony decided not to provide any updates for the Xperia Z3 Compact anymore, as the device was already too old after nearly 3 years on the market (also see my other post about this).
Fortunately there was an inofficial port of LineageOS 14.1 based on Android 7.1, in which also the Bluetooth security hole was patched. However this version had the issue that the Bluetooth connection was temporarily lost very often. For using my smartwatch this was not a big deal as the connection was only lost for a few seconds and returned automatically, so the general usability of the smartwatch was not really affected. However for using my Bluetooth headset this problem was more than annoying – for example when I wanted to listen to some music during a journey in a train and the playback was just interrupted suddenly. Therefore I looked for an alternative and found CarbonROM. Compared to LineageOS, CarbonROM is not an inofficial port but a ROM which is officially customized to the Xperia Z3 Compact and gets updates on a regular basis.
The installation is mostly identical to LineageOS:
- Unlocking the bootloader
- Installation of Team Win Recovery Project (TWRP)
- Backing up the current data
- Wiping the internal memory
- Installation of CarbonROM
- Optional: root access
Unlock the bootloader
Unlocking the bootloader is possible using a service by Sony. Also see the this page in the developer area of Sony. Just be aware that you will loose the DRM keys needed for some Sony specific features, like the algorithms to optimize the pictures taken with the camera app by Sony. For me this is not a problem, since I use “OpenCamera” as an alternative anyway, which also takes very good pictures.
To do the unlocking you need a connection via USB in fastboot mode. You can activate this mode by turning off the device and then holding the volume down button pressed while connecting the device to the PC using USB. Beside the command line tools from the Android SDK (version 26 or older may required, as newer versions may not work properly for this purpose) there is also a driver for Windows required, which you can get from Sony. To install this driver in Windows 10 you need to turn off the driver signature verification, otherwise the driver can’t be installed. You find a tutorial how to do this you at HowToGeek.com.
Installation of TWRP and CarbonROM
After you have successfully unlocked the bootloader you can continue following the tutorial at the XDA forum. I recommed not to use the version of TWRP from the tutorial, but the version 3.1.1 as mentioned in this post at XDA. Older versions of TWRP may not be able to install the custom ROM because the installation script which checks the compatibility with the device may fail.
Version 3.1.1 can also be installed in the FOTAKernel partition and usually does not get overwritten by a custom ROM. After you have downloaded the version from the link above, you unpack the ZIP file and then install the recovery images with the following command:
fastboot flash FOTAKernel twrp-3.1.1-0-z3c_V02.img
After this step the USB connection has to be disconnected again. TWRP can then be started by holding the volume down button and then turning on the device. The status LED will flash once in a kind of pink color to confirm that TWRP is active. You have to keep the volume down button pressed until TWRP starts but at least until the status LED is glowing.
Important: You should backup the old system in TWRP before you wipe the internal memory if you want to return to that system later!
I did not use the latest version 6.1 of CarbonROM, which is only available as weekly build. Instead I use the archived (stable) release version 5.1 of January 2018, which is still based on Android 7.1.2. You can get this version at the following address: https://basketbuild.com/devs/CarbonROM/.OLD/Nougat/z3c (CARBON-CR-5.1-MOO-RELEASE-z3c-20180131-0646.zip). If you like to try out the latest features you can also use the current version from https://get.carbonrom.org/device-z3c.html, which is already based on Android 8. However you should be aware that some hardware features and system functions may not work yet with that version.
Before installing CarbonROM you should wipe the internal memory completely in TWRP to avoid problems due to residues of the old system. This is also neccessary if you already have used LineageOS! For this step you have to be patient – formatting the system and cache partition may take a couple of minutes. This step is only needed once. Further updates of CarbonROM can then be installed without a complete wipe.
After CarbonROM has been installed, the first reboot takes a while. However in my experience further reboots are then much quicker as with the original ROM.
If TWRP is afterwards not be accessible any longer using the method described above, you can just install it again in the FOTAKernel partition using as described in fastboot mode without loosing any data.
In contrast to LineageOS the installation of Google Play might not be neccessary. If you should need a package nevertheless, you get a copy it at http://opengapps.org which can be installed using TWRP. The required variant is ARM and Android 7.1. I recommend the “nano” version which only contains the minimal required stuff and those apps which can not be installed afterwards using Google Play. If you need apps like Google Maps etc. you can just get them via Google Play.
Variant 1: SuperSU
To get root access with SuperSU you can use the “Recovery Flashable.zip” variant from the official source: http://www.supersu.com/download. This file will then also be installed using TWRP.
Please note: after the first reboot SuperSU is still visible as an app but not afterwards! You can then access SuperSU in the Android system settings:
The official version which is available in Google Play (also the paid “pro” version) can then be installed as well.
Variant 2: Magisk
Since SuperSU is not available as open source, the free solution Magisk offers as an alternative. You will find the sources at Github as well as the official releases. This tool can be installed via TWRP as well and in addition to root access it also offers numerous modules for expanding the system.
Also see the official thread at XDA.
The big advantage of Magisk is that it provides “systemless root”, which means the /system partition does not need to be changed. By using the module “MagiskHide Props Config” you can also change the fingerprint of the device to get a valid “SafetyNet” check.
Note: if you want to switch from SuperSU to Magisk, it is not enough to only remove SuperSU. You also have to re-install CarbonROM to get a “clean” system without any root modifications. The existing data and apps can be preserved, since a full wipe is not needed – just install CarbonROM again and Magisk afterwards.
Experience in every day use
Very positive: all hardware components are supported, even the camera button which can be used in OpenCamera to focus and take pictures.
A real improvement is the Bluetooth support. Connection losses as I experienced them in LineageOS multiple times a day don’t occur in CarbonROM any longer.
Another convenience are the additional settings in “CarbonFibers”. This allows to customize many elements of the user interface and also the behaviour of the hardware buttons or the notification LED.
This is completed by the included extension “substratum” which allows to customize the look of the whole interface or single elements of it – in Android itself but also for single apps.
The only feature which makes no sense to use is the online update as TWRP can not be started directly by CarbonROM due to the way TWRP is installed on the Z3 Compact. This would be needed to install the downloaded updates. But since you can always download and install newer versions manually I don’t see this as a big problem.
Speed and battery life are mostly identical to LineageOS. One battery charge usually lasts more than 24 hours and the device is quite fast.