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

[ROM][Unofficial][11.0][signed][OTA] Lineage OS 18.1 for Xperia Z1 compact

Search This thread

115ek

Senior Member
Jan 30, 2017
582
657
This thread aims at providing LineageOS 18.1 builds for the Sony Xperia Z1 compact with current security patches.
You can consider this thread as a successor of our LineageOS 17.1 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 18.1 build
This build flavor aims at providing LineageOS 18.1 "as is" with most recent security patches.
If you want to install Google Apps (GApps) you have to use this build variant.
You could install additional Google Apps if you want to. This has to be done directly after the lineage installation BEFORE the first boot.
The smaller the package, the better in terms of performance. (None is of course the most performant). If you want "Okay google" support you need at least nano. Else I'd recommend pico.

Downloads:
OpenGapps
BitGapps
MindTheGapps (mirror)

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:
- Boot : Ok
- Partitions (Data, Cache) : Ext4 and F2FS supported
- Bluetooth : Ok but MAC address is not correctly set (random address)
- 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
- ANT+ : broken
- 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 : ?
- SEPolicies : enforcing
- DRM: Ok, Widevine L3
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
  • ANT+ does not work
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 18.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/lin18-microg/local_manifests

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

Version Information
Status:
Stable
Stable Release Date: 2021-10-14

Created 2020-12-06
Last Updated 2021-10-14
 

Attachments

  • Screenshot_20210514-014606_Trebuchet.png
    Screenshot_20210514-014606_Trebuchet.png
    76.5 KB · Views: 275
  • Screenshot_20210514-014901_Trebuchet.png
    Screenshot_20210514-014901_Trebuchet.png
    68.5 KB · Views: 267
  • Screenshot_20210514-014401_Trebuchet.png
    Screenshot_20210514-014401_Trebuchet.png
    119.5 KB · Views: 271
  • Screenshot_20210514-014428_Settings.png
    Screenshot_20210514-014428_Settings.png
    74.5 KB · Views: 276
  • Screenshot_20210514-014523_Trebuchet.png
    Screenshot_20210514-014523_Trebuchet.png
    215.9 KB · Views: 254
  • Screenshot_20210514-014811_Trebuchet.png
    Screenshot_20210514-014811_Trebuchet.png
    103.5 KB · Views: 220
  • Screenshot_20210514-014821_Trebuchet.png
    Screenshot_20210514-014821_Trebuchet.png
    44 KB · Views: 208
  • Screenshot_20210514-015037_Settings.png
    Screenshot_20210514-015037_Settings.png
    99 KB · Views: 272
Last edited:

115ek

Senior Member
Jan 30, 2017
582
657
Changelog

14.10.2021

  • introduce microG build variant (see this post or the OP for more information)
  • ASB Security string 2021-10-01
  • standard build only:
    • System Webview on 94.0.4606.71
  • microG build only:
    • Bromite System Webview and Browser updated to 93.0.4577.83
20.09.2021
18.09.2021
  • fixed FM radio (ref, ref)
  • synced LineageOS sources (security patch level September 05, 2021)
    • Wifi display is back (ref)
    • Setup wizard redesigned (ref)
16.08.2021
  • synced LineageOS sources (security patch level August 05, 2021)
  • switched to 3.4 kernel with backports
19.07.2021
  • synced LineageOS sources (security patch level July 05, 2021)
20.06.2021
  • added livedisplay
  • synced LineageOS sources (security patch level June 05, 2021)
11.06.2021
  • fixed fm SE linux denial
26.05.2021
  • fixed netmgrd SE linux denials (ref)
22.05.2021
  • fixed NFC settings not shown (ref)
  • fixed offline charging
15.05.2021
  • fixed wifi problems when WPA3 is used (ref)
13.05.2021
  • fixed wifi MAC address readout
  • synced LineageOS sources (security patch level May 05, 2021)
24.04.2021
  • enable OTA updates
  • switch to enforcing SE linux
  • start signing builds
23.04.2021
  • synced latest lineage sources
01.01.2021
  • using snap camera now (instead of camera2)
  • fixed NFC (thanks @AdrianDC)
19.12.2020
  • Lineage 18.0 -> Lineage 18.1 (android-11.0.0_r17 -> android-11.0.0_r19)
08.12.2020
  • fixed screenlock
06.12.2020
  • initial release
 
Last edited:
  • Like
Reactions: infoflo and tramp20

115ek

Senior Member
Jan 30, 2017
582
657
New build is up.
08.12.2020
  • fixed screenlock

Furthermore I updated the manifest and build instructions - just in case someone wants to build from source.
It would be nice if you can share your experiences, so that we can complete the status list.
 
  • Like
Reactions: lm089 and tramp20

jho55

Senior Member
Sep 8, 2015
238
60
Munich
I have already mentioned it in the 17.1 thread but I think it is also good to post it here:

The bad font rendering from 17.1 is gone in this build.
 
  • Like
