[CLOSED][OFFICIAL] LineageOS 17.1 for z3c

Status
Not open for further replies.
Search This thread

tomKater

Member
Jul 29, 2014
37
7
Huawei MediaPad M5 Lite
Thank you!
Fortunately, in contrast to Version 2, where I had to fully re-implement some parts of the power management, this fix now only requires 3 lines of source code change in total (y)

Hi,

Good job ! Thank you for you efforts. Now looking forward to having the correction by OTA.
I investigate my battery drain for a while now and there is another wakelock that often appears : "mmc0:0001:2".
I could not determine what this was due to. It appears during the night, without action from my part. Only one post on xda found, and no solution.

Does anyone have the same ?
 

Spaceoid

Senior Member
Mar 29, 2013
473
197
Dortmund
Hi,

Good job ! Thank you for you efforts. Now looking forward to having the correction by OTA.
I investigate my battery drain for a while now and there is another wakelock that often appears : "mmc0:0001:2".
I could not determine what this was due to. It appears during the night, without action from my part. Only one post on xda found, and no solution.

Does anyone have the same ?

When I still used the Z3C I had the same wakelock, back on LOS 16. Another user told me this:

 

tomKater

Member
Jul 29, 2014
37
7
Huawei MediaPad M5 Lite

NeoArian

Recognized Developer
Nov 25, 2017
1,403
3,307
Sony Xperia Z2
Sony Xperia Z3 Compact
Some bugs appeared on the last 3 updates. Reflashing did not fix the problems. I have no gaps installed, root.
The problem appears when I enable Safe Start, when the device is encrypted.
1. Accelerometer sensor, autoprotect, proximity does not work.
2. When turning on the phone, a long startup before the screen where you must enter the password is displayed. Usually the first startup should be faster, asking for the password.
The problem lies somewhere in the encryption of the device, in the option Safe start.
Am I understanding the issue correctly, that only when your device is encrypted and when booting to safe mode the sensors are not working correctly for you?
At the end of December we have indeed merged a patch to stat the sensors service on late_start in order to fix some issues with encrypted devices (encrypted devices without an actual password/pin set did not boot previously).
 

versus2165897

New member
Feb 7, 2021
2
1
Am I understanding the issue correctly, that only when your device is encrypted and when booting to safe mode the sensors are not working correctly for you?
At the end of December we have indeed merged a patch to stat the sensors service on late_start in order to fix some issues with encrypted devices (encrypted devices without an actual password/pin set did not boot previously).
Yes, that's right.
When Safe Start is turned on, the accelerometer does not work. Therefore, screen rotation, light sensor does not work.
 
  • Like
Reactions: NeoArian

NeoArian

Recognized Developer
Nov 25, 2017
1,403
3,307
Sony Xperia Z2
Sony Xperia Z3 Compact
Yes, that's right.
When Safe Start is turned on, the accelerometer does not work. Therefore, screen rotation, light sensor does not work.
Thanks for the report. We were able to reproduce it and have fixed it. We will merge the fix within some days so that it will be fixed in the upcoming releases.
Greetings, arian.
 

crpdvv

New member
Feb 25, 2021
1
0
Will it be possible to apply this kernel patch to official LineageOS 17.1 z3c build:
To fix this problem with orbot:
Or was the patch already applied?
I still have this problem with orbot with latest 17.1 build:
lineage-17.1-20210223-nightly-z3c-signed.zip
 

mindyabiznis

Senior Member
Oct 16, 2011
374
57
Hey @NeoArian is there any possibility at all of adding dualshock4 Bluetooth compatibility to this?

Thee ps4 remote play app is telling me that it's not compatible but I thought android 10 supported it natively.
 
  • Like
Reactions: Spaceoid

NeoArian

Recognized Developer
Nov 25, 2017
1,403
3,307
Sony Xperia Z2
Sony Xperia Z3 Compact
Hey @NeoArian is there any possibility at all of adding dualshock4 Bluetooth compatibility to this?

Thee ps4 remote play app is telling me that it's not compatible but I thought android 10 supported it natively.
I have just tried to connect a dualshock 4 controller via bluetooth to my phone and it worked just fine. On my newer devices it's possible to use the trackpad as mouse input, that was not possible but apart from this it works good for me. Is it not connecting at all for you or is your issue that the trackpad is not working?
 

mindyabiznis

Senior Member
Oct 16, 2011
374
57
I have just tried to connect a dualshock 4 controller via bluetooth to my phone and it worked just fine. On my newer devices it's possible to use the trackpad as mouse input, that was not possible but apart from this it works good for me. Is it not connecting at all for you or is your issue that the trackpad is not working?

It tells me my device is not dualshock 4 compatible when I go into the remote play app.

