• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[OFFICIAL] LineageOS 18.1 for D6603 Xperia Z3

Search This thread

Mr.Tom_Tom

Senior Member
Feb 16, 2008
176
221
Munich
lineage_strip_teal-png.5158389

Introduction

LineageOS 18.1 is an open-source Android distribution based on the Android Open Source Project (AOSP) version 11 (R). This is the official LineageOS 18.1 thread for the Sony Xperia Z3 (D6603).

Installation

If you are on stock OS, you need a custom recovery first. You can get the recommended recovery in the official installation instructions link below. There are also inofficial TWRP recovery builds available - if you want to use TWRP you need to ensure that it is compatible with Android 10 or later.
If you are coming from stock or other ROMs, you need to make a factory reset. You also will need a factory reset if you come from LineageOS 17.1 with encryption enabled.
For upgrading from an earlier LineageOS version, please follow the instructions here.
As always, make sure to backup before installing this ROM.

Detailed installation instructions

Install LineageOS on z3

Downloads


Source Code

The source code of LineageOS is available here. If you would like to contribute to LineageOS, please visit out Gerrit Code Review.
  • The z3 device tree is available here.
  • The kernel is based on V3.4 and source code for this device is available here. The used configuration is lineageos_shinano_leo_defconfig available at arch/arm/configs/lineageos_shinano_leo_defconfig in the kernel source.

Changelog

Changes for z3

Bug reports

How to submit a bug report
LineageOS GitLab

Contributors

NeoArian, Myself5, Mr.Tom_Tom

If you want to donate to support development:
Donate via PayPal to NeoArian
Donate via PayPal to LineageOS
 

Mr.Tom_Tom

Senior Member
Feb 16, 2008
176
221
Munich
Remarks, Questions & Answers

Known Major Issues

  • Thermal throttling of CPU cores: Due to a design issue of the thermal manager ("Thermanager") when used with older kernels like ours you have to expect that the frequency throttling of the CPU cores may fail, especially after(!) the device was getting hot and is recovering. This may lead to performance issues until reboot and other issues. Workaround: reboot device after heavy use.*
  • Currently we are looking into a potential issue with SD cards formated as "internal" memory:
  • Miracast is currently disabled.
  • You tell us (with logs please)...
* To our knowledge, these are general issues on all AOSP/LineageOS based custom ROMs for this device family (Shinano).

Further hints
  • This ROM currently does not work with the Z3 Dual SIM variant. Here's a build for the Z3dual.
  • TWRP recovery (inofficial build, optional): TWRP
  • If you need Google Apps we recommend the OpenGApps "nano" package.
  • Magisk - see this post for issues with latest Magisk versions and a workaround
  • If you need to install a lot of apps you may run out of internal DATA storage capacity, especially if you install one of the larger GAPPS packages. These apps are initially placed on the system partition and do not cost you DATA capacity. However, every update which comes over the Play Store then fills up your data partition. Using an SD card formated as "external" storage does not help you much (unless you use a tool like app2sd which is no more recommended) and isn't encrypted. Formating the SD card as "adoptable storage" comes with the drawback that some apps do not allow to be migrated to this storage, and unfortunately this is true for some streaming music/video apps which need to store a lot of data obviously (for offline use). The solution I am using is to partition a SD card as "mixed", which gives you the possibility to offload at least some apps to adoptable storage while you still have a classical external FAT32 partition where e.g. your streaming app can save its offline files:
    1. Find a large (I tested a 400GB microSDXC card) and fast ("A1" or higher) Micro SD card.
    2. Follow this guide to partition your SD card. Note: all data on the card will be lost.
    3. Restart your phone.
    4. When you are notified that a new storage card has been detected, use it as "external". (Your internal partition has been recognized at that point already and does not need interaction.)
    5. Go to settings / Storage. Verify that you see three entries: 1. Your internal phone storage of 16GB. This includes your SYSTEM partition. 2. Your SD card with an SD card symbol. The size shown should be the full capacity of the card. If you click on it, your "external" partition is shown (misleading) as "System" and blocked. Click on migrate data to migrate all possible apps to your adoptable storage. 3. Your sd card partition formated as mobile storage (unencrypted!).

