================================
Title
Beginner’s Guide to Install /e/ on Sony Z5C using Ubuntu
================================
Introduction
This guide provides step by step instructions how to install the /e/ version of android Q (10) on a Sony Z5 Compact using Ubuntu.
Device used: Sony Z5C, model E5823, running Android 7.1.1, build 32.4.A.1.54.
/e/ version: 0.15 (Q) from March 2021 (e-0.15-q-20210312105636-dev-suzuran).
Computer: Ubuntu 16.04 LTS.
Android Platform Tools version: 31.0.1
================================
Requirements
- Equipment
A Sony Z5C phone, must be either model E5803 or E5823.
A USB cable that can transfer data.
A computer running Linux (this example uses Ubuntu 16.04LTS).
Internet access to download some files.
- Computer skills
Only very basic computer skills are required.
You will need to know how to:
Download a file.
Unzip a .zip file.
Open a terminal window (also called shell, command line, console window).
Type (or copy and paste) commands into the terminal.
================================
PART A)
Before doing anything, run a few checks
- Check if the device’s bootloader can be unlocked
To check, on the device dial *#*#7378423#*#* to launch the service menu.
Go to Service info > configuration > “Rooting status”
You can only continue if it says “Bootloader unlock allowed: Yes”
- Check the device’s software version
The software version on the device must be 32.4.A.1.54 (according to post on 2020-11, https://forum.xda-developers.com/t/rom-unofficial-10-q-lineageos-17-1-for-z5c-suzuran.4052973/post-83895447)
To check, on the device go to Settings > About phone > Build number
You can only continue if the build number is “32.4.A.1.54”
- Check the phone works as expected (optional step)
This is an optional step to check that all parts of the phone work as expected.
There are two reasons for doing this step:
i) if you purchased the phone and parts of it do not work you might be able to return it. But if you unlocked the bootloader/flashed the device you would likely void the return policy.
ii) if you know something isn’t working before you install /e/, for example the rear camera is faulty, then when you install /e/ you will know the rear camera isn’t working because the camera is defective, not because of something to do with /e/.
To run the tests, on the device dial *#*#7378423#*#* to launch the service menu.
Run any test you wish.
================================
PART B)
Download Custom Recovery Image and /e/ ROM
Both the custom recovery image and /e/ ROM are specific to the Sony Z5C device.
Each is downloaded separately.
- Download Custom Recovery Image
Download the Custom Recovery Image called “recovery_suzuran_230218.img” from https://drive.google.com/drive/folders/1uTe7x1bWBKSUKx401wcgUSCQ7jj1e3MG
Save this file anyhwere on the computer, the Downloads directory is perfect.
- Download /e/ ROM
Download the latest /e/ ROM from https://images.ecloud.global/dev/suzuran/
At the time of writing this guide (April 2021) the latest was “e-0.15-q-20210312105636-dev-suzuran.zip”.
Save this file anyhwere on the computer, the Downloads directory is perfect.
================================
PART C)
Download and Test Android Platform Tools
Android Platform Tools will give you the ‘ADB’ and ‘Fastboot’ tools required to install /e/.
This software does not need to be ‘installed’ as such, just unzipped and then the tools inside the unzipped folder can be run as needed.
- Download
Download latest version of Platform Tools for your computer operating system from https://developer.android.com/studio/releases/platform-tools
platform-tools_r31.0.1-linux.zip
- Extract
Extract the Platform Tools download
Extract (unzip) platform-tools_r31.0.1-linux.zip onto your computer.
Any directory is fine, even your Downloads folder will do perfectly.
- Add to PATH
Add the path of the extracted zip to you system PATH (optional but helpful step)
In a terminal (console widow) type:
export PATH="/path/to/platform-tools:$PATH"
Replace ‘/path/to/platform-tools’ with the path where you extracted the .zip
Note: If you log out or reboot your computer you may need to run the export command again, other wise your computer will not find ‘adb’ or ‘fastboot’ even if you are issuing the commands from a terminal from within the /path/to/platform-tools directory.
- Test ADB and Fastboot
After this you should be able to access adb and fastboot by typing either of the below commands in a terminal:
adb devices
fastboot devices
================================
PART D)
Unlock the bootloader
- Turn Off My Xperia (optional)
If you have enabled My Xperia, this function must be turned off before you can unlock the device.
- Become a Developer on the device
To enable USB Debugging you will need to become a Developer first on the device.
To become a developer go to:
Settings > System > About Phone > now tap on ‘Build Number’ 7 times
Note: As you are tapping you may get a pop up ‘you are 4 taps away from becoming a developer’, that message is OK, keep taping.
After 7 taps you should get a message that you are a Developer.
- Allow OEM Unlocking AND USB Debugging
Settings > System > Developer Options > OEM Unlocking (allow the bootloader to be unlocked)
Settings > System > Developer Options > Debugging > USB Debugging (debug mode when usb in connected) : turn this on
- Make a note of the device’s IMEI
Go to Settings > About Phone > Status > IMEI Information
- Get the device unlock code from sony.com
Go to https://developer.sony.com/develop/open-devices/get-started/unlock-bootloader/#unlock-code
Select the device type and enter the IMEI to get the unlock code.
Make a note of the unlock code.
- Enter Fastboot mode
Note:
For this step you must use a USB cable that can transfer data.
Turn off the device.
Connect the USB cable to your computer (but not to the device yet).
On the device, press and hold Volume UP at the same time as you connect the USB cable to the device.
KEEP holding Volume UP until the LED on the device turns blue THEN release the Volume UP button.
- Test if Fastboot is working
With the device is connected to the computer, open a terminal window on the computer and enter the following command:
fastboot devices
Verify that you get an answer back without any errors.
Example of what is returned:
CB5B17CF58 fastboot
- Unlock the bootloader
To unlock the bootloader you need to enter unlock code provided by sony.com.
On the computer enter the following command:
fastboot oem unlock 0x
Example: fastboot oem unlock 0x30G42A275C8DD24F
Verify that you get an answer back without any errors.
Example of what is returned:
OKAY [ 0.691s]
Finished. Total time: 0.692s
Done! You have now unlocked the bootloader of the device.
- Re-enable Developer and USB debugging
Since the last step causes the device to reset completely, you will need to re-enable Developer and USB debugging to continue.
Disconnect the usb cable from the device.
Turn on the device.
Note:
Be patient. When device was turned on it showed an android figure for a few seconds, then a mobile operator splash screen which remained for a few minutes.
After a few minutes the Welcome screen will appear with ‘get started’.
You will need to go through the “getting started” steps, just skip as much as you can, dont sign up to any services especially google accounts LOL.
Become a Developer on the device:
Settings > System > About Phone > now tap on ‘Build Number’ 7 times
You will get a message that you are a Developer.
Enable usb debugging:
Settings > System > Developer Options > Debugging > USB Debugging (debug mode when usb in connected) : turn this on
================================
PART E)
Boot a custom recovery from Fastboot Mode
- Charge the device
Please now charge the device to at least to 50% in preparation for next few steps.
Best to charge it to 100% just in case.
- Enter Fastboot mode
Turn off the device.
Connect the USB cable to your computer (but not to the device yet).
On the device, press and hold Volume UP at the same time as you connect the USB cable to the device.
KEEP holding Volume UP until the LED on the device turns blue THEN release the Volume UP button.
- Test if Fastboot is working
With the device is connected to the computer, open a terminal window on the computer and enter the following command:
fastboot devices
Verify that you get an answer back without any errors.
Do not continue if the device is not listed or errors are encountered.
Note: If you see no permissions fastboot, try running fastboot as root.
- Flash the Custom Recovery Image
Note: Be prepared to do step 5 immediately after step 4 (which only takes 0.6 seconds!)
To flash the custom recovery image onto the device, open a terminal window on the computer and enter the following command:
fastboot flash recovery ~/path/to/recovery_suzuran_230218.img
Example of what is returned:
Sending ‘recovery’ (12008 KB) OKAY [ 0.448s]
Writing ‘recovery’ OKAY [ 0.121s]
Finished. Total time: 0.620s
- Reboot into Recovery Mode
As soon as the custom recovery image has been flashed, reboot into recovery mode to verify the installation.
To reboot into recovery mode:
Unplug the USB cable from the device.
Ensure device is turned off.
Press and hold Volume DOWN key while you press the Power key.
KEEP holding until the device vibrates.
Note: The device should now show a blue and black coloured interface, this is the TWRP interface which will be used in the followig steps.
================================
PART F)
Install /e/ from Recovery Mode
- Connect the device
Connect the device to the computer using USB cable.
- Use TWRP to Format and Wipe
In TWRP main menu swipe the slider that says “swipe to allow moidifications”.
Tap “Wipe”.
On the Wipe screen tap “Format Data”.
Here a new screen may show where you will have to type ‘Yes’ and confirm the action by clicking a button.
You might recieve a message: “Data format complete, sucessful”.
When the screen says “You may need to reboot recovery to be able to use /data again. Updating partition details…done”.
Do not reboot at this stage, click the blue “Back” button to get back to the “Wipe” screen.
You may need to tap “back” twice to arrive back to the “Wipe” screen.
On the Wipe screen tap “Advanced Wipe”.
Tick the “System” and “Cache” boxes and then swipe the “swipe to wipe” slider.
Tap the “Back” button to get back to the TWRP home screen.
- Install /e/
Now to “Sideload” the /e/ .zip package.
On the device in TWRP tap Advanced then “ADB Sideload” then swipe to begin sideload.
There are two tick boxes here ‘Wipe Dalvik Cache’ and ‘Wipe Cache’, tick both.
Open a terminal window on the computer and enter the following command:
adb sideload /path/to/e-0.15-q-20210312105636-dev-suzuran.zip
You should hopefully soon see a screen saying: “/path/to/e-0.15-q-20210312105636-dev-suzuran.zip’ (~1%)”
Wait until the blue bar has reached the right.
When it is complete it should say “Dalvik Cache Directories Wipe Complete” and then the device will vibrate.
- Reboot the Device
Once installation has finished , return to the TWRP main menu by tapping ‘Back’.
Tap Reboot, and then tap System.
You may receive warning got warning “no OS installed are you sure you wish to reboot?”
This is ok, swipe to reboot.
The device should restart the /e/ logo.
Congrats!
================================
PART G)
Tidy Up Your Computer
Unless you want to hold onto them for future use, you can now safely delete the following files and directories.
Files:
recovery_suzuran_230218.img
e-0.15-q-20210312105636-dev-suzuran.zip
platform-tools_r31.0.1-linux.zip
Directories:
platform-tools