[OFFICIAL] LineageOS 17.1 for z3c

Search This thread

tomKater

Member
Jul 29, 2014
32
6
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
    204
    52
    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
    32
    6
    Huawei MediaPad M5 Lite
    When I still used the Z3C I had the same wakelock, back on LOS 16. Another user told me this:


    Thank you for this information. I'm a little suprised by the answer, since this wakelock has the consequence of keeping the phone in "awake" status, but I will pay attention to the possible battery drain or not.
     

    NeoArian

    Recognized Developer
    Nov 25, 2017
    1,234
    2,782
    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,234
    2,782
    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
     

    NeoArian

    Recognized Developer
    Nov 25, 2017
    1,234
    2,782
    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
    287
    42
    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,234
    2,782
    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?
     

    J_C_D

    Member
    Jan 30, 2012
    18
    12
    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

    Member
    Nov 23, 2008
    42
    7
    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!
     

    Top Liked Posts

    • There are no posts matching your filters.
    • 10
      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!
      4
      Thanks to everyone for the really detailed testing :) I really appreciate it.
      Since yesterday (still on 18.1), I have two kernel wakelocks preventing deep sleep:
      - msm_serial_hs_dma
      - BTLowPower

      I used BBS with the adb shell settings put global hidden_api_policy 1 fix to check the wakelocks.
      Regarding the BTLowPower wakelock, @J_C_D has fixed that on lineage-17.1 recently and at this time the lineage-18.1 branch was already forked. I will make sure to include the fix for lineage-18.1 with the next update.
      3
      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!

      It's been a while since last time I did test a new Android version on this smartphone.
      First of all, I'd like to thank you all maintainers for your effort and to congratulate for the great work done with this first build of lineage 18.1.
      I did some basic testing (don't expect anything too accurate, since this is not my main device for a while) which I'll resume below:
      • Booting was fine and time is quite comparable with previous lineage versions
      • I succesfully installed a test build of OpenGapps (micro configuration of 20210130), which seems to work pretty well
      • account setup and sync works
      • WiFi working at both 2.4/5 GHz
      • Bluetooth working fine, I had no problems connecting to my bluetooth earbuds and listen to some music
      • NearbySharing is working like a charm and quite fast too
      • online charging is working at full speed (about 1800 mA with a quickcharge 3.0 wall charger)
      • MTP working
      • OTG works for both input devices (mouse, keyboard, etc..) or mass storage
      • camera is fully working (taking pictures with both front/rear cameras, taking videos, flash)
      • phone calls are working, but I believe that microphones are swapped, using the upper one as main, resulting in a low volume during calls
      • mobile data is stuck at EDGE for me, I couldn't get it to use LTE instead
      • audio is fine
      • video playback also seems to be fine (tested on youtube at 1080p)
      • chromecast works, in fact I did cast screen and youtube to a Google Nest Hub without any problem
      • the OS is overall responsive and snappy, even with gapps installed
      • screen rotation, accelerometer, gyroscope, proximity sensor, etc.. all fine
      • double tap to wake and other classic gestures are fine
      • I couldn't test hotspot since, as I said, I was stuck at 2G connection which was quite unresponsive
      • unfortunately I cannot test GPS or NFC neither
      I hope I did not forget something important.
      I'm going to keep this installed since it's really stable, so feel free to ask me for some other testing and I'll for sure try to do that as soon as I have some spare time :)
      3
      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!

      Thank you NeoArian and all other developers!
      Your LineageOS 17.1 build really revived this small phone!
      My previous experiences with installing unofficial builds were not as great as this one.
      The only things I miss compared to stock Android 6 are the camera button full press to open the camera app (which by the way starts slower than on stock Android 6), the secondary mic noise suppression (which wasn't working anymore on mine anyway) and the service tests opened with the *#*#SERVICE#*#* code.

      About this new LineageOS 18.1 (I used MindTheGapps-11.0.0-arm-20210412_124103), I didn't notice any problem compared to 17.1.
      In fact, using Migrate to restore all apps and settings, I almost thought the update didn't work since it booted like usual.

      For the other users, in addition to Migrate, I of course reinstalled Magisk, which doesn't work natively (even with the workaround of installing 20.4 first) on this new 18.1 build. The boot_patch.sh file has to be modified, I've attached a version of Magisk 22.1 with that file already modified (works at least on Z3C). NeoArian: is there any way to modify the builds so that they use init instead of init.real?

      I did some basic testing
      Pretty extensive "basic testing"!

      • phone calls are working, but I believe that microphones are swapped, using the upper one as main, resulting in a low volume during calls
      • mobile data is stuck at EDGE for me, I couldn't get it to use LTE instead
      • double tap to wake and other classic gestures are fine
      • unfortunately I cannot test GPS or NFC neither
      - Phone calls were fine on 17.1, haven't checked yet on 18.1. UPDATE: still fine on 18.1
      - LTE works here (at least band 1). I'll see if I can connect to different bands.
      I don't know if it helps, but here's what modemcaps says:
      ========================================
      Sony Xperia Z3 Compact
      Model ID : z3c
      SoC : SDM800
      Modem HW : MTP (msm)
      Modem FW : 8974-AAAAANAZQ-00112-61
      Modem Link : Generation 2 (Channel 0)
      Kernel Base : Linux 3.4.113
      Kernel Fork : gb76b4a9ae603
      Sys Version : Android 11 (armeabi-v7a)
      App Version : 2019-12-27-10 (armeabi-v7a)
      https://t.me/ru_fieldtest_modemcaps
      ========================================
      SIM Card : Single SIM
      LTE CA : Is not supported
      LTE Voice : GSM/UMTS CS Fallback
      CDMA2000 1X CS Fallback
      VoLTE
      Radios : 2G GSM
      3G UMTS
      4G LTE
      GSM Bands : B3 (1800 FDD)
      B8 (900/E FDD)
      B- (900/P FDD)
      B5 (850 FDD)
      B2 (1900 FDD)
      UMTS Bands : B1 (2100 FDD)
      B2 (1900 FDD)
      B4 (1700 FDD)
      B5 (850 FDD)
      B8 (900 FDD)
      LTE Bands : B1 (2100 FDD)
      B2 (1900 FDD)
      B3 (1800 FDD)
      B4 (2100 FDD)
      B5 (850 FDD)
      B7 (2600 FDD)
      B8 (900 FDD)
      B13 (700 FDD)
      B17 (700 FDD)
      B20 (800 FDD)

      - Double tap to wake didn't work for me on stock Android 6 (at least when on deep sleep). It seems to work now which is an improvement.
      - GPS works fine.

      I'm using it from now on, so I'll report any problem.
      3
      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!
      First thank you NeoArian and all other developers involved for your great work! I also did some short tests and found nothing which was not working. I worked with OpenGapps test build of 20210130. I tested:

      - WLAN
      - Bluethooth
      - Mobil date
      - phone call
      - Camera/Video/flash light
      - Audio and video playback
      - normal usage like my los 17.1 daily driver

      I used some configuration like i did on my los 17.1 daily driver and it looks really good! Unfortunately I cannot test GPS as my test device had an hardware problem here.

      So really fine from my side here, only the test with Magisk to root the device didn't work. But this shouldn't be related to los 18.1. Hopefully Magisk will be functional sometimes later.

      Thanks again!
    • 10
      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!
      8
      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
      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.
      5
      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.
      4
      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?
    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