Follow How To Logcat
  • When creating a log, can you make sure you run the command with the -b option to include kernel messages:
    Code:
    adb logcat -b all
  • If your device randomly reboots:
    Go to Settings -> System -> Advanced -> Developer options -> Store logger data persistently on device. After the reboot occured: Pull the logs from /data/misc/logd/ (root required).
  • If your device crashes during boot and reboots to recovery:
    Code:
    adb pull /proc/last_kmsg
  • Please submit logs from clean systems without "Exposed" or similar modifications in place

Your feedback is wanted regarding the following topics
  • Reported size of adoptable storage - there was an issue in Lineage 17.1 - does it work in 18.1?
  • Formating SD cards as "internal storage" - there was an issue in Lineage 17.1 - does it work in 18.1?
 
Last edited:

MartinX3

Recognized Contributor
Sep 14, 2014
5,850
2,912
Mars
martinx3.github.io
Seems like magisk is still not flashable if installed in TWRP.
The workaround to flash magisk 20.4 first doesn't work anymore, since the installation aborts because it can't mount /vendor.

Patching a boot.img via magisk manager and flashing it doesn't work either.
 
Last edited:

Samare

Member
Nov 6, 2014
44
22

Attachments

  • Magisk-v23.0.zip
    6.6 MB · Views: 68

penguin Lin

Member
Aug 13, 2019
13
2
Taipei
Hello,

1. Magisk 23.0 isn't flashable on latest version (lineage-18.1-20210729-nightly-z3-signed.zip), but old version(0715, 0722) worked. >> #6 one works.
2. Cannot connect 2.4G wifi with 802.11n, but 802.11g works.

Thank you for all the contributions.
 
Last edited:

Mr.Tom_Tom

Senior Member
Feb 16, 2008
176
221
Munich
Cannot connect 2.4G wifi with 802.11n, but 802.11g works.


Here is locat.txt.

The interesting part is:

Code:
07-31 03:03:34.675  2734  2734 I wpa_supplicant: wlan0: Trying to associate with SSID '[SSID Name]'
07-31 03:03:34.863  2734  2734 I wpa_supplicant: wlan0: CTRL-EVENT-ASSOC-REJECT bssid=10:bf:48:[...] status_code=18

Status Code:
18Association denied due to requesting station not supporting all of the data rates in the
BSSBasicRateSet parameter
Will happen if the rates in the assoc request are not in the BasicRateSet in the beacon.

Hard to tell for me if the root cause for this lies in the handheld device or the access point. I am not 100% sure but I guess my devices connect fine to an 802.11n 2.4GHz network. Look if you have some exotic features enabled in your router, like proprietary bandwidth settings or something like that. If you are interested in digging a bit deeper install this ROM please (just for testing) and send me a log via PM.
 

MartinX3

Recognized Contributor
Sep 14, 2014
5,850
2,912
Mars
martinx3.github.io
The interesting part is:

Code:
07-31 03:03:34.675  2734  2734 I wpa_supplicant: wlan0: Trying to associate with SSID '[SSID Name]'
07-31 03:03:34.863  2734  2734 I wpa_supplicant: wlan0: CTRL-EVENT-ASSOC-REJECT bssid=10:bf:48:[...] status_code=18

Status Code:
18Association denied due to requesting station not supporting all of the data rates in the
BSSBasicRateSet parameter
Will happen if the rates in the assoc request are not in the BasicRateSet in the beacon.

