[ROM][UNOFFICIAL][6.0.1][E6653/E6603] CyanogenMod 13 for the Sony Xperia Z5 [ALPHA]
CyanogenMod 13 for the Sony Xperia Z5 E6653 and E6603
CyanogenMod is a free, community built, aftermarket firmware distribution of Android 6.0 (Marshmallow), which is designed to increase
performance and reliability over stock Android for your device.
CyanogenMod is based on the Android Open Source Project with extra contributions from many people within the Android community. It can be
used without any need to have any Google application installed. You will need to provide your own Google Applications package (gapps).
CyanogenMod does still include various hardware-specific code, which is also slowly being open-sourced anyway.
Before you start
This ROM is only for the E6653 and the E6603
Code:
*
* Your warranty may be voided !
*
* I am not responsible for bricked devices, dead SD cards,
* thermonuclear war, or you getting fired because the alarm app failed. Please
* do some research if you have any concerns about features included in this ROM
* before flashing it! YOU are choosing to make these modifications, and if
* you point the finger at me for messing up your device, I will laugh at you.
*
Special Thanks
@CTXz for getting the ball rolling on CyanogenMod for Z5 series and stemming the lion's share to get this working
@oshmoun for providing fixes ASAP
@AndroPlus for providing a great kernel that works with many recoveries
@moonbutt74 for reminding me that smashing your device can provide a solution
@sub77 for teaching me how to work with QCOM (I was on exynos before)
@Joeisgood99 for providing a solid working TWRP-3.0.0.0 build until we had our own
@bazhip for providing a well working twrp 2.8.7.0 for restoring until we had our own
@alphatact1cs has a great overview on lots of topics for the Z5 device family
@auras76 for his great Custom ROM
The Sonyxperiadev team for releasing their sources to the public
SonyAOSP team
SonyCM team
And ofcourse the entire CyanogenMod team!
(Known) Issues
Horizontal color lines and color glitches during bootup
Gapps (permissions issues) [occurs occasionally and should be circumvented by full-wipe approach (incl. internal storage)
Hang/Loop during boot stage (should be circumvented by full-wipe approach (incl. internal storage))
Flash light / Torch
Video Recording
Bluetooth (keeps restarting)
Camera Colors (can be circumvented by using specific apps CameraNext Mod
Camera Focus & Sharpness (driver issue, probably since it uses Xperia Z (original) drivers but different lenses ?)
Camera lowlight pictures (might improve with release of Sony's "Experimental AOSP Camera" for the Z5 series, porting of other Framework + Stock Cam app; partially needs DRM magic)
Full brightness (max brightness currently is pretty low)
Fingerprint sensor
Lag after booting up device (Will resolve after locking phone and waiting a few seconds)
What has been Fixed
Gapps
Sudden Lag after some time
NFC
Odd calling numbers
In-call mic
Sound on calls
Camera button
Microphone
Thermal regulation
Red flashy frames
RIL (SIM detection)
Dex pre-optimization
Camera
Sensors
Crash after locking device
microSD access
Guides/Instructions
Unlocking Bootloader
Warning! The following procedure may void your warranty and will wipe EVERYTHING
Visit Sonys Official Bootloader Unlock guide (Details to all the risks you are taking are located on their site)
After Unlocking your bootloader you can proceed with the next steps
Steps on how to Fastboot, Flashmode, Recovery, Emergency/Force Poweroff
@alphatact1cs has a great overview on lots of topics for the Z5 device family
over at [GUIDE] Sony Xperia Z5 - UNLOCK / ROOT / TWEAKS - OS 5.1.1 / 6.0
There go to the [GUIDE] StockROM section , open it up and under #GENERAL you'll find everything you need to know.
Setting up fastboot and how to use it
For windows users
Please checkout this guide on how to use fastboot on windows
If you prefer to keep a low footprint instead of installing the whole Android SDK, take a look at its thread
[TOOL]Minimal ADB and Fastboot [8-28-15]
For Linux users
Installation
Debian based distros (Debian, Ubuntu etc.)
Open a terminal and enter the following :
Code:
sudo apt-get update && sudo apt-get install android-tools*
Confirm the installation by either hitting enter or typing y
Gentoo based Distros (Gentoo, Funtoo, Sabayon, Scientific Linux)
Once you're in a terminal, enter the following:
Code:
emerge dev-util/android-sdk-update-manager
Other distros (Arch, Fedora, Open Suse etc.)
Please find the apropriate packages to install android fastboot tools for your distro
How to use
Open a terminal in the location your .img file is located or cd into that directory like this:
Code:
cd <path to your directory that contains the .img files>
Replace <path to your directory that contains the .img files> with your actuall path
To boot temporarely into a .img (ex recovery) use the following command (replace <your.img> with your .img file) :
Code:
fastboot boot <yourfile>.img
To flash a kernel image enter the following (replace <your.img> with your .img file):
Code:
fastboot flash boot <your.img>
To flash a recovery image enter the following (replace <your.img> with your .img file):
Code:
fastboot flash recovery <your.img>
To exit fastboot enter :
Code:
fastboot reboot
How to install CM 13
Above all - do a Backup of ALL your data
When I write ALL I mean ALL (this includes the data on your micro SD card,
don't come whining to me if you loose your wedding photos/videos, kids' photos/videos or other important stuff !
For optimal experience I'd recommend my built custom kernel (quicker boot times, higher reliability, more tweakability)
General, in-depth instructions
Download one of the newer Z5 AndroPlusKernels v20+ by @AndroPlus from his official website (Scroll down and select Z5, then on AndroidFileHost search for Z5_AndroPlusKernel_Permissive_v2 (v20 - v23) and download it)
Extract the flashable zip-file e.g. Z5_AndroPlusKernel_Permissive_v23.zip
Download our TWRP 3.0.1-0 build for the Z5)
Download the appropriate gapps from below (Can be downloaded on your device)
Download the CM 13 Zip for the Z5 from below (Can be downloaded on your device)
Move the GAPPS zip and the CM 13 to your Z5 if you haven't downloaded them on your device
Power Off your Z5 and wait about 10-15 seconds to make sure it's off
To enter fastboot mode hold VOL UP and while holding VOL UP connect your device to your pc via cable
When the notification LED has turned blue you are in fastboot mode
On your PC flash the boot.img that has been extracted from the Z5_AndroPlusKernel_Permissive_v23.zip using fastboot (
Code:
fastboot flash boot boot.img
)
Now flash twrp-3.0.1-0-E6653-20160403.img by using fastboot (
Code:
fastboot flash recovery twrp-3.0.1-0-E6653-20160403.img
)
Once both of those images have been flashed you can reboot the device like so:
Code:
fastboot reboot
Quickly pull the usb cable from the computer (you can leave the other end in the phone's port)
When booting up wait for the notification light to turn yellow at the Sony logo
Once it has turned yellow, you will enter TWRP by pressing VOL UP (or VOL DOWN - up works more reliably)
If you've missed the step above, reboot your device and try the step above again
Alternatively you can force turn off the device via: Power Button + Volume Up , then turn it on again via Power Button
If TWRP asks you to enable read and write, swipe to continue
Go to settings and lower the max brightness to the minimum or one of the lower levels to preserve energy
In TWRP make a full backup to the microSD in case you want to revert back to stock.
After it has finished, in this case Reboot -> System.
Copy over the TWRP folder from the external microSD to your computer (reason: you might not have access to your external SD or have to reformat it
Thank Microsoft, Sony, etc. for that: "Stock" ROM uses texfat , AOSP, CM, etc. uses exfat, ext4, ntfs
The files on the microSD might get corrupted (filesystem problem) or the microSD going crazy (I already had both cases)
Now Power on your phone and follow the steps again to get into TWRP
Swipe to continue (?)
select Wipe > Advanced Wipe
Now ONLY tick Dalvik/ART cache, System, Cache and Data
WARNING! THE NEXT STEP WILL WIPE YOUR SYSTEM AND DATA, MEANING YOU WILL DELETE YOUR STOCK SONY SYSTEM AND ALL YOUR APPS
(You already DID a Backup of your files so nothing to worry about)
Once you've ticked the correct boxes, swipe to wipe
Once the wipe is complete, return to the main menu and select Install
Locate and select your CM 13 Zip
Select "Add more Zips" and add your GAPPS package and finally swipe to install
Once the installation succeeded you can select "Reboot System"
Wait for CM 13 to boot up (Can take several minutes)
Enjoy CM13 ;)
OPTIONAL: You can remove your TWRP backup that is located in the TWRP folder if you feel like you will no longer need it
Tl;dr (aka the quick and clean method - no battery drain 99% guaranteed)
Warning! The following procedure may void your warranty and will really wipe EVERYTHING
Take a look at the steps above:
Backup the data of your internal storage and external storage (microSD)
Copy at least the GApps to your microSD
Follow the steps above to create a TWRP Backup of your System
Reboot -> System
Copy the TWRP Backup to your Computer (you might lose access to your microSD (filesystem) so better be safe
Take a look how to get into Fastboot Mode (USB Cable attached to phone, VOL Button UP - attach to PC - blue LED light )
Now there's still a way out:
If you have doubts pull the USB Cable and go back to "Stock"
Quote:
Originally Posted by Morpheus
You take the blue pill, the story ends. You wake up in your bed and believe whatever you want to believe.
...
...
Now it's time to wipe everything ( well, except your microSD ) - this will make sure you get a flawless experience
Quote:
Originally Posted by Morpheus
You take the red pill , you stay in Wonderland, and I show you how deep the rabbit hole goes.
Oh ?! - You're still reading this ?
So I assume you're up for it ?!
...
...
Well, then let's go !
In a nutshell you'll flash twrp.img (if not already done), boot.img, userdata.img ( overwriting 'internal storage' ) and system.img
To get GApps working flawlessly - I WARN you in advance to stay alert and press the VOL UP Button during first bootup (once the notification LED lights up magenta/purple )
START
fastboot flash boot boot.img
fastboot -S 256M flash userdata userdata.img
fastboot -S 256M flash system system.img
...
fastboot reboot
Quickly pull the usb cable from the computer (you can leave the other end in the phone's port)
As soon as the notification LED lights up - press VOL UP
swipe left (does TWRP ask at that stage ?)
Install -> navigate to the folder, where the gapps are stored on your microSD
select Wipe > Advanced Wipe
Now ONLY tick Dalvik/ART cache
System -> Reboot
This will take a while - relax :)
Welcome to CyanogenMod !
How to ROOT
In CM 13, enable the developer options
Select Root access
Select Apps Only (Or Apps and ADB if you use ADB)
Done
How to disable the Thermal Manager
Before we start I want to set a few questions and warnings. Disabling the thermal manager will cause you device to run slightly hotter, do this at your own risk.
Let's start out with why you would want to disable the thermal manager. At this point it's not recommended to disable the thermal manager as it has been fixed. However some people still want the max performance out of their device. The average heat without the thermal manager will be roughly the same, if not less compared to the stock ROM with it's thermal manager enabled.
So why is the thermal manager even included if it the device runs mostly fine without it. As most of you already know, the Snapdragon 810 (MSM8994) has overheating problems. The first CM boot after flash is responsible for optimizing apps and android and can become extremely resource hungry at that point. Due to that, the device can heat tremendously! Not only can that cause a panic reboot but it can also damage your device in rare cases. To avoid that issue a thermal manager shrinks down process and slowers the boot animation (That's why the CM logo may lag at first boot).
Enough said, let's get going..
To disable the thermal manager you must do the following :
First enable root access (See "How to ROOT" guide)
Open the CM file manager
Go to settings > General Settings > Access Mode
Select root acess mode
Go back to the file manager
Swipe from left to right or press the menu button in the upper left corner
Select Root folder
Open the folder/directory called etc
Delete thermanger.xml
Reboot
Done
How return back to stock via TWRP backup
Reboot your device
Wait for the notification light to turn purple at the Sony logo
Once it has turned purple, you will enter TWRP by pressing VOL UP or VOL DOWN
If you've missed the step above reboot and try again
If TWRP will ask you to enable read and write, swipe to continue
In TWRP select restore and select your backup, then swipe to restore
Once the restore is done you can select "Reboot System"
If your device hangs at the Sony wave boot animation, force shut down and power your device up again.
Downloads
Latest recommended CyanogenMod release for the Sony Xperia Z5 E6653/E6603 :
6.0.1_13.0-20160408-UNOFFICIAL-sumire
Latest recommended Kernel for the CM release for the Sony Xperia Z5 E6653/E6603 :
SunKernel I.1_10_5 for CM 6.0.1_13.0-20160408 for the Z5
All my releases can be found here on : Android File Host
Gapps (Select ARM64 > 6.0) :
Open Gapps
[GAPPS][6.0/5.1/5.0][arm/arm64] Official Slim GApps ( recommended )
Questions and bug reporting
The following questions will be ignored
Inappropriate questions
Requests for other devices
Forced orders, EX. : "PLS FIX!!!!!!"
ETA's
Often repeated questions or requests usually by the same user
Requests that are out of CM's framework (Ex. Adding Sony Apps)
How to report a bug/issue
Explain exactly what happens
Mention a log if you can (Please use hastebin or any other paste site to keep the thread clean)
If you can't mention a log, explain as precise as possible when, why and where it occurs!
Changelog
Code:
2016/04/11
- CM 13 For the Z5 E6653 Released
2016/04/10
- CM 13 For the Z5 Premium E6853 Released
2016/04/05
- Fixed GApps
- Partially fixed Bluetooth
- Synced to latest CM sources
2016/03/27
- Fix thermal manager lag
- Fix NFC
- Updated kernel configs
- Added ffmpeg codecs support
- Synced with newest CM sources
-------------------------------------------
* For devs
- Cleaned up suzuran and satsuki tree
- > Moved common media configs to kitakami common tree
- > Moved acdb files to vendor tree
2016/03/24
- Fix In-call Mic
- Add support for the E5803
- Add option to boot into recovery (On purple LED at Sony logo press VOL UP or VOL DOWN to enter recovery)
- Update Thermal manager
- Merge latest AOSP kernel commits
- Sync to newest CM source
2016/03/22
- Fix microphone
- Add settings for camera button
- Add settings for volume rockers
- Fix sound on calls
2016/03/20 - RIP TonyStark, you were a great moderator and we'll all miss you.
- Added Thermal regulation to avoid overheating problems
- Fixed Red flashy frames
- Fixed RIL (SIM detection)
- Fixed Dex pre-optimization
- Fixed Camera
- Fixed Sensors
- Fixed Crash after locking device
2016/03/18 - CM 13 For the Z5 Compact E5823 Released
Source Code
All Source Code can be obtained from here : Sony Kitakami Developer Organization
Kernel Source code can be obtained from : zachariasmaladroit/android_kernel_sony_msm8994_kitakami_r2
We gladly accept any developers that are willing to contribute to this project! Please PM @CTXz if you are interested in joining this project!
Build from Source
The guide on how to build your own Z5 ROM will be posted once we feel like this ROM is ready enough
Screen Shots (Z5 compact)
XDA:DevDB Information
CyanogenMod 13 for the Sony Xperia Z5 E6653 and E6603, ROM for the Sony Xperia Z5
Contributors
CTXz, Moonbutt74 , zacharias.maladroit , oshmoun
Source Code: https://github.com/Sony-Kitakami
ROM OS Version: 6.0.x Marshmallow
ROM Firmware Required: 6.0 Recommended
Based On: CyanogenMod
Version Information
Status: Alpha
Created 2016-04-11
Last Updated 2016-04-11