[OFFICIAL] LineageOS 18.1 for Xperia Z3 Compact

Search This thread

MaRtYy01

Senior Member
Jan 13, 2015
519
191
Plovdiv
So from what I understand, there are two ways of doing this coming from 23.0.A.2.93 with root... ( was able to backup TA partition already )

1) Flash a stock 23.5.A.1.291, which would result in the loss of the root & follow LOS official install
2) Use PRCreator to build a pre-rooted fw that has custom recovery already installed-- from there install LOS official

Is this correct and which method would you recommend?
You don't need root at all, just flash .291 firmware, unlock bootloader, flash twrp, flash rom(with the according steps)
 
  • Like
Reactions: ardaxad

ardaxad

Member
Feb 22, 2022
30
0
Is the following a known issue? Is there a fix....

_On LOS 18.1 20220405 - after enabling the following option:
settings > system > buttons > camera button - launch camera ( a longpress will launch camera )

If you unlock the screen then longpress the camera button, the camera app will launch normally...

But unlike the stock Sony behavior...

If the screen is locked then you longpress the camera button, the camera app will launch with the following error & close once you press ok:
"Camera error - Can't connect to the camera."
 

steve8x8

Senior Member
Jul 7, 2014
478
153
Samsung Galaxy S4 Mini
OnePlus One
Yesterday I checked /system/addon.d/, and found only 50-lineage.sh. [...]
This is the only misbehaving device of mine, but not the only one on Magisk 24.0... (Time to throw it out? Back cover is broken too, due to battery blowing up slowly...)
Back to the old, still unresolved story.

Yesterday was the day when I was eventually able to compare OTAs side by side, on both my OPO ("bacon", Tomoms variety) and this Z3c ("z3c" official LOS).
Setup looks very similar: LOS 18.1, MindThe GApps 11 for arm, latest (Feb 17), Magisk 24.0. Ghost Commander with root mode for filesystem inspection.
The OPO came back up with /system/addon.d/ fully populated with restore scripts for gapps, lineage, and magisk - as before.
The Z3c at some point had lost both gapps and magisk scripts, presenting me only the lineage one. I didn't spot anything critical before the device auto-rebooted, but I wasn't very attentive, I admit...
There are not many differences left - actually it's the recovery I'm suspecting: TWRP 3.6.1 for the OPO, and this special 3.3.1 for the Z3c.
I didn't check their respective kernel versions - there's a known problem with Magisk 24.2 and up affecting devices with kernels old enough, waiting for an 24.3.1 interim release, but this shouldn't hit both GApps and Magisk, should it?
Next, I'll try to fetch the recovery logs from both devices (will they have survived?), and try to find indications of "something" having gone wrong - although my imagination of what that "something" could be is constantly shrinking...

Ah, the "fix" for now was to reboot into recovery (using the extended restart menu) and dirty-flash everything (3 zips).
 
Last edited:

L.Lmar

Member
Aug 4, 2016
38
17
Is the following a known issue? Is there a fix....

_On LOS 18.1 20220405 - after enabling the following option:
settings > system > buttons > camera button - launch camera ( a longpress will launch camera )

If you unlock the screen then longpress the camera button, the camera app will launch normally...

But unlike the stock Sony behavior...

If the screen is locked then you longpress the camera button, the camera app will launch with the following error & close once you press ok:
"Camera error - Can't connect to the camera."
I use HedgeCam 2 and there is the option 'Show camera when locked'. So it works on a locked screen

Back to the old, still unresolved story.

Yesterday was the day when I was eventually able to compare OTAs side by side, on both my OPO ("bacon", Tomoms variety) and this Z3c ("z3c" official LOS).
Setup looks very similar: LOS 18.1, MindThe GApps 11 for arm, latest (Feb 17), Magisk 24.0. Ghost Commander with root mode for filesystem inspection.
The OPO came back up with /system/addon.d/ fully populated with restore scripts for gapps, lineage, and magisk - as before.
The Z3c at some point had lost both gapps and magisk scripts, presenting me only the lineage one. I didn't spot anything critical before the device auto-rebooted, but I wasn't very attantive, I admit...
There are not many differences left - actually it's the recovery I'm suspecting: TWRP 3.6.1 for the OPO, and this special 3.3.1 for the Z3c.
I didn't check their respective kernel versions - there's a known problem with Magisk 24.2 and up affecting devices with kernels old enough, waiting for an 24.3.1 interim release, but this shouldn't hit both GApps and Magisk, should it?
Next, I'll try to fetch the recovery logs from both devices (will they have survived?), and try to find indications of "something" having gone wrong - although my imagination of what that "something" could be is constantly shrinking...