Hard to tell for me if the root cause for this lies in the handheld device or the access point. I am not 100% sure but I guess my devices connect fine to an 802.11n 2.4GHz network. Look if you have some exotic features enabled in your router, like proprietary bandwidth settings or something like that. If you are interested in digging a bit deeper install this ROM please (just for testing) and send me a log via PM.
I use the Z3 with a Fritz!Box 7490 and 802.11g+n (Wi-Fi 4) without problems.
I also use WPA3 with WPA2 fallback (I am not sure at the moment if the Z3 has WPA3 support)
 
  • Like
Reactions: Mr.Tom_Tom

MartinX3

Recognized Contributor
Sep 14, 2014
5,850
2,912
Mars
martinx3.github.io
Unfortunately our chipset doesn't seem to support WPA3, at least there's no firmware available which supports is. Therefore the next official build will include this:
Is it really needed?
I just added the Z3 to the WPA3 network without specifying WPA2 in the settings.

My bad.
I was connected to the WPA2 guest network all the time.
I can confirm that the device won't connect to the normal WPA3/2 wifi network.
 
Last edited:

Mitezuss

Senior Member
Dec 8, 2017
55
11
Hi, is it a problem ? :

/sys/devices/system/cpu/cpu1/cpufreq/scaling_cur_freq no such file

/sys/devices/system/cpu/cpu2/cpufreq/scaling_cur_freq no such file
 

tm2133