The controller pairs with the phone and it seems to work on the phones UI but not in the remote play app.

Do you have a ps4 and the remote play app works?
 

NeoArian

Recognized Developer
Nov 25, 2017
1,403
3,307
Sony Xperia Z2
Sony Xperia Z3 Compact
It tells me my device is not dualshock 4 compatible when I go into the remote play app.

The controller pairs with the phone and it seems to work on the phones UI but not in the remote play app.

Do you have a ps4 and the remote play app works?
My brother has a ps4 but i do not use google services on my z3c and hence the remote play app doesn't start for me. What do you need the app for? Don't you intend to use the controller for games on your phone?
 

mhanbury

Senior Member
Dec 3, 2004
94
4
Hi, Can someone please confirm if Ant+ sensors are supported on this ROM and if the Ant service hal is installed as a system app?
 

J_C_D

Member
Jan 30, 2012
21
14
Mannheim / Germany
Just a note on the LineageOS for MicroG build variant that I want to share here:

AFAIK, MicroG Core versions 0.2.16 and 0.2.17 are having a bug related to Google / Firebase Cloud Messaging (GCM/FCM) which prevents Apps from initially registering for Cloud Messaging.

So, if you install this ROM for the first time, you should use an older release that has MicroG core version 0.2.15 bundled.
Then, install your Apps, allowing them to register for Cloud Messaging. If that succeeded, you can upgrade the ROM to the latest release of LineageOS for MicroG. Cloud Messaging registration will stay intact in this case.
 

armorgeddon

Senior Member
Nov 23, 2008
62
20
Hi guys,
before opening the bootloader on my newly bought Z3 Compact in order to run LOS 17.1 then I'd like to ask the following question: Is it still even possible to backup the device's DRM keys from the TA partition? In case it's still possible is there an up-to-date how-to available somewhere? All I found seemed outdated to me. In case DRM key backup is still possible I wonder if it's still needed at all since reading across this forum and a German one I got the impression that at least in the past LineageOS had implemented something which basically out of the box gives near Stock-ROM-camera-quality which is all I care about in regards to the DRM issue. So is that still the case or did Sony intervene in the meantime and prevent that?
Thanks very much for reading!
 

pawloland

Senior Member
Jan 23, 2019
186
74
Sony Xperia 5 II
Hi guys,
before opening the bootloader on my newly bought Z3 Compact in order to run LOS 17.1 then I'd like to ask the following question: Is it still even possible to backup the device's DRM keys from the TA partition? In case it's still possible is there an up-to-date how-to available somewhere? All I found seemed outdated to me. In case DRM key backup is still possible I wonder if it's still needed at all since reading across this forum and a German one I got the impression that at least in the past LineageOS had implemented something which basically out of the box gives near Stock-ROM-camera-quality which is all I care about in regards to the DRM issue. So is that still the case or did Sony intervene in the meantime and prevent that?
Thanks very much for reading!
DRM keys are still on your phone if previous owner didn't tinker with it before, or if he backed them up, and restored them properly. These keys are only functional on stock ROM, they will do nothing on custom rom, or they will even break things on custom rom, because they aren't meant to be there (I am not sure about that, never tried it). You can follow old guides, this phone is old, so the guides are also old, but not outdated - there wasn't any new stock updata since android MM. Wether it is needed or not, I would say it is not needed if you plan to use only custom roms and never come back to stock, but if you want to go back to stock at some point for wathever reason, you would need TA backup, to have the exact same experience as before unlocking bootloader. If you don't do TA backup, you will lose your unique DRM keys forever. Personally I would back them up, because it doesn't cost anything and can come in handy in the future.
 

armorgeddon

Senior Member
Nov 23, 2008
62
20
@pawloland Thanks for answering! I successfully backed up my DRM keys using "Universal (Dirtycow-based) TA Backup v2" which was very easy to do and didn't even need rooting the device prior.

*EDIT* I successfully installed this ROM now, all looking good so far. What's the recommended method to root this LineageOS ROM?

*EDIT2* Well, the enjoyment with the device only lasted for a very short while since I now discovered that SD-cards won't click-in into the Z3Cs reader. Appalling quality control at Sony, attention to detail traditionally only to their DRM systems :-( I'll try to get a replacement device from the seller, so my question above regarding how to root best is still valid.
 
Last edited:
Status
Not open for further replies.

