[OFFICIAL] LineageOS 17.1 for Xperia Z3

Search This thread
Apr 25, 2021
5
0
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.
well i cant unlock it, otherwise id do it for sure.
thanks for the answer, i guess i need to research more on how it all works, getting twrp and root to work made me believe almost anything will be possible, but it seems its rather useless. especially since i cant really get magisk to work any way and twrp is installed in the system partition which leads to safetynet failing no matter what i do. well **** :D

its just a bit weird to me in general as a linux guy to know that i have root access but i cant access all partitions, especially not the bootloader, how is there no way to alter it? but thats another question, maybe someday ill take a deep dive

one thing though, i guess its possible to at least install a nougat based rom, since there was a nougat preview firmware from sony somewhere around.

thanks though.
 

nikapos

Senior Member
well i cant unlock it, otherwise id do it for sure.
thanks for the answer, i guess i need to research more on how it all works, getting twrp and root to work made me believe almost anything will be possible, but it seems its rather useless. especially since i cant really get magisk to work any way and twrp is installed in the system partition which leads to safetynet failing no matter what i do. well **** :D

its just a bit weird to me in general as a linux guy to know that i have root access but i cant access all partitions, especially not the bootloader, how is there no way to alter it? but thats another question, maybe someday ill take a deep dive

one thing though, i guess its possible to at least install a nougat based rom, since there was a nougat preview firmware from sony somewhere around.

thanks though.
why cant you unlock it? in any case , you should be looking for roms that work with locked bootloader (or [LB] ) preferably here:
 
Apr 25, 2021
5
0
why cant you unlock it? in any case , you should be looking for roms that work with locked bootloader (or [LB] ) preferably here:
in the service menu accessed via *#*#7378423#*#* it says "Bootloader unlock allowed: No"

thanks, id like to use the slimm rom i think, problem is since i cant hide twrp and root effectively and i want some finance app which uses safetynet attestation id need also to remove those, but i kinda failed at doing so previously, maybe ill try another time...
 

nikapos

Senior Member
after last update i lost magisc ( was back in 20.4)
i reinstalled 20.4 and updated to 22.1 through the manager app and it is working again, though safety net does not pass (but maybe thats because of new google checks.
i ll keep you posted..
[edit] after some reading, it looks like safety net passes,it is just the magisk safety net api that s in err..
 
Last edited:

cmhdream

Senior Member
Jun 14, 2012
111
16
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
 
Last edited:
  • Like
Reactions: nikapos

haktug

Member
Mar 29, 2020
24
3
Sound modes (dolby atmos, XZ2 sound mode etc.) over TWRP except Magisk 20.4. Nothing was loaded. This issue is only present in lineageos and crDroid system. WHY IS THAT?
 

haktug

Member
Mar 29, 2020
24
3
Sound modes (dolby atmos, XZ2 sound mode etc.) over TWRP except Magisk 20.4. Nothing was loaded. This issue is only present in lineageos and crDroid system. WHY IS THAT?
 

Mr.Tom_Tom

Senior Member
  • Feb 16, 2008
    153
    181
    Munich
    trying to swich recovery from the unofficial twrp to the lineage recovery, i got the error "failed: remote size too large". i tried flashing it with fast boot to both FOTAkernel and recovery, both failed...
    It is failing because it actually *is* too large - that's a known bug and unfortunately the fix has not been merged yet into the official Lineage sources. See post #2 for an unofficial build which should still work fine.



    my compass sensor is not working (undetected) Maybe it can be the problem??

    i also had problems with the gyroscope sensor.
    Logs please. I agree that our sensors don't work totally reliable, but after a reboot they all should work fine. On one of my devices, the compass is mostly off by quite some degrees, but that doesn't seem to be related to custom ROMs.

    We don't have that kind of persist partition iirc.
     
    • Like
    Reactions: nikapos

    nikapos

    Senior Member
    Last edited:
    • Like
    Reactions: Mr.Tom_Tom

    Top Liked Posts

    • There are no posts matching your filters.
    • 1
      trying to swich recovery from the unofficial twrp to the lineage recovery, i got the error "failed: remote size too large". i tried flashing it with fast boot to both FOTAkernel and recovery, both failed...
      It is failing because it actually *is* too large - that's a known bug and unfortunately the fix has not been merged yet into the official Lineage sources. See post #2 for an unofficial build which should still work fine.



      my compass sensor is not working (undetected) Maybe it can be the problem??

      i also had problems with the gyroscope sensor.
      Logs please. I agree that our sensors don't work totally reliable, but after a reboot they all should work fine. On one of my devices, the compass is mostly off by quite some degrees, but that doesn't seem to be related to custom ROMs.

      We don't have that kind of persist partition iirc.
      1
      @Mr.Tom_Tom

      With the sensors app, the following sensors report "waiting for value"

      orientation gravity linear acceleration (qti) and gyroscope (bosch gmg160)

      I attach the logcat. I hope i did it correctly.
      This problem comes on and off but most of the time the behaviour is erratic.

      [edit] for some reason i cannot attach the file, here's a google link instead.. https://docs.google.com/document/d/1dTZbRozOIgx_hQwuam_onYQ3Eha_kiWTXXUNyU7JcQA/edit?usp=sharing
      1
      @Mr.Tom_Tom

      Full logcat ? after started the android ?

      1.png


      2.png3.png
      1
      @Mr.Tom_Tom

      With the sensors app, the following sensors report "waiting for value"

      orientation gravity linear acceleration (qti) and gyroscope (bosch gmg160)
      Thanks for the log. Looks like a permission issue. Can you uninstall the "Exatools" Sensor app (and reboot) and look what happens here with this app:

      Full logcat ? after started the android ?
      Yes. 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
      1
      Thanks for the log. Looks like a permission issue. Can you uninstall the "Exatools" Sensor app (and reboot) and look what happens here with this app:


      Yes. 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
      well, i dont think it is a permissions issue, because the sensor data after some time start coming back and then stop again. in any case, since you suggested it, here s the logcat..
    • 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
        • 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
      • 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