Member
Aug 2, 2017
7
1
giúp tôi! Tôi không thể hợp nhất các biểu tượng trong một thư mục. xin vui lòng hướng dẫn tôi làm thế nào để làm điều đó, cảm ơn!
 

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    great ROM so far on my Z3, wanted to find a way to install Magisk now.
  • 8
    lineage_strip_teal-png.5158389

    Introduction

    LineageOS 18.1 is an open-source Android distribution based on the Android Open Source Project (AOSP) version 11 (R). This is the official LineageOS 18.1 thread for the Sony Xperia Z3 (D6603).

    Installation

    If you are on stock OS, you need a custom recovery first. You can get the recommended recovery in the official installation instructions link below. There are also inofficial TWRP recovery builds available - if you want to use TWRP you need to ensure that it is compatible with Android 10 or later.
    If you are coming from stock or other ROMs, you need to make a factory reset. You also will need a factory reset if you come from LineageOS 17.1 with encryption enabled.
    For upgrading from an earlier LineageOS version, please follow the instructions here.
    As always, make sure to backup before installing this ROM.

    Detailed installation instructions

    Install LineageOS on z3

    Downloads


    Source Code

    The source code of LineageOS is available here. If you would like to contribute to LineageOS, please visit out Gerrit Code Review.
    • The z3 device tree is available here.
    • The kernel is based on V3.4 and source code for this device is available here. The used configuration is lineageos_shinano_leo_defconfig available at arch/arm/configs/lineageos_shinano_leo_defconfig in the kernel source.

    Changelog

    Changes for z3

    Bug reports

    How to submit a bug report
    LineageOS GitLab

    Contributors

    NeoArian, Myself5, Mr.Tom_Tom

    If you want to donate to support development:
    Donate via PayPal to NeoArian
    Donate via PayPal to LineageOS
    6
    Remarks, Questions & Answers

    Known Major Issues

    • Thermal throttling of CPU cores: Due to a design issue of the thermal manager ("Thermanager") when used with older kernels like ours you have to expect that the frequency throttling of the CPU cores may fail, especially after(!) the device was getting hot and is recovering. This may lead to performance issues until reboot and other issues. Workaround: reboot device after heavy use.*
    • Currently we are looking into a potential issue with SD cards formated as "internal" memory:
    • Miracast is currently disabled.
    • You tell us (with logs please)...
    * To our knowledge, these are general issues on all AOSP/LineageOS based custom ROMs for this device family (Shinano).

    Further hints
    • This ROM currently does not work with the Z3 Dual SIM variant. Here's a build for the Z3dual.
    • TWRP recovery (inofficial build, optional): TWRP
    • If you need Google Apps we recommend the OpenGApps "nano" package.
    • Magisk - see this post for issues with latest Magisk versions and a workaround
    • If you need to install a lot of apps you may run out of internal DATA storage capacity, especially if you install one of the larger GAPPS packages. These apps are initially placed on the system partition and do not cost you DATA capacity. However, every update which comes over the Play Store then fills up your data partition. Using an SD card formated as "external" storage does not help you much (unless you use a tool like app2sd which is no more recommended) and isn't encrypted. Formating the SD card as "adoptable storage" comes with the drawback that some apps do not allow to be migrated to this storage, and unfortunately this is true for some streaming music/video apps which need to store a lot of data obviously (for offline use). The solution I am using is to partition a SD card as "mixed", which gives you the possibility to offload at least some apps to adoptable storage while you still have a classical external FAT32 partition where e.g. your streaming app can save its offline files:
      1. Find a large (I tested a 400GB microSDXC card) and fast ("A1" or higher) Micro SD card.
      2. Follow this guide to partition your SD card. Note: all data on the card will be lost.
      3. Restart your phone.
      4. When you are notified that a new storage card has been detected, use it as "external". (Your internal partition has been recognized at that point already and does not need interaction.)
      5. Go to settings / Storage. Verify that you see three entries: 1. Your internal phone storage of 16GB. This includes your SYSTEM partition. 2. Your SD card with an SD card symbol. The size shown should be the full capacity of the card. If you click on it, your "external" partition is shown (misleading) as "System" and blocked. Click on migrate data to migrate all possible apps to your adoptable storage. 3. Your sd card partition formated as mobile storage (unencrypted!).

    Follow How To Logcat
    • When creating a log, can you make sure you run the command with the -b option to include kernel messages:
      Code:
      adb logcat -b all
    • If your device randomly reboots:
      Go to Settings -> System -> Advanced -> Developer options -> Store logger data persistently on device. After the reboot occured: Pull the logs from /data/misc/logd/ (root required).
    • If your device crashes during boot and reboots to recovery:
      Code:
      adb pull /proc/last_kmsg
    • Please submit logs from clean systems without "Exposed" or similar modifications in place

    Your feedback is wanted regarding the following topics
    • Reported size of adoptable storage - there was an issue in Lineage 17.1 - does it work in 18.1?
    • Formating SD cards as "internal storage" - there was an issue in Lineage 17.1 - does it work in 18.1?
    3
    Seems like magisk is still not flashable if installed in TWRP.
    The workaround to flash magisk 20.4 first doesn't work anymore, since the installation aborts because it can't mount /vendor.

    Patching a boot.img via magisk manager and flashing it doesn't work either.
    This one should work, see https://github.com/topjohnwu/Magisk/issues/3636
    1
    Does anyone experience a kernel wakelock for SMD like on the Z3 Compact where it prevents deep sleep?
    1
    The interesting part is:

    Code:
    07-31 03:03:34.675  2734  2734 I wpa_supplicant: wlan0: Trying to associate with SSID '[SSID Name]'
    07-31 03:03:34.863  2734  2734 I wpa_supplicant: wlan0: CTRL-EVENT-ASSOC-REJECT bssid=10:bf:48:[...] status_code=18

    Status Code:
    18Association denied due to requesting station not supporting all of the data rates in the
    BSSBasicRateSet parameter
    Will happen if the rates in the assoc request are not in the BasicRateSet in the beacon.

    Hard to tell for me if the root cause for this lies in the handheld device or the access point. I am not 100% sure but I guess my devices connect fine to an 802.11n 2.4GHz network. Look if you have some exotic features enabled in your router, like proprietary bandwidth settings or something like that. If you are interested in digging a bit deeper install this ROM please (just for testing) and send me a log via PM.
    I use the Z3 with a Fritz!Box 7490 and 802.11g+n (Wi-Fi 4) without problems.
    I also use WPA3 with WPA2 fallback (I am not sure at the moment if the Z3 has WPA3 support)