• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[ROM][Unofficial][10.0][signed][OTA] Lineage OS 17.1 for Xperia Z1 compact

Search This thread
Do you have a TWRP backup from the previous release with root?
Then you have to restore only the boot partition with TWRP (without data and system!).
You have to do this after every ROM update.
If you have success with this method you should make a TWRP backup only from root after every Magisk (release and canaries) update.
I am no specialist for Magisk as I don't use it myself. However, if you have to restore the boot.IMG after each ROM upgrade, you will never get the kernel patches coming with the ROM updates.
Isn't Magisk supposed to put some kind of "survival script" into /system/addon.d to re-patch the boot partition after a ROM update?
 

veloc_h

Senior Member
Oct 10, 2019
60
5
Is it possible to integrate the Edit: the parts of the kernel, which include the Sony cam module from munjeni 14.1 LOS into LOS 17?
 
Last edited:

veloc_h

Senior Member
Oct 10, 2019
60
5
sorry, I should have written: the parts of the kernel, which include the Sony cam module. I would like to have the Sony cam because it would be a pity not tu use the outstanding qualitty of this cam.
 
Last edited:

veloc_h

Senior Member
Oct 10, 2019
60
5
The microg components allow to login to the (fake)-playstore, I can even see my apps, but the store says allways "installed", allthough it isn't. Somehow the status (installed/not installed) is not checked.
I'm using LOS 17 from 2021/01 (fresh install from 2020-02-01
 
The microg components allow to login to the (fake)-playstore, I can even see my apps, but the store says allways "installed", allthough it isn't. Somehow the status (installed/not installed) is not checked.
I'm using LOS 17 from 2021/01 (fresh install from 2020-02-01
Can you provide an example (screenshot)?
 

veloc_h

Senior Member
Oct 10, 2019
60
5
E.g. I had installed google chrome (with another android, using google playstore app), in the section "my apps" on playstore I see the status of chrome as installed, allthough it isn't. Therefore I cannot install chrome. The same with any other apps I had installed and which I want to reinstall.
The microg self-check doesn't show any errors.
 
Last edited:

android666

Senior Member
Jun 19, 2010
53
5
big Thanks for all advices. this is my working solution (i did restart after each step):
1) reboot to recovery
2) TWRP full backup
3) flash Magisk v20.4 & reboot to recovery
4) flash new z1c image & reboot to recovery
5) flash latest magisk (21.x) zip (magisk.me/zip/) & Reboot the system
6) optionaly update magisk to latest version (over magisk gui)
 
Last edited:
sorry, I should have written: the parts of the kernel, which include the Sony cam module. I would like to have the Sony cam because it would be a pity not tu use the outstanding qualitty of this cam.
OK, understood - however, it is not at all that simple!

In general, everybody is free to contribute (e.g. via pull request to our repositories). So if you exactly know the specific commits in munjeni's kernel, please create a pull request against our kernel, after you have successfully tested it on your device.
 
The microg components allow to login to the (fake)-playstore, I can even see my apps, but the store says allways "installed", allthough it isn't. Somehow the status (installed/not installed) is not checked.
I'm using LOS 17 from 2021/01 (fresh install from 2020-02-01
So you use the "microG" build variant, and you start the shipped AuroraStore and use your own Google credentials to access the play store (and not anonymously) and then AuroraStore tells you, that certain apps are installed already, bif they aren't? Or what exactly is your setup?
 

veloc_h

Senior Member
Oct 10, 2019
60
5
it says "installiert" which means installed...
you use the "microG" build variant
-> yes
you start the shipped AuroraStore and use your own Google credentials to access the play store
-> no, but I use my own login
then AuroraStore tells you, that certain apps are installed already, bif they aren't?
-> no, I enter google playstore in the browser search, then I login with my account
Edit: with Aurorastore it works fine, thanks a lot for your hint and sorry about the huzzle.
 
Last edited:
  • Like
Reactions: MSe1969

veloc_h

Senior Member
Oct 10, 2019
60
5
if you exactly know the specific commits in munjeni's kernel, please create a pull request against our kernel, after you have successfully tested it on your device
can't you get in contact with munjeni? I 'm not a programmer at all, but he should know exactly where the commits (edit wikipedia does explain it, but I don't think I 'm able to create a commit ) are and whether or not they might work with LOS 17
 
Last edited:

2faraway2

Senior Member
Apr 24, 2016
194
41
I am no specialist for Magisk as I don't use it myself. However, if you have to restore the boot.IMG after each ROM upgrade, you will never get the kernel patches coming with the ROM updates.
Isn't Magisk supposed to put some kind of "survival script" into /system/addon.d to re-patch the boot partition after a ROM update?