Top Liked Posts

  • There are no posts matching your filters.
  • 12
    Good Evening!

    It's the time again, you might have already noticed that lineage 18.1 is official for some devices now. We, the sony shinano maintainers, were not sleeping and have also prepared our device for 18.1. I have uploaded a test build here: https://sourceforge.net/projects/ep...18.1/lineage-18.1-20210406-UNOFFICIAL-z3c.zip
    I would appreciate some testing/feedback on this build. There shouldn't be major issues on the test build, from my own testing it should be on-par with 17.1.
    I am optimistic that we can also achieve an official release of 18.1 for the z3c.

    All source codes can be found on the lineageos github in lineage-18.1 branches + additional patches for sony msm8974 are up on gerrit: https://review.lineageos.org/q/status:open+-is:wip

    Happy flashing!
    9
    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 17.1 for Xperia Z3 Compact.
    If you prefer TWRP over Lineage recovery, you can get it here.
    Recommended Google Apps package: Open GApps (choose ARM as Platform and 10.0 as Android, use the Variant you want. Recommended nano package)

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

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

    Contributors
    NeoArian
    ROM OS Version: Android 10
    ROM Kernel: Linux 3.4.x

    Version Information
    Status: Stable

    Created 2020-09-08
    Last Updated 2020-09-12
    6
    GOOD NEWS EVERYBODY!!!
    I managed to finally fix the persistent "BTLowPower" wakelock
    which caused the CPU to no longer enter Deep Sleep state and thus resulted in high battery drain once Bluetooth had been enabled! 🍻

    UPDATE: I just found a much simpler solution that does the trick! The real culprit was a #ifdef in BT Power Management that was introduced by a commit in July 2019 and then has fallen into oblivion :ROFLMAO:.
    Fixed! -> Version 3.
    @tblr0ne , @L.Lmar : can you please also test this version?



    *** TESTERS NEEDED! ***

    Find attached the modified boot.img. USE AT OWN RISK!

    Installation:
    - reboot Z3C into Bootloader (Vol+)
    - flash new boot image over current LineageOS17.1 installation using fastboot
    Code:
    fastboot flash boot boot-BTLowPower-fix-3.img
    - reboot
    Code:
    fastboot reboot

    NOTE for Magisk users:

    After flashing the new boot image, it is required to re-install Magisk. Do this by immediately booting into TWRP after the new boot image is flashed.
    Also note that you need Magisk v20.4 for this! Later versions won't work.
    Anyway, you will be able to upgrade Magisk to up-to-date versions using Magisk Manager after the system has booted.

    @NeoArian when everything seems ok, I will create a merge request in LineageOS/android_kernel_sony_msm8974. Is this the correct place / way to go?
    6
    Revived my Z3c with LineageOS 17.1 a few days ago and I'm very pleased so far.
    Nice to see that this great device still has community love and support.

    But the current Lineage ROMs have a bug that prevent Netguard (an open source, no root VPN based Firewall) from running correctly and blocks all traffic if the VPN Service is active:
    It seems the problem was fixed for some devices and partly for others but not in general.

    @NeoArian Can you have a look if the fix can be ported to the Z3C?
    Yes, i will take a look into the kernel patches soon.
    After neglecting the phone for a couple of months, I finally rediscovered it in a drawer, even with some remaining charge. It was still running an older 17.1 version, and with 20210608 being the latest release, I decided to OTA upgrade.

    After downloading, I gave my OK to boot into TWRP (3.3.1 from 2019) but that one didn't find the update automatically.

    Is this expected behaviour, or did I miss something important? I found the file in /data/lineageos_updates eventually...

    Also during installation, I couldn't spot any hint of GApps being adapted (but PlayStore is still there, so I won't worry) while Magisk (20.4) logs showed up... At the moment, a MagiskManager at 23.0 with Magisk left at 20.4 seems to pass SafetyNet tests, and I'm not eager to break the device. Could this cause any problems?
    Please use the recommened lineage recovery, OTA is working fine with it. If the Playstore is still there you don't need to worry about having lost the gapps.
    What kind of problems do you talk about with magisk?
    The problem still exists in latest 17.1-20210608 Nightly. Any updates?

    And I encountered another bug. When I try to uninstall certain apps the package installer immediately closes and nothing happens (for example when trying to uninstall Whatsapp). But only a few apps are affected.
    But it could also be a problem with open GAPPS since GAPPS replaces the AOSP package installer with the google one.


    Encryption worked without a problem. First I thought something went wrong because the lineage boot animation was shown for a very long time (20-30 min) and then it rebooted into recovery. After wiping cache and dalvik the OS booted fast and without problems.
    I can not reproduce the issue about uninstalling apps on a build without gapps. Could you get a log of that?
    I'm sorry about the screen timeout issue, but i currently don't have the time to look into it, the main focus lies on device specific issues and an official release of 18.1.
    5
    Hello @NeoArian , hello community. I'am very happy to see that the "BTLowPower" wakelock issue was fixed by @J_C_D and that it was merged into the android_kernel_sony_msm8974 repository last week. Thanks to all of you that spend your time supporting the Z3C and other older devices until now.