[OFFICIAL] LineageOS 18.1 for Xperia Z3 Compact

Search This thread

NeoArian

Recognized Developer
Nov 25, 2017
1,325
3,089
Sony Xperia Z2
Sony Xperia Z3 Compact
2okPze5.png


Introduction
LineageOS, an open-source Android distribution, is available for several devices,
with more being continuously added thanks to the biggest, yet ever growing, Android open-source community.
Join us and breathe new life in your device, be it old or new.
If you don't know LineageOS and would like to read about it before installing it you can take a look at the official Website.

Features
Individuality

Customization is paramount to productivity.
That’s why LineageOS promises to push for user personalization and preference.
Everyone is unique and your device should be too.
Security
Your data, your rules. With powerful tools such as Privacy Guard, you are in control of what your apps can do whenever you want.
Trust will help you understand the security of your device and warn you about possible threats.
We take security very seriously: that’s why we deliver security updates every month to all our supported devices.
And to make your device more secure, lock everything behind an enhanced lock screen.
Longevity
LineageOS extends the functionality and lifespan of mobile devices from more than 20 different manufacturers thanks to our open-source community of contributors from all around the world.

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

More detailed instructions at:
Install LineageOS on z3c

Downloads
Download LineageOS 18.1 for Xperia Z3 Compact.
If you prefer TWRP over Lineage recovery, you can get it here.
Recommended Google Apps can be found here.

Installation
Please follow the instructions here.

Upgrade from LineageOS 17.1
Please follow the instructions here.
Note that you might NOT necessarily need to wipe your data if your data is not encrypted and you do not have a screen lock set!

Source code
All the source code for LineageOS is available in the LineageOS Github repo. And if you would like to contribute to LineageOS, please visit our Gerrit Code Review.

The device specific source code can be found in the LineageOS Github repo.
Z3 Compact device tree
Sony Shinano common device tree
Sony MSM8974 common device tree
Sony MSM8974 kernel
The used defconfig is lineageos_shinano_aries_defconfig.

Changelog:
Changes for z3c

Bug reports:
How to submit a bug report
LineageOS GitLab

Donate to support development:
Donate via PayPal to NeoArian
Donate via PayPal to LineageOS
 
Last edited:

Fs00

Member
Feb 8, 2017
17
5
Sony Xperia Z3 Compact
Thank you @NeoArian for your awesome work!
Just a question: now that 18.1 is out, will there be any more builds for 17.1 (e.g. security patches)? I'm asking because I'm going to wait some time before doing the move to 18.1.
 

crackyh

Member
Mar 4, 2018
8
2
Hi,

Very Thank you for your work :)

With the 17.1, I initially used Magisk 20.4. It was OK.

With the 18.1, I'm trying to install Magisk 23.0, but for now it's KO with me (I'm android newbie ;)):
- Magisk-23.0.zip install with TWRP: OK
- Magisk-23.0.apk install: OK
- but Magisk app tell me that Magisk is not installed
- I try to patch boot img..., same
Some tips for Magisk and z3c / android 11?

Best regards
 
Last edited:

Klbgr

Senior Member
Hi,

Very Thank you for your work :)

With the 17.1, I initially used Magisk 20.4. It was OK.