Yes, that's exactly how it works and I can confirm that the magisk survival script does its job very well :)
So there should be no need to restore the boot.img after an ota update while loosing the kernel patches of the new release ..
 
  • Like
Reactions: MSe1969

2faraway2

Senior Member
Apr 24, 2016
194
41
can't you get in contact with munjeni? I 'm not a programmer at all, but he should know exactly where the commits (edit wikipedia does explain it, but I don't think I 'm able to create a commit ) are and whether or not they might work with LOS 17

Come on, that's your demand so it should be your task (not the developpers one) to get in contact with munjeni ... afaik a not let's say that mainstreamed character .. ;-)
 
  • Like
Reactions: 115ek and MSe1969

tramp20

Senior Member
Jan 15, 2012
740
141
Rosenheim
big Thanks for all advices. this is my working solution (i did restart after each step):

I did this over a long time but as this is a lot of work I use now my version (not correct as I read here).

Did you read this
especially the last post?
I cannot try this tip as I have only Windows.
 

veloc_h

Senior Member
Oct 10, 2019
60
5
Come on, that's your demand so it should be your task (not the developpers one) to get in contact with munjeni ...
Ok, I have asked him to get in contact with you, but it might be much more efficient if the developpers would speak to each other (don't know why it should be so difficult for the LOS 17.1 programmers to get in contact with munjeni...).
There is no use if I acted as an interface between the developers, because I don't understand the programming details. I have a rought idea, that there are certain prerequisites for the Munjeni (or Sony) code, which are related to kernel or the Android Version.
 
Last edited:

veloc_h

Senior Member
Oct 10, 2019
60
5
Don''t know whether or not it's up to my gps.conf or any other configuration file on my installation: With 17.1 (latest version) my GPS doesn't get a fix. Tested it with different gps-software (the module of locus pro, GPS Test, ...) . Quite a lot of satellites are seen, but no fix, even after half an hour (at the window, where I got a fix with my Xiaomi Mi5 within 1 oder 2 minutes). These fixes https://review.lineageos.org/c/LineageOS/android_device_samsung_msm8930-common/+/275856 and https://review.lineageos.org/c/LineageOS/android_device_samsung_serrano-common/+/275865 are implemented, aren't they? According to the description the rollover fix is implemented: " fixed with 20200520 build " Or is it lost with a later version?
 
Don''t know whether or not it's up to my gps.conf or any other configuration file on my installation: With 17.1 (latest version) my GPS doesn't get a fix. Tested it with different gps-software (the module of locus pro, GPS Test, ...) . Quite a lot of satellites are seen, but no fix, even after half an hour (at the window, where I got a fix with my Xiaomi Mi5 within 1 oder 2 minutes). These fixes https://review.lineageos.org/c/LineageOS/android_device_samsung_msm8930-common/+/275856 and https://review.lineageos.org/c/LineageOS/android_device_samsung_serrano-common/+/275865 are implemented, aren't they? According to the description the rollover fix is implemented: " fixed with 20200520 build " Or is it lost with a later version?
As you use the microG build, did you configure the coarse location providers in microG settings? This is known to cause issues if not done. Has nothing to do with self test, it appears on the overview page. You can either use the shipped Mozilla location provider and the nominatim for address res. Or you e.g. install Dejavu from F-Droid and freeze the Mozilla provider, if you prefer. But configure and activate the stuff. Then the GPS fix should work normally.
 
  • Like
Reactions: veloc_h

Schuwarth

Member
Nov 4, 2013
38
20
Hi there,

I installed this rom with pico gapps last Christmas, coming from stock rom. The rom is very stable, fast and up-to-date --> nearly perfect!
But the battery cycle time is very poor compared to stock rom. On stock rom I got up to four days with one charge cycle.
Now with this rom it's hard to get two days per battery cycle even without using the phone. Battery consumption is about 2-3 % per hour and it's nearly all mobile network. I use same apps as on stock. I'm wondering because
- I can't see any difference between Edge and LTE (O2 Germany) as I saw on stock
- even with deactivated mobile data battery consumption is about 2-3 % per hour
- only on airplane mode I have "normal" battery drain.

Is this normal for this rom? It looks like a bug in mobile network energy management.

Best regards
Florian
 
  • Like
Reactions: MSe1969

Top Liked Posts

  • 3
    New 18.1 build for microG variant
    Info: A new test build, which in fact is considered "ready to go" for 18.1 (microG variant) has been created:

    We plan to provide the last 17.1 builds in October and then switch to 18.1
  • 7
    New builds with September 2021 ASB patches available

    Hi all,
    new builds are available and are already offered as OTA updates via the updater app.


    A. Standard LineageOS 17.1 build
    • Security String 2021-09-05
    • Kernel: Further sec. patches applied (Divest-OS)

    B. Pre-installed microG build variant with additional security patches
    • Security String 2021-09-05
    • Kernel: Further sec. patches applied (Divest-OS)
    • microG 0.2.22.212658-2

    @115ek - please update OP/Changelog

    Regards, M.
    3
    Thanks for your feedback. I would like to get deeper on this, so I need your support here:
    1. Kernel updates have been provided in 2021 in the builds for: January, February, June, July and September.
      I assume you have looked into the commit history of this ROM's kernel and saw, that the kernel of the May build corresponds in fact to the February kernel, that is why you have tried the January kernel after the May kernel; is that correct?
      In other words, the performance decrease you indicate seems to be caused by the series of commits applied an February 6th.
      Can you confirm this conclusion?
    2. Assuming #1 is correct - these are all network fixes - nothing with sound. But you also mentioned "can't take advantage of the improvements made in the sound", so I am struggling right now to 'map' this to the February 6th commits...
    3. Is there a specific way to easily reproduce this (e.g. using a specific app or by other means)?

    The really significant performance drop from 21.07 everything before is significantly faster.
    I also tested 2020 kernels and 21.01 brought a significant performance improvement.
    Performance drop is detected when there is a significant delay in menu browsing with 'Power save mode' or 'Efficiency' mode (Performance profile)

    I just upgraded to 21.09 and its performance is very good, the system has a small beauty flaw rootbeer - dangerous props red indication.

    Very kind, I ask you not to consume too much power after all the kernel is interchangeable so after all it is possible to decide between better performance or more features. Even this condition is amazing, much better than the factory system ever which I thank you for.
    3
    I just upgraded to 21.09 and its performance is very good, the system has a small beauty flaw rootbeer - dangerous props red indication.
    Thanks for your feedback, glad that the latest kernel update has improved the situation.

    In regards to the "rootbeer" link, there are two feedbacks to be given:
    1. The ro.debuggable and ro.secure properties behave as follows, I have pasted the source code inline comments from the place, wAhere this has the real effect (repository system/core, program adb/daemon/main.cpp):
      Code:
      static bool should_drop_privileges() {
          // The properties that affect `adb root` and `adb unroot` are ro.secure and
          // ro.debuggable. In this context the names don't make the expected behavior
          // particularly obvious.
          //
          // ro.debuggable:
          //   Allowed to become root, but not necessarily the default. Set to 1 on
          //   eng and userdebug builds.
          //
          // ro.secure:
          //   Drop privileges by default. Set to 1 on userdebug and user builds.
      In LineageOS, ro.debuggable and ro.secure are by default set to 1. This principally allows adb root, but by default, usb debugging and especially root debugging are switched off.
      I consider this necessary.

    2. The "Banking app" topic is a philosophical discussion and will never lead to any real overall satisfactory solution:
      On the one-hand side, there seem to be some regulatory circumstances forcing the app manufacturers to check for root. On the other hand, the way, how banking apps deal with the root detection vary significantly. This concerns the root detection methods from very simple ("OK, we have included the minimum requirements, now leave us alone with that ****") until the maximum possible ("If there is a Custom ROM present, the device must have been modified. We don't care any further and stop here"). Further, this concerns the reaction on root detection. I have observed roughly three patterns:
      a. The app refuses to launch at all
      b. The app allows to be used in a read-only mode and simply refuses to issue payments
      c. The app simply issues a warning to be confirmed and continues to work normally
      This also depends on the 2FA mechanism used. Apps relying on an external 2FA (SMS, Chip TAN reader, ...) seem to be more tolerant, whilst apps dealing with the 2FA themselves (like some extra authenticator apps or "all-in-one" solutions, which is in my opinion insecure by design, but that's another topic) seem to be more rigid.
      You can't hide the fact of being a Custom ROM and I would never use a banking app actively for payments on a mobile device (My bank's app behaves like "b." above, which is fine for me, I would never use a banking app on my mobile to actively issue a money transfer!)
    3
    New 18.1 build for microG variant
    Info: A new test build, which in fact is considered "ready to go" for 18.1 (microG variant) has been created:

    We plan to provide the last 17.1 builds in October and then switch to 18.1
    2
    Yes analysis result, I restored (only kernel) versions 21.06, 21.05, 21.01 and 21.01 gives the smoothest performance.
    Thanks for your feedback. I would like to get deeper on this, so I need your support here:
    1. Kernel updates have been provided in 2021 in the builds for: January, February, June, July and September.
      I assume you have looked into the commit history of this ROM's kernel and saw, that the kernel of the May build corresponds in fact to the February kernel, that is why you have tried the January kernel after the May kernel; is that correct?
      In other words, the performance decrease you indicate seems to be caused by the series of commits applied an February 6th.
      Can you confirm this conclusion?
    2. Assuming #1 is correct - these are all network fixes - nothing with sound. But you also mentioned "can't take advantage of the improvements made in the sound", so I am struggling right now to 'map' this to the February 6th commits...
    3. Is there a specific way to easily reproduce this (e.g. using a specific app or by other means)?
  • 19
    This thread aims at providing LineageOS 17.1 builds for the Sony Xperia Z1 compact with current security patches.
    You can consider this thread as a successor of our LineageOS 16.0 thread, where you may also find some useful information.
    This is the joint effort of 115ek and MSe1969 (contributions welcome).

    Code:
    #include <std_disclaimer.h>
    /*
    * Your warranty is now void.
    *
    * We are not responsible for bricked devices, dead SD cards,
    * thermonuclear war or you getting fired because the alarm app failed. Please
    * do some research if you have any concerns about features included in this ROM
    * before flashing it! YOU are choosing to make these modifications, and if
    * you point the finger at us for messing up your device, we will laugh at you. Hard & a lot.
    *
    */

    We offer two build variants:
    A. Standard LineageOS 17.1 build
    This build flavor aims at providing LineageOS 17.1 "as is" with most recent security patches.
    If you want to install Google Apps (GApps) you have to use this build variant.
    GApps are optional, of course. The smaller the GApps package, the better (pico). If you want "Okay google" support you need at least nano.
    Just check the package comparison to see what fits your needs.

    B. Pre-installed microG build variant with additional security patches
    For the security/privacy focused (more details about below feature list, see here)
    • Pre-installed microG and F-Droid same as the LineageOS for microG project
    • Pre-installed AuroraStore
    • eSpeak TTS engine (FOSS TTS solution)
    • Bromite as default browser
    • Additional security hardening features listed below
    • Cloudflare as default fallback DNS (instead of Google)
    • Privacy-preferred default settings
    • Optional blocking of Facebook- and Google-Tracking (Settings - Network & Internet)
    • Optional disable captive portal detection or choose from various providers (default is GrapheneOS and not Google; Settings - Network & Internet)
    • Increased max. password length of 64
    • No submission of IMSI/phone number to Google/Sony when GPS is in use
    • Default hosts file with many blocked ad/tracking sites
    • Privacy-enhanced Bromite SystemWebView
    • Extra control of sensor access for additionally installed user apps (Special access under app permissions)
    • Firewall (control internet access per app - under Trust)
    • Constified JNI method tables


    Status
    List template by AdrianDC
    Code:
    - Partitions (Data, Cache) : Ext4 and F2FS supported
    - Bluetooth : Ok
    - WiFi : Ok
    - WiFi Hotspot : Ok
    - RIL - Phone - Data : Ok
    - GPS : Ok
    - Camera : Ok
    - Camcorder : Ok
    - Lights : Ok
    - MicroSD : Ok
    - Accelerometer : Ok
    - Compass : Ok
    - Gyroscope : Ok
    - Touchscreen : Ok
    - FM Radio : Ok (mono)
    - ANT+ : Ok
    - Vibrator : Ok
    - Microphone : Ok
    - Audio & music : Ok
    - Bluetooth audio : Ok
    - MHL: broken
    - NFC : Ok
    - Kernel : Ok
    - Graphics : Ok
    - 3D Rendering : Ok
    - Clock : Ok
    - Offline Charging : Ok
    - USB : Ok
    - USB OTG : Ok
    - Encryption : Ok
    - SEPolicies : enforcing
    Limitations
    Following limitations are known:
    • NFC-HCE does not work (needed for example for google pay)
    • FM does not work in stereo mode (mono works fine, though)
    • MHL does not work
    • 5 GHz hotspot does not work (2.4 GHz hotspot works fine) (5 GHz option disabled with 2020-03-11 build as it isn't even available on stock)
    • GPS gets wrong time due to GPS week rollover since 3rd November 2019 (of importance when you record GPS tracks for example). fixed with 20200520 build
    • Using GApps AND encrypting the device may result in bootloops. More infos here.
    • Standard Trebuchet Launcher shows small artifacts in the fonts of app names in some situations.
    Download
    FAQ
    What recovery system to use?
    Please use this TWRP if you want to use OTA updates and/or encryption.

    What about root access?
    Root isn't included per default (except root over adb, but it's off by default).
    If you want to gain root access to your apps use magisk (everything > 20.4 is broken):
    ANT+ isn't working?
    You need the 2 apps:
    afterwards setting proper permissions is essential!
    1. Go to Apps & Notifications -> See All Apps
    2. Select 'ANT Radio Service'
    3. Select Permissions
    4. Select Additional permissions
    5. Slide switch to allow using of ANT hardware
    This refers to those instructions which worked for me :)
    I've got problems AND have magisk/exposed installed
    We won't support anything related to magisk/exposed/other heavily system modifying things.
    If you're encountering problems please make sure you're using a clean installation (at most gapps) to verify/reproduce the issue.

    Bugreports
    You'll find information about logging here.
    Please also note how you got the error or how it can be reproduced.
    Sources
    Credits
    • SpiritCroc: big thanks to him for maintaining the device trees and a lot of very useful hints
    • NeoArian: also big thanks to him ;)
    • rcstar6696
    • SuperLamic
    • drakonizer
    • AdrianDC
    • munjeni: thanks for tips and tricks
    • nailyk: thanks for tips and tricks
    • All the other contributors on sony msm8974 platform
    • LineageOS team

    Installation instructions


    XDA:DevDB Information
    Lineage OS 17.1 for Xperia Z1 compact - amami, ROM for the Sony Xperia Z1 Compact

    Contributors

    115ek, MSe1969, SpiritCroc, NeoArian, drakonizer, rcstar6696, SuperLamic, AdrianDC, nailyk, LineageOS team
    Source Code: https://github.com/lin17-microg/local_manifests

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

    Version Information
    Status:
    Stable
    Stable Release Date: 2020-12-29

    Created 2019-11-22
    Last Updated 2021-09-12
    9
    New builds with July 2021 ASB patches available

    Hi all,
    new builds are available and already offered as OTA updates via the updater app.


    A. Standard LineageOS 17.1 build
    • Security String 2021-07-05
    • System Webview updated to 91.0.4472.101
    • Kernel: Many sec. patches applied (taken from Divest-OS, thanks to @SkewedZeppelin)

    B. Pre-installed microG build variant with additional security patches
    • Security String 2021-07-05
    • Bromite System Webview and Browser updated to 91.0.4472.146
    • Kernel: Many sec. patches applied (taken from Divest-OS, thanks to @SkewedZeppelin)
    • microG 0.2.21.212158-2
    • AuroraStore 4.0.7

    @115ek - please update OP/Changelog

    Regards, M.
    8
    New builds with May 2021 ASB patches available

    Hi all,
    new builds are available and offered as OTA updates via the updater app.

    A. Standard LineageOS 17.1 build
    • Security String 2021-05-05
    • System Webview on 90.0.4430.82

    B. Pre-installed microG build variant with additional security patches
    • Security String 2021-05-05
    • Bromite System webview updated to 90.0.4430.204
    • Bromite Browser updated to 90.0.4430.204
    • microG upstreamed (but no new version)
    • Update: AuroraServices 1.1.1

    @115ek - please update OP/Changelog

    Regards, M.
    7
    New builds with September 2021 ASB patches available

    Hi all,
    new builds are available and are already offered as OTA updates via the updater app.


    A. Standard LineageOS 17.1 build
    • Security String 2021-09-05
    • Kernel: Further sec. patches applied (Divest-OS)

    B. Pre-installed microG build variant with additional security patches
    • Security String 2021-09-05
    • Kernel: Further sec. patches applied (Divest-OS)
    • microG 0.2.22.212658-2

    @115ek - please update OP/Changelog

    Regards, M.
    7
    New builds with March 2021 ASB patches available

    Hi all, new builds are available and offered as OTA updates via the updater app.

    A. Standard LineageOS 17.1 build
    • Security String 2021-03-05
    • System Webview on 88.0.4324.152

    B. Pre-installed microG build variant with additional security patches
    • Security String 2021-03-05
    • Bromite System webview updated to 88.0.4324.207
    • Bromite Browser updated to 88.0.4324.207
    • F-Droid 1.11
    • microG 0.2.18.204714

    @115ek - please update OP/Changelog

    Regards, M.