Ah, the "fix" for now was to reboot into recovery (using the extended restart menu) and dirty-flash everything (3 zips).
This happens because the /system in this TWRP is mounted to /system/system and Magisk survival script doesn't know about it.
This can be bypassed in two ways. Either editing 50-lineage.sh and adding all scripts from addon.d folder to the list_files() function,
or editing /data/adb/magisk/util_functions.sh, block starting with '# Busybox could be a script, make sure /system/bin/sh exists'
 

steve8x8

Senior Member
Jul 7, 2014
478
153
Samsung Galaxy S4 Mini
OnePlus One
This happens because the /system in this TWRP is mounted to /system/system and Magisk survival script doesn't know about it.
That's what I found at about the same time (why? can we have a more recent TWRP that does it right?).
I'll give Lineage's recovery a go first, as that would be the only really stable fix I think.

After wiping system, and installing LOS recovery, I sideloaded 20220329 LOS 18.1, MindTheGApps and Magisk 24.0 (seeing the addon.d folder below /tmp/system/system). The OTA upgrade file was still present, so I gave it a go without further ado - and now 20220405 is installed and the addon.d folder is located below /system and fully populated with three survival scripts.
I guess I should leave the device with LOS recovery now (unless the same issue shows up again), and blame leave TWRP for my other devices?
 
Last edited:

ardaxad

Member
Feb 22, 2022
30
0
Anyone experience issues with sim detection on D5803 ? It seems like the phone requires a restart every time you replace the sim before it can be detected... I have another older non Xperia device running 17.1 - and it does not have these issues - It detects the sim quickly after replacement without restart & it actually works well with the automatic network selection unlike the D5803 on the latest 18.1 build....
 
Last edited:

MaRtYy01

Senior Member
Jan 13, 2015
519
191
Plovdiv
Anyone experience issues with sim detection on D5803 ? It seems like the phone requires a restart every time you replace the sim before it can be detected... I have another older non Xperia device running 17.1 - and it does not have these issues - It detects the sim quickly after replacement without restart & it actually works well with the automatic network selection unlike the D5803 on the latest 18.1 build....
Im pretty sure that is the expected behaviour, if I remember correctly it was the same on the stock rom.
 
  • Like
Reactions: chillma

ardaxad

Member
Feb 22, 2022
30
0
Any recommendations for network settings in the US using t-mob mnvno's?
Using both auto in LOS &/or the recommended apn settings directly from the mvno providers both cause frequent disconnections in service.... You constantly need to restart the phone for it to reconnect to the network....
 
Last edited:

MaRtYy01

Senior Member
Jan 13, 2015
519
191
Plovdiv
I was wondering, how are the speakers supposed to sound?

My top one is much louder than the bottom one and it is triggering me quite a lot, I even replaced the speakers and it is still like that.

Not sure if that problem is related to software as I pretty much instantly flashed a rom when I got the phone. So I'm wondering if anyone can give a bit more feedback about the speaker volume on stock vs lineage os.

Physically speaking- the top speaker looks different from the bottom one, however in size and connectors they appear to be the interchangable, now I'm thinking about disassembling the phone again and trying out the old top speaker on the place of the bottom one- maybe that would balance the sound?
 

Samare

Senior Member
Nov 6, 2014
55
22
Is the following a known issue? Is there a fix....

_On LOS 18.1 20220405 - after enabling the following option:
settings > system > buttons > camera button - launch camera ( a longpress will launch camera )

If you unlock the screen then longpress the camera button, the camera app will launch normally...

But unlike the stock Sony behavior...

If the screen is locked then you longpress the camera button, the camera app will launch with the following error & close once you press ok:
"Camera error - Can't connect to the camera."

I use HedgeCam 2 and there is the option 'Show camera when locked'. So it works on a locked screen

Double press on the power button to open camera works from screen locked and off state though, so it's strange.
 

Samare

Senior Member
Nov 6, 2014
55
22
Anyone experience issues with sim detection on D5803 ? It seems like the phone requires a restart every time you replace the sim before it can be detected... I have another older non Xperia device running 17.1 - and it does not have these issues - It detects the sim quickly after replacement without restart & it actually works well with the automatic network selection unlike the D5803 on the latest 18.1 build....

Im pretty sure that is the expected behaviour, if I remember correctly it was the same on the stock rom.

Indeed, the phone shut down when we removed the sim.
 

eXecu7or

Member
Jul 25, 2010
38
0
Hello, been using the Z3 compact for a while now with Lineage, so thank you for this.

With the latest update though (lineage_z3c_userdebug 11), an issue that I've seen a while back has resurfaced:

- the microphone is not working during normal calls; it does work though via whatsapp calls.

I can't remember the version it was fixed or what the fix is.

If there is something to test, please let me know.

Thanks!

LE: After checking my message history, looks like the LineageOS 17.1 build from October 6 2020 was one that was good and had no issue with the microphone. Hope this helps.

 

steve8x8