With the 18.1, I'm trying to install Magisk 23.0, but for now it's KO with me (I'm android newbie ;)):
- Magisk-23.0.zip install with TWRP: OK
- Magisk-23.0.apk install: OK
- but Magisk app tell me that Magisk is not installed
- I try to patch boot img..., same
Some tips for Magisk and z3c / android 11?

Best regards
This worked for me
 

L.Lmar

Member
Aug 4, 2016
41
17
I have tried upgrading from 17.1 without wiping data without success. Loading reached the wallpaper, then boot animation started again
 

mcsly100

Member
Mar 25, 2021
9
0
You don't need to wipe anything. However it won't harm and you won't loose anything of you wipe cache and system before upgrading.
Everything is looking good except I can't unlock the screen for some reason. I use my old pattern but instead of unlocking it throws me right back to the unlock screen again. Any ideas?
 

NeoArian

Recognized Developer
Nov 25, 2017
1,325
3,089
Sony Xperia Z2
Sony Xperia Z3 Compact
I have tried upgrading from 17.1 without wiping data without success. Loading reached the wallpaper, then boot animation started again

Everything is looking good except I can't unlock the screen for some reason. I use my old pattern but instead of unlocking it throws me right back to the unlock screen again. Any ideas?
In this case you should wipe data. There might be issues if you have used a pattern. I have tested an upgrade from 17.1 to 18.1 without a pattern/pin set.
The reason for this is that support for the legacy credential hash support was deprecated and we had to remove the legacy hardware keystore.
If you want to keep your data, you could try to remove the pattern on 17.1 and do the upgrade, but i can't guarantee that it will work.
Sorry for the misleading comment in the OP.
 
  • Like
Reactions: Mr.Tom_Tom

mcsly100

Member
Mar 25, 2021
9
0
In this case you should wipe data. There might be issues if you have used a pattern. I have tested an upgrade from 17.1 to 18.1 without a pattern/pin set.
The reason for this is that support for the legacy credential hash support was deprecated and we had to remove the legacy hardware keystore.
If you want to keep your data, you could try to remove the pattern on 17.1 and do the upgrade, but i can't guarantee that it will work.
Sorry for the misleading comment in the OP.
Thanks for the clarification. All good now.
 

t.Lancer

Senior Member
Jun 14, 2010
64
7
Just wanted to give my thanks for supporting this phone. Although I have moved to the XZ2c. the Z3c still acts as my backup.

thanks again!
 

Samare

Senior Member
Nov 6, 2014
64
23
CPU-Z doesn't show any data for the Significant Motion Detector so it seems like a no brainer to disable it at least for now:

Screenshot_20210726-145056_CPU-Z_1.png
 

Samare

Senior Member
Nov 6, 2014
64
23
I've changed my build.prop

Code:
ro.qti.sensors.smd=true
to
Code:
ro.qti.sensors.smd=false
-> problem solved.

By the way, I checked an old build.prop from LineageOS 17.1 and it used to be disabled, which explains why this problem is linked to 18.1.
 

tyr75

Member
Apr 13, 2011
15
43
Is there a reason why GPS doesn't work for any App / Tracker while Screen is turned off?
 

rm43115

Senior Member
May 13, 2017
176
45
In this case you should wipe data. There might be issues if you have used a pattern. I have tested an upgrade from 17.1 to 18.1 without a pattern/pin set.
The reason for this is that support for the legacy credential hash support was deprecated and we had to remove the legacy hardware keystore.
If you want to keep your data, you could try to remove the pattern on 17.1 and do the upgrade, but i can't guarantee that it will work.
Sorry for the misleading comment in the OP.
I tried the update without wiping anything - it ended in a boot loop.
Any change for upgrading without wiping data partition?
 

Samare

Senior Member
Nov 6, 2014
64
23
Is there a reason why GPS doesn't work for any App / Tracker while Screen is turned off?

I did a short test with FitoTrack without any problem. I'm guessing you made sure to enable the location permission in always mode?

I tried the update without wiping anything - it ended in a boot loop.
Any change for upgrading without wiping data partition?

Same here.
You can either try the integrated Seedvault backup (enable the backup apps option) or use the Migrate (requires root) or OAndBackupX (not tried) app.
 
Last edited:
  • Like
Reactions: NeoArian

Top Liked Posts

  • There are no posts matching your filters.
  • 16
    2okPze5.png


    Introduction
    LineageOS, an open-source Android distribution, is available for several devices,
    with more being continuously added thanks to the biggest, yet ever growing, Android open-source community.
    Join us and breathe new life in your device, be it old or new.
    If you don't know LineageOS and would like to read about it before installing it you can take a look at the official Website.

    Features
    Individuality

    Customization is paramount to productivity.
    That’s why LineageOS promises to push for user personalization and preference.
    Everyone is unique and your device should be too.
    Security
    Your data, your rules. With powerful tools such as Privacy Guard, you are in control of what your apps can do whenever you want.
    Trust will help you understand the security of your device and warn you about possible threats.
    We take security very seriously: that’s why we deliver security updates every month to all our supported devices.
    And to make your device more secure, lock everything behind an enhanced lock screen.
    Longevity
    LineageOS extends the functionality and lifespan of mobile devices from more than 20 different manufacturers thanks to our open-source community of contributors from all around the world.

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

    More detailed instructions at:
    Install LineageOS on z3c

    Downloads
    Download LineageOS 18.1 for Xperia Z3 Compact.
    If you prefer TWRP over Lineage recovery, you can get it here.
    Recommended Google Apps can be found here.

    Installation
    Please follow the instructions here.

    Upgrade from LineageOS 17.1
    Please follow the instructions here.
    Note that you might NOT necessarily need to wipe your data if your data is not encrypted and you do not have a screen lock set!

    Source code
    All the source code for LineageOS is available in the LineageOS Github repo. And if you would like to contribute to LineageOS, please visit our Gerrit Code Review.

    The device specific source code can be found in the LineageOS Github repo.
    Z3 Compact device tree
    Sony Shinano common device tree
    Sony MSM8974 common device tree
    Sony MSM8974 kernel
    The used defconfig is lineageos_shinano_aries_defconfig.

    Changelog:
    Changes for z3c

    Bug reports:
    How to submit a bug report
    LineageOS GitLab

    Donate to support development:
    Donate via PayPal to NeoArian
    Donate via PayPal to LineageOS
    3
    Good news from Magisk developers. They fixed the issue where magisk 23 cannot be installed or did not survive system update. Latest canary build 👈
    3
    Thanks again NeoArian for supporting the Z3 Compact! :)
    I've installed LineageOS 18.1 and everything is fine except...
    a kernel wakelock: sensor_SMD 2000000000
    Because of that, deep sleep isn't what it should be.

    It seems that the Z3 Compact isn't the only phone with that problem: msm8937-common: Disable the Significant Motion Detector

    Screenshot_20210724-214751_BBS_1.png


    Screenshot_20210724-214808_BBS_1.png
    3
    I've changed my build.prop

    Code:
    ro.qti.sensors.smd=true
    to
    Code:
    ro.qti.sensors.smd=false
    -> problem solved.

    By the way, I checked an old build.prop from LineageOS 17.1 and it used to be disabled, which explains why this problem is linked to 18.1.
    2
    I did a clean installation of "lineage-18.1-20210727-nightly-z3c-signed.zip" + "MindTheGapps-11.0.0-arm-20210412_124103.zip"
    (using, as recovery, lineage-18.1-20210727-recovery-z3c.img) -> OK!
    Then I tried to install Magisk following crackyh suggestion of modifying
    boot_patch.sh: the risult was unsuccessfull.

    I tried all the combinations of TWRP (twrp-3.3.1-z3c-20200212.img) and LOS 18.1 Recovery with Magisk 20.4, 22.1 and 23.0
    I didn't succeed.
    In synthesys, the risults was identical to that described by wtor68 in this post .

    wtor68 suggested here of fixing the Magisk apk "by zipalign / apksigner".
    As I'm not able to use those 2 commands in ADB Studio, could someone (wtor68 ?) help me to solve ?
    Is it possible to attache Magiskxxxx.apk file after the "zipalign /apksigner" operations?

    Thanks a lot in advance!
    I've done this on an linux ubuntu system, but it should be also possible on windows. These are the steps:

    # install packages (on windows download them anywhere): apt install zipalign apksigner # create a keystore: keytool -genkey -v -keystore my-release-key.keystore -alias my_key -keyalg RSA -keysize 2048 -validity 10000 # download Magisk and patch the file, then: zipalign -p -f -v 4 Magisk-v23.0.apk Magisk-v23.0_mod.apk # optional, verify: zipalign -c -v 4 Magisk-v23.0_mod.apk apksigner sign --ks my-release-key.keystore Magisk-v23.0_mod.apk

    Then you can install the apk directly or rename it to zip and install by twrp.