[OFFICIAL] LineageOS 17.1 for Xperia Z3

Search This thread

Mr.Tom_Tom

Senior Member
  • Feb 16, 2008
    146
    177
    Munich
    If anybody is interested in new unofficial builds for Z3/Z3c/Z3dual with alternate wifi driver:

     

    penguin Lin

    Member
    Aug 13, 2019
    10
    2
    Taipei
    Hello,
    I have tried different Magisk from v20.4 to v22.0, and use the new way(v22.0) to flash new boot.img repacked by Magisk-v22.0.apk, but didn't work.
    It seems only Magisk 20.4 working.

    BTW, my current recovery is "lineage-17.1-20200911-recovery-UNOFFICIAL-z3".
     

    netwave

    Senior Member
  • Hello,
    I have tried different Magisk from v20.4 to v22.0, and use the new way(v22.0) to flash new boot.img repacked by Magisk-v22.0.apk, but didn't work.
    It seems only Magisk 20.4 working.

    BTW, my current recovery is "lineage-17.1-20200911-recovery-UNOFFICIAL-z3".
    Magisk v22.0 was killing my WiFi but thought to myself.. What If were downloading files from spoof sites which are designed to look official?
    The original developer of Magisk is a guy call John WU, I checked out his profile & XDA thread here: Link but he was Last seen Oct 13, 2020. Hence his Magisk builds are out dated!
    His latest development can be officially downloaded from the Github here:
    Magisk Genuine updates Its worth bookmarking this & avoiding all other fake websites that ultimately screw things up as re-downloaded v22.0 to find every things working as It should :)
     
    Last edited:
    • Like
    Reactions: nikapos

    Mr.Tom_Tom

    Senior Member
  • Feb 16, 2008
    146
    177
    Munich
    Follow-up on the auto-rotation issue ("Android [Screen] Rotation" stops working after 1-2 days usage):
    Last night, before putting the phone into the charging dock, screen rotation worked flawlessly. And upon putting it into the dock, the screen switched, as intended, to landscape. However, when I took the phone out of its charging dock this morning, rotation of the screen was not possible anymore.
    Analysis of this issue is still ongoing. Whoever experiences a similar problem, you can help:

    If the problem occurs, do not reboot your phone but run the following adb commands:

    • Code:
      adb shell uptime
      --> Please check if the reported time and uptime is consistent (ideally you have taken a note with a timestamp when you started your phone the last time)
    • Code:
      adb shell cat /proc/uptime
      --> Check if the first number [in seconds] matches the uptime reported above
    Some background info: The service which is managing the screen orientation frequently ("WindowOrientationListener") takes some timestamps to avoid some false interpretations, e.g. that the screen orientation changes while the user touches the screen. It then waits some milliseconds before an orientation is considered "valid". In several cases I saw that something is wrong with the timestamps, basically making the WindowOrientationListener waiting forever. I want to rule out that there is something wrong with the timekeeping of our ROM in general, e.g. an undetected rollover issue.

    [Update 01 Apr 2021]
    Issue is finally understood I guess. Our kernel and sensor HAL use some processor ticks to generate timestamps. In certain scenarios (probably related to deep sleep) the counter is reset, which is then obviously creating a delta compared to the elapsed uptime. This is then causing the WindowOrientationListener to wait forever.

    Fortunately, there is a good workaround implemented by Lineage already, we just have to enable that.

    TL;DR
    Need some more testing but I am optimistic we will have a fix implemented in official builds soon.

    As a hot fix you may replace the following file in system/vendor/overlay/ by the one attached. (Warning: I did not test this yet. May work for z3 only, not for z3dual)

    I also uploaded a new build for the z3 here:
     

    Attachments

    • framework-res__auto_generated_rro_vendor.apk
      20.4 KB · Views: 7
    Last edited:
    • Like
    Reactions: nikapos

    MartinX3

    Recognized Contributor
    Sep 14, 2014
    5,716
    2,825
    Mars
    martinx3.github.io
    I had problem installing Magisk 21.2 directly via TWRP. It said it worked/installed, but when booted Magisk Manager would not show phone as being rooted (perhaps an issue with Manager 8.0.4), and showed that no Magisk was installed. Work around was to UNinstall version 21.2 (using Magisk uninstaller via TWRP) then install Magisk version 20.4 via TWRP. After boot you will need to update Manager to 8.0.5, and it will show that update available, and then can update to ver 21.2 (through Manager) and it works fine. Safety passes without Magiskhide Props Config module installed.
    Thank you, I got crazy trying to install 22.0 until i saw your post! :)
    20.4 and 7.5.1 are the perfect workaround!
     

    netwave

    Senior Member
  • Logcat Logs for the 6633 Dual, Appologies for the late reply, had to change a HDD.
    One thing I've noticed with "Screen Cast" is that if the systems rebooted I get a connection. however If I disconnect then try a re-connect I get WiFi dropouts each time I try casting, the only solution at the moment is to reboot the system each time.
    Edit* Posted in the wrong thread!
     

    Attachments

    • LogcatX.zip
      12.2 KB · Views: 1
    Last edited:
    • Like
    Reactions: Mr.Tom_Tom

    Phenom23

    Member
    Mar 14, 2016
    27
    3
    When (approximantly) will we have a stable android 10 rom? I am just wondering, because i really like this project but it's a nightly build. Do you have any future plans on developing lineage os 18? I just want to install a stable rom in my phone, but i don't hurry up, so that's why i am asking you..In which state is this rom from being ""production ready""? (for example 50% done..) Thanks a lot!
     

    nikapos

    Senior Member
    When (approximantly) will we have a stable android 10 rom? I am just wondering, because i really like this project but it's a nightly build. Do you have any future plans on developing lineage os 18? I just want to install a stable rom in my phone, but i don't hurry up, so that's why i am asking you..In which state is this rom from being ""production ready""? (for example 50% done..) Thanks a lot!
    it s stable. it s my daily driver and no problems.
     

    netwave

    Senior Member
  • The Xperia Z3 has various model varients & we're honored Tom amongst others are supporting some of them.
    Z3 D6603,D5803,D6633 etc..
    Realise Mr.TT does not own/have every varient to hand, hence relies allot on forum feedback.
    You wont get an answer by asking Dev's "When approximately will your ROM will become stable?" think about it!
    To aid in getting a more stable ROM you can support/help yourself by logging your device for bugs/crashes, then submitting them here on XDA. Read this guide as an example: Link
    That way your more likely to get something that you would regard as stable.
    Having the latest version ROM isnt always the best either. Better to have continued support on decent build rather than seeing it abandoned just to get the latest again, which brings us back to square one on a forever aging phone.
     
    • Like
    Reactions: Phenom23
    Apr 25, 2021
    5
    0
    hey im trying to install this without an unlocked bootloader, i believe it is possible as i already have twrp 3.0.1 and root using the slim rom thanks to NUT and giefroot, but now the hurdle is to get to a newer TWRP as this version still seems to be too old.

    when installing any twrp in these forums using a flashable zip it says it succeeded but nothing changes afterwards. using the app also netted not success. obviously i cant use fastboot, so what can i do?

    someone else had this trouble?

    possibly another rom that includes a newer version of twrp that i can install as a stepping stone (as i did with the slim rom to upgrade from 2.8 to 3.0)?
     

    nikapos

    Senior Member
    hey im trying to install this without an unlocked bootloader, i believe it is possible as i already have twrp 3.0.1 and root using the slim rom thanks to NUT and giefroot, but now the hurdle is to get to a newer TWRP as this version still seems to be too old.

    when installing any twrp in these forums using a flashable zip it says it succeeded but nothing changes afterwards. using the app also netted not success. obviously i cant use fastboot, so what can i do?

    someone else had this trouble?

    possibly another rom that includes a newer version of twrp that i can install as a stepping stone (as i did with the slim rom to upgrade from 2.8 to 3.0)?
    why make your life miserable? just unlock bootloader. its not like you re loosing guarantee or anything. unlock bootloader and folow instructions, if it doesnt work, flash stock rom, flash twrp, flash linege.
     

    nikapos

    Senior Member
    any reason for that or "just because"?
    a locked bootloader checks if the phone is loading a stock rom (or very close to stock). if the rom is not issued by the vendor, the phone does not boot. this is true for all phones as far as i know, thus, in order to load another rom you have to unlock the bootloader - if the vendor allows for that.
    more info and instructions to unlock your bootloader can be found here:
    the phone will factory reset and you ll lose some proprietary sony software, but you ll be able to flash newer roms.
     

    Top Liked Posts

    • There are no posts matching your filters.
    • 1
      The Xperia Z3 has various model varients & we're honored Tom amongst others are supporting some of them.
      Z3 D6603,D5803,D6633 etc..
      Realise Mr.TT does not own/have every varient to hand, hence relies allot on forum feedback.
      You wont get an answer by asking Dev's "When approximately will your ROM will become stable?" think about it!
      To aid in getting a more stable ROM you can support/help yourself by logging your device for bugs/crashes, then submitting them here on XDA. Read this guide as an example: Link
      That way your more likely to get something that you would regard as stable.
      Having the latest version ROM isnt always the best either. Better to have continued support on decent build rather than seeing it abandoned just to get the latest again, which brings us back to square one on a forever aging phone.
      1
      well, i went back to april 22, restored data backup, did not update magisk, installed latest update OTA and everything is working. as i said, it was probably something with magisk.
      When you can't boot correctly. You need restore the previous backup by TWRP + flash [fix_rootfs_label.zip]. I had test it. Working from restore your system & app by TWRP.
      sony z3 os 17.1 TWRP v3.3.1-0.4_Z3
      download
    • 6
      lineage_strip_teal.png

      LineageOS is a free, community built, aftermarket firmware distribution of Android 10 (Q), which is designed to increase performance and reliability over stock Android for your device. LineageOS is based on the Android Open Source Project (AOSP) and can be used without the need to have any Google application installed.

      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.
      If you are coming from stock or other ROMs, you need to make a factory reset.
      As always, make sure to backup before installing this ROM.

      Detailed instructions:
      Install LineageOS on z3

      Downloads:
      • ROM and Recovery: LineageOS Downloads for z3 - Note: as of 11Sep2020, the official recovery is not working. The issue is being addressed already. See below for options.
      • Google Apps (optional): Open GApps (choose ARM as Platform and Android 10)

      Changelog:
      Changes for z3

      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 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.

      Bug reports:
      How to submit a bug report
      LineageOS GitLab

      Donate to support development:
      Donate via PayPal to NeoArian *** Our main contributor for LineageOS 16 & 17 for Z3 and Z3 Compact ***
      Donate via PayPal to LineageOS

      Thanksgiving
      Thanks to everyone who ever contributed to the custom development for this device, especially:
      @nailyk
      @rcstar6696
      @tomascus
      @Diewi
      @xkeita
      @drakonizer

      XDA:DevDB Information
      LineageOS 17.1 for Xperia Z3, ROM for the Sony Xperia Z3

      Contributors
      Mr.Tom_Tom, NeoArian, Myself5
      Source Code: https://github.com/LineageOS

      ROM OS Version: Android 10
      ROM Kernel: Linux 3.4.x
      ROM Firmware Required: 23.5.A.1.291
      Based On: LineageOS

      Version Information
      Status:
      Nightly

      Created 2020-09-11
      Last Updated 2020-09-12
      5
      Working on Wifi (5GHz) issues

      I have been working on implementing an updated wifi driver into our kernel to fix the reported wifi issues (only some countries are affected). You can follow this thread for details.

      I need some feedback from people in these affected countries with a Z3/Z3c/Z3Dual to see if the new builds work. I would appreciate if you test one of these builds here and send me a full log.


      @TheShadowOfAGhost20 @mer5ad @giannhs_n @yahyazadeh58 @navidmafi
      5
      If anybody is interested in new unofficial builds for Z3/Z3c/Z3dual with alternate wifi driver:

      4
      Flashed FTF_23.5.A.1.291 customized GEL using Flashtool (on 6603 Z3) booted, all good with stock Sony ROM. WiFi connects to Synology 2600 router and to Netgear RE305 wifi extender. ROM works fine, rebooted, no problem. Then adb install TWRP recovery, rebooted to recovery, wiped/factory reset, and flashed v 17.1 + installed BiTGapps. Rebooted, v17.1 LOS booted up fine (with USA SIM card) on Ver. 17.1 LOS but now WiFi does NOT connect to same Synology 2600 (no changes to router), but does connect to RE305.

      Why does the WiFi connect on stock Sony .291 ROM but not on LOS v 17.1? I've tried all combinations of changes at the router, not a firewall issue, not authentication, every other device I have connects to router no problem. Something was deleted/changed on Z3 when v17.1 installed. Previously tried installing v16 LOS same problem on top of same .291 customized GEL ROM. Do I need to try a different FTF?

      Any suggestions/help appreciated. Otherwise, will have to go back to Sony 291. Thank you.

      Update: Flashed customized US .291, booted up, connected to 2.4ghz and 5ghz wifi on stock Sony .291 ROM, no problem. However, after install of both nightly 17.1 and older "unofficial" 17.1 I cannot connect to either 2.4 or 5 ghz on Synology 2600ac router. Very confusing.
      @golden7 Thanks for sharing your experience. The wifi driver and regulatory settings in our official LineageOS based ROMs are very outdated. I have been working hard in upgrading that, but this is still experimental. Could you run a test with a ROM from this thread here, report if you can connect to your ac router and send me a logfile? First reports look promising. This would help a lot! If it works for you, I can send you a link to a build with SELinux enabled so that it can be used as a daily driver already.
      3
      Remarks, Questions & Answers

      Known Major Issues

      • Official Lineage Recovery is currently broken. There are two options:
      • WiFi issues in some countries (e.g. Iran): low speed @ 5GHz, hotspot and connection issues. This topic is related to a dirty workaround. A solution is here but will not be integrated into our official Lineage kernel.
      • Disk Encryption: Disk Encryption is working, however not with the default password (no password). Workaround: Set password first, then start disk encryption, not the other way round! Solved
      • Bluetooth Low Power may create wakelocks in certain scenarios.* Solved
      • 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.*
      • Reported size of adoptable storage seems to be wrong. However, remaining free space seems to be reported accurately.
      • Formating a SD card as internal storage may cause the card to be reported as "corrupted".
      • Screen rotation may not work after a while. Solved, to be integrated into builds from mid April 2021 onwards.
      • 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). However I would be happy to be mistaken here and if sombody has a solution.

      Further hints
      • This ROM currently does not work with the Z3 Dual SIM variant. Here's a build for the Z3dual.
      • If you need Google Apps we recommend the OpenGApps "nano" package, however, I personally use the "stock" package which works as well. The ROM also seems to work with MicroG and BiTGApps.
      • Magisk - see this post for issues with latest Magisk versions
      • 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!).
      • How to create logs:

        • Follow How To Logcat
        • 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
      • Screen rotation: See this post (thanks @jw243). Do you experience similar issues?

      A big THANK YOU also to @ronnay ryukay for having maintained the inofficial 17.1 thread!
    Our Apps
    Get our official app!
    The best way to access XDA on your phone
    Nav Gestures
    Add swipe gestures to any Android
    One Handed Mode
    Eases uses one hand with your phone