Reactions: 115ek

koron393

Senior Member
Jan 25, 2014
226
641
Saitama
d.hatena.ne.jp
  • Like
Reactions: 115ek

tramp20

Senior Member
Jan 15, 2012
748
142
Rosenheim
BiTGApps

I tried already this link but they have server problems since 9 days :-(
MOD EDIT: Link Removed
Perhaps someone can upload these GAPPS to Onedrive, DropBox or GoogleDrive.
 
Last edited by a moderator:

-FancyUsername-

New member
Jun 12, 2019
4
3
I will share a few first experiences with the build of 19.12.20:
- GPS and compass seem to work (Google Maps constantly crashes, Waze does show the right location and the compass moves when I move the phone. But I can't say for sure if it's maybe just using other sensors and Wifi for that)
- FM Radio : yes (can't judge the quality)
- Microphone : yes
- bluetooth audio : yes
- NFC : greyed out in the control center

Other:
- runs pretty fast for such an early version actually that was a lie, because it runs pretty fast for any version
- once got stuck on the Sony logo, which was fixed by holding power + volume up
- when I used the restart option from the power off menu, when it turned back on it was really slow and the screen flickered slightly. that happened just once though, so probably nothing to worry about
 
Last edited:
  • Like
Reactions: lm089 and tramp20

tramp20

Senior Member
Jan 15, 2012
748
142
Rosenheim
@115ek
thank you for this new ROM.

1. I have only installed BitGAPPS, but in the settings of Play Store I see "device is not certified".
Of course I deleted memory and cache of Play Store (was updated already) and Play Services.

2. Long pressing the power button does not show sreenshot, only power off and restart.

3. Restart to Recovery goes to Lineage Recovery and not to TWRP. How to change this?
I had already flashed TWRP again in fastboot mode.

It seems that TWRP has gone :-(
 

tramp20

Senior Member
Jan 15, 2012
748
142
Rosenheim
Has someone successfully installed/flashed Magisk 21.1 and when yes how?
I can flash it without errors but nothing is really installed, no Magisk framework and no Manager :-(
 

115ek

Senior Member
Jan 30, 2017
582
657
1. I have only installed BitGAPPS, but in the settings of Play Store I see "device is not certified".
Of course I deleted memory and cache of Play Store (was updated already) and Play Services.
The google certification algorithm changes from time to time and your phone can be classified as "not certified" at any point of time. I'm no gapps user, so unfortunately I can't give any tips here nor know what consequences this certification state really has.

2. Long pressing the power button does not show sreenshot, only power off and restart.
That's a lineage framework thing and most likely will change in the future.

3. Restart to Recovery goes to Lineage Recovery and not to TWRP. How to change this?
I had already flashed TWRP again in fastboot mode.
It seems that TWRP has gone :-(
That's also a thing forced by lineage. During the setup wizard you'll now be asked if you want to update the recovery. Don't check this box if you want to keep TWRP. Else you'll end up with lineage recovery.

Has someone successfully installed/flashed Magisk 21.1 and when yes how?
I can flash it without errors but nothing is really installed, no Magisk framework and no Manager :-(
I hadn't had a look into magisk yet. I'm just using root over adb for development purposes. Going to check that if I find some time.
 

tramp20

Senior Member
Jan 15, 2012
748
142
Rosenheim
@115ek,
thank you for all answers.

To lineage recovery : I found this already after some tries, this check box should not be pre-activated.

I saved the TWRP recovery.log after installing the latest Magisk-v21.2.zip.
But nothing is really installed, no Magisk framework and no Magisk Manager :-(

Perhaps you see something in this logfile.
 

Attachments

  • recovery_install_212.zip
    6.5 KB · Views: 27
Last edited:

tramp20

Senior Member
Jan 15, 2012
748
142
Rosenheim
@115ek,
I need a stock boot.img of the Z1c to patch it with the Magisk Manager.
All my tries failed: the ROM is always booting fine but neither Magisk nor Magisk Manager are installed.
This is happening with all Magisk >v20.4.

Every boot.img in the Lineage and AICP ROMs are different. Which one can I use?
I have TWRP backups from Android 5.1.1 but I don't know how to extract the boot.img.

Edit:
In the meantime I could extract the kernel.elf from the original firmware tft and convert this file with Android Image Kitchen to a boot.img. But this is ~ 2 MB bigger than yours in your ROM.
 
Last edited:

115ek

Senior Member
Jan 30, 2017
582
657
New Build is up:
  • using snap camera now (instead of camera2)
  • fixed NFC (thanks @AdrianDC)
Perhaps you see something in this logfile.
Not a the first sight, unfortunately.

This is happening with all Magisk >v20.4.
Earlier versions work fine?

Which one can I use?
None. The kernel needs one specific commit, pre-11 kernels don't have. Else it won't boot.
Besides that, you'd have to add a androidboot.selinux=permissive to the kernel command-line as this 11 build is still permissive.
 
  • Like
Reactions: tramp20

Top Liked Posts

  • 1
    It's weird, but I don't see a TWRP version in that menu, only the Lineage version...
    No, that's not weird. Your picture explains it all.
    I have attached a picture.
    This is the lineage recovery, not the TWRP. It might work, but I never tested it. So I guess now you tested it ;)
    Please flash the TWRP.
    But the update still doesn't work and I don't see a TWRP version in the recovery menu.
    If you don't see something like that:
    Screenshot_2021-10-17-02-22-26.png

    the lineage recovery is installed. The image above shows how TWRP looks like.

    The reason for that is (most likely) that you enabled an option that updates/installs the lineage recovery (effectively replacing the TWRP) with every OTA update. This is (in our case) unwanted behaviour.
    So the way to go now would be:
    1. Disable this option (somewhere under developer options I think. Maybe @MSe1969 could jump in here. Else I'll have another look in the evening.)
    2. Flash the TWRP
    3. Verify it is the TWRP
    4. Check updating again
    1
    Disable this option (somewhere under developer options I think. Maybe @MSe1969 could jump in here. Else I'll have another look in the evening.
    This setting used to be in the Dev. Options, but it has moved into the Updater app's settings in 18.1.
  • 4
    New build:
    18.09.2021
    • fixed FM radio (ref, ref)
    • synced LineageOS sources (security patch level September 05, 2021)
      • Wifi display is back (ref)
      • Setup wizard redesigned (ref)
    4
    One more update:
    20.09.2021
    • fixed DRM (widevine level 3: netflix works)
    This may require a clean installation to work correctly.
    2
    LineageOS 18.1 test build for 2nd build variant - feedback?
    However - so far, we did not get feedback. Does that mean "all is fine" and we're ready to go?
    Hi,
    I don't use this variant, but I had some bugs (already very old, they were passed on the next LOS):

    1. NFC-HCE is missing (stock ROM had this feature). I already read that the stack is not available to you.

    2. The icons in the status line are all black/white. If I touch this line they all become colored during touching.

    3. A-GPS is missing too. After a reboot/shut down the time to get a fix is ~15 min. This is the regular time to download all GPS satellite data from the the satellite direct.
    With A-GPS (from internet) the fix is valid after seconds.

    4. Missing permission for ANT+, see posting #78 and #79.

    Nevertheless many thanks to you all for your hard work for our Z1c.
    2
    New "LineageOS 18.1 microG variant"
    Hi all, I have created a new "microG" variant, which can be dirty-flashed on the previous test build:

    It contains the changes announced by @115ek and also the kernel patches applied to the 17.1 September build, for which the feedback was given in the 17.1 thread, that the performance was improved (after recent decrease).

    If you want to update from the 17.1 microG variant, please follow these instructions.

    In general, we plan to provide the last 17.1 builds in October.
    2
    Awesome ROM, Smooth and fast. Thanks for your hard work.
  • 10
    This thread aims at providing LineageOS 18.1 builds for the Sony Xperia Z1 compact with current security patches.
    You can consider this thread as a successor of our LineageOS 17.1 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 18.1 build
    This build flavor aims at providing LineageOS 18.1 "as is" with most recent security patches.
    If you want to install Google Apps (GApps) you have to use this build variant.
    You could install additional Google Apps if you want to. This has to be done directly after the lineage installation BEFORE the first boot.
    The smaller the package, the better in terms of performance. (None is of course the most performant). If you want "Okay google" support you need at least nano. Else I'd recommend pico.

    Downloads:
    OpenGapps
    BitGapps
    MindTheGapps (mirror)

    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:
    - Boot : Ok
    - Partitions (Data, Cache) : Ext4 and F2FS supported
    - Bluetooth : Ok but MAC address is not correctly set (random address)
    - 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
    - ANT+ : broken
    - 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 : ?
    - SEPolicies : enforcing
    - DRM: Ok, Widevine L3
    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
    • ANT+ does not work
    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 18.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/lin18-microg/local_manifests

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

    Version Information
    Status:
    Stable
    Stable Release Date: 2021-10-14

    Created 2020-12-06
    Last Updated 2021-10-14
    6
    you are a rude person, be a little kind.
    This is completely ridiculous. OP is sacrificing his free time to the community not only by maintaining the ROMs, but also answering SERIOUS questions as accurately as it's possible, yet you're calling him rude even though the 1st post contains the answer for your question, as he said.
    5
    New build
    20.06.2021
    • added livedisplay
    • synced LineageOS sources (security patch level June 05, 2021)
    5
    New build
    16.08.2021
    • switched to 3.4 kernel with security backports (thanks @MSe1969 and @SkewedZeppelin )
    • synced LineageOS sources (security patch level August 05, 2021)
    5
    I found some time again.
    Please report if the OTA update is working properly.

    13.05.2021
    • fixed wifi MAC address readout
    • synced LineageOS sources (security patch level May 05, 2021)