Senior Member
Jul 7, 2014
478
153
Samsung Galaxy S4 Mini
OnePlus One
I'm still curious what it would take to get the z3c supported, at least inofficially, in recent TWRP development (as 3.3.1 from more than 2 years ago - LOS 16.0 days? - doesn't seem to be fit for 18.1 in some respect).
 

AndreasInfo

Member
May 27, 2022
5
0
Hi, I have trouble flashing the current LOS 18.1 from https://download.lineageos.org/z3c. I have
- unlocked bootloader
- installed TWRP Recovery twrp-3.0.2-1-z3c.img
- advanced wiped Dalvik/ART Cache, System, cache and Data
- accidentally wiped for Factory Reset
- accidentally formatted data
- flashed in TWRP I get
Code:
Installing zip file '/sdcard/lineage-18.1-20220607-nightly-z3c-signed.zip'
Checking for MD5 file...
Skipping MD5 check: no MD5 file found
E3004: This package is for device: z3c; ths device is .
Updater process ended with ERROR:1
Error installing zip file '/sdcard/lineage-18.1-20220607-nightly-z3c-signed.zip'
Updating partition details...
...done
- flashed with adb sideload I get
Code:
Updating partition details...
...done
MTP Enabled
Starting ADB sideload feature...
Installing zip file '/sideload/package.zip'
E3004: This package is for device: z3c; this device is .
Updater process ended with ERROR: 1

Any idea/hint what I can do next?

Furthermore I regognized, that if I reboot in recovery, I get stuck at the Sony logo. Only way to get out is `power + volume up` to shut it down
 

L.Lmar

Member
Aug 4, 2016
38
17
Hi, I have trouble flashing the current LOS 18.1 from https://download.lineageos.org/z3c. I have
- unlocked bootloader
- installed TWRP Recovery twrp-3.0.2-1-z3c.img
- advanced wiped Dalvik/ART Cache, System, cache and Data
- accidentally wiped for Factory Reset
- accidentally formatted data
- flashed in TWRP I get
Code:
Installing zip file '/sdcard/lineage-18.1-20220607-nightly-z3c-signed.zip'
Checking for MD5 file...
Skipping MD5 check: no MD5 file found
E3004: This package is for device: z3c; ths device is .
Updater process ended with ERROR:1
Error installing zip file '/sdcard/lineage-18.1-20220607-nightly-z3c-signed.zip'
Updating partition details...
...done
- flashed with adb sideload I get
Code:
Updating partition details...
...done
MTP Enabled
Starting ADB sideload feature...
Installing zip file '/sideload/package.zip'
E3004: This package is for device: z3c; this device is .
Updater process ended with ERROR: 1

Any idea/hint what I can do next?

Furthermore I regognized, that if I reboot in recovery, I get stuck at the Sony logo. Only way to get out is `power + volume up` to shut it down
Same problem was here https://forum.xda-developers.com/t/...1-for-xperia-z3-compact.4308517/post-86636411
 
  • Like
Reactions: AndreasInfo

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    Hi, I have trouble flashing the current LOS 18.1 from https://download.lineageos.org/z3c. I have
    - unlocked bootloader
    - installed TWRP Recovery twrp-3.0.2-1-z3c.img
    - advanced wiped Dalvik/ART Cache, System, cache and Data
    - accidentally wiped for Factory Reset
    - accidentally formatted data
    - flashed in TWRP I get
    Code:
    Installing zip file '/sdcard/lineage-18.1-20220607-nightly-z3c-signed.zip'
    Checking for MD5 file...
    Skipping MD5 check: no MD5 file found
    E3004: This package is for device: z3c; ths device is .
    Updater process ended with ERROR:1
    Error installing zip file '/sdcard/lineage-18.1-20220607-nightly-z3c-signed.zip'
    Updating partition details...
    ...done
    - flashed with adb sideload I get
    Code:
    Updating partition details...
    ...done
    MTP Enabled
    Starting ADB sideload feature...
    Installing zip file '/sideload/package.zip'
    E3004: This package is for device: z3c; this device is .
    Updater process ended with ERROR: 1

    Any idea/hint what I can do next?

    Furthermore I regognized, that if I reboot in recovery, I get stuck at the Sony logo. Only way to get out is `power + volume up` to shut it down
    Same problem was here https://forum.xda-developers.com/t/...1-for-xperia-z3-compact.4308517/post-86636411
    1
    @AndreasInfo the version of TWRP you tried is wayyy too old, a 3.3.1 one is recommended in the OP. Unfortunately this also seems to be the latest TWRP provided for our device.
    Going for the "official" Lineage recovery is something I can only recommend as I had run into strange issues with TWRP - you'll lose some "nice features" (backups of hardware-oriented partitions for example) but gain some stability when it comes to "enhancements" like Magisk.
  • 15
    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.