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

Search This thread

Jack Phoenix

Member
May 24, 2014
42
9
Sony Xperia Z1 Compact
Nokia X
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).

Just wanted to share my success story and thank all the developers for their awesome work on this ROM! :love:

Some quick background info: my device is several years old and it was sold to me as "not working", "for parts only". After buying it, I once managed to boot it enough to see that it was running a version of CyanogenMod but that was it. For several years it's been a surprisingly expensive paperweight and nothing else. Just for the sake of it, I decided pulling it out yesterday and seeing what, if anything, happens if I press down the hard reset button located next to the SIM card slot. Lo and behold, the phone vibrated!

After a crash course in adb and its several quirks and other related, relevant things, I thought I knew what to do and how to proceed. Luckily for me, the phone had a TWRP version installed so I didn't need to figure that out. Phew!

...so imagine my shock and horror when the OS (the old CyanogenMod one, that is) had been wiped out and the Lineage OS ROM, despite really being the correct one, refused to flash! I'm not sure what was going on there, was it a TWRP bug or something, but despite my device being an amami, it was reporting itself (in TWRP at least?) as "" (i.e. empty string), and thus the
Code:
assert()
call in
Code:
updater-script
was failing. Darn!

After searching a bit I ended up in an XDA thread for a different device&ROM with the same issue and I went with the solution suggested there: just removing the assert() call, because I knew that the target device was correct.

That worked and I was able to flash the ROM successfully! (y) Not my first rodeo with adb and the like, but the first time I flashed a ROM. Admittedly it was a somewhat stressing procedure, and my stress was only alleviated by the knowledge that this is my paperweight, and not someone else's daily driver.

How are the telephony features on amami/honami on Lineage OS 18.1? I'm thinking of gifting a honami as a Christmas present to someone who is not that tech-savvy and uses the phone still for calls as well as for browsing the Internet, so having reliably working telephony features is a must. (Whereas for me, I'm just planning on using my amami as a testbed for mobile development related things so I'm not too concerned about telephony.)

Relatedly, some newbie questions that might be answered elsewhere but I was unable to locate the answers, so apologies in advance...
1. Where do the Bromite UI strings come from? A few (e.g. "Bookmark all tabs", "View source" and "Exit" in the main "three dots" menu) are untranslated into my language and I'd like to help out with the translation effort where possible.
2. Related to #1, the "Contacts" app name is correctly translated (as "Yhteystiedot") but in the app drawer view it shows up as "Yhteystie..." - is there a way to force the UI to render the whole word instead of three dots if and when the "truncated" word with three dots is equally long as the "full" word? (Yes, this is a super minor nitpick, I know!)
3. My device has a battery/charging-related problem that I assume is specific to my faulty device rather than the ROM, but I'll ask anyway...so, when charging, the screen turns on and if I manually turn it off, it'll just turn on again in a few seconds and it didn't charge past 33-34% in my testing yesterday. adb logcat output, which I dumped into a file, has some suspicious lines about a Daydream issue in the com.android.deskclock.Screensaver package. Some quick searching suggests that it's a known issue that oughta be very easy to fix. Can someone confirm/deny the existence of this Daydream-related issue? And does it impact charging and/or the battery in any way?
4. Potentially related to #3 and why the screen won't turn off on my device, but the adb logcat output has some suspicious lines related to "Telecom" and Bluetooth features etc. Are these messages just log noise or potentially indicative of some sort of a problem? I'd be more than happy to post snippets here or on a pastebin etc. for a developer to take a look at if this is something worth investigating.

Again, my thanks to all the awesome people working on keeping amami alive - hard to believe that little device is turning 8 years old next January! It's quite a lifespan for a mobile phone these days, and it would not have been possible without all of you! :D
 

115ek

Senior Member
Jan 30, 2017
611
695
How are the telephony features on amami/honami on Lineage OS 18.1?
Telephony works. Hands-free mode is not that good I think. But only the other caller will suffer. But to be honest I haven't used hands-free mode for a long time.
When it comes to honami: I think there are some guys around building images. Actually this isn't hard at all as honami and amami are quite similar. However, the honami support is not that - let's say - continuous, compared to amami.
Also: some things I've seen in the honami threads are not very professional. At least in my opinion.
Where do the Bromite UI strings come from?
Bromite is basically a patched Chromium. So I'd check out https://www.chromium.org/developers/design-documents/ui-localization
It would be best to improve the localization there.
However, you could also contribute to Bromite directly.
Example for changing UI strings:
is there a way to force the UI to render the whole word instead of three dots if and when the "truncated" word with three dots is equally long as the "full" word?
I'd try reducing the font size: Settings/Display/Font Size or display size Settings/Display/Display Size.
Can someone confirm/deny the existence of this Daydream-related issue? And does it impact charging and/or the battery in any way?
Sounds more like a hw-related issue, when your battery can't be charged above 33%. I rarely face an issue where the ambient display does not turn off at all after being activated. But you can also disable the ambient display.
Or are you talking about offline charging - so without android being booted?
Are these messages just log noise or potentially indicative of some sort of a problem?
Hard to say. But often they can be ignored. When something does not work as intended it makes sense to have a deeper look.



Btw: You should install the latest TWRP to be able to use the OTA update functionality. https://forum.xda-developers.com/t/recovery-unofficial-amami-twrp-3-4-0.3960699/
 
New builds with November 2021 ASB patches

Hi all,
new builds with the Octrober '21 ASB patches are available and should be offered already as OTA update through the Updater app:

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

B. Pre-installed microG build variant with additional security patches
  • Security String 2021-11-05
  • Bromite System Webview and Browser updated to 94.0.4606.109

@115ek - please update OP/Changelog

Happy flashing, regards, M.
 

Beni777

Member
Sep 27, 2021
24
5
New builds with November 2021 ASB patches

Hi all,
new builds with the Octrober '21 ASB patches are available and should be offered already as OTA update through the Updater app:

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

B. Pre-installed microG build variant with additional security patches
  • Security String 2021-11-05
  • Bromite System Webview and Browser updated to 94.0.4606.109

@115ek - please update OP/Changelog

Happy flashing, regards, M.
Thanks for the update, I updated via mobile update app and works perfectly... I waiting for android 12 very much because lot of samsung phone have android 12 (lineage os 19) now and very COOL

Lot of new functions like one handed mode, new style ... etc
 
Last edited:

o-l-a-v

Senior Member
Jan 6, 2012
681
537
Oslo
Thanks for the update, I updated via mobile update app and works perfectly... I waiting for android 12 very much because lot of samsung phone have android 12 (lineage os 19) now and very COOL

Lot of new functions like one handed mode, new style ... etc
Z1c is one hand mode by design. :)

Be happy a phone from january 2014 that came with Android 4.3 is even supported with security updates by anyone.
 
You can dropp apps on android 12 with one finger this very good feature missing from android 11
I have already explained in detail our approach in regards to coming (or not) to the next major Android release. This approach is for sure not influenced or accelerated by comments, strong desires or feature advertising in regards to the next Android version.
This is my last comment on that topic, we will from now on ignore any further comments or statements pointing to the next Android release!
 

lm089

Senior Member
Jun 26, 2011
612
196
Munich
You should read my posting in Github:
User bleckdeth has made a simple patch at 16.03.2021.

It works perfect but you have to make it after every LOS Update because LOS overwrites the boot image :-(
Sorry for bringing up that old topic once again: this afternnon I wiped my device that flashed latest LOS V18.1. As I used to do while still running V17.1 I tried to flash an old Magisk V20.3 from TWRP but that failed showing "Error 1". Same with all other Magisk zips older and newer that 20.3. Then I remembered you had posted something in regards to patching something somewhere, and here I am at your post.
I thoroughly read through the github discussion, finally found the link to blackdeth's patched boot_patch.sh (Mar 16, as you wrote).
Just to be sure that I'm getting this right:
  1. open/unpack the Magisk-v23.0.apk
  2. goto /assets/, replace the existing boot_patch.sh with the modified one
  3. push the modifed Magisk installer to the device and go ahead installing the apk
  4. finally let Magisk patch the ROM's boot.img
Is that it?

UPDATE:
no doesn't work that way, of course: trying to run the apk installer I receive an error telling me the apk couldn't be parsed.
So how else do I get the modified boot_patch.sh to work?
 
Last edited:

tramp20

Senior Member
Jan 15, 2012
775
163
Rosenheim
Apps & Games
open/unpack the Magisk-v23.0.apk
Please use the latest Magisk canary 23015 from
Canary . topjohnwu/magisk-files/tree/canary
osm0sis has made a universal patch (based on bleckdeth) and included it in the canaries since 23013 (and I have tested all this until all bugs were solved).

Now Magisk installation works as easy as with 20.4.

I am sure you know how to proceed this first time:
1. Restore magisk app (manager) to the original name.
2. Uninstall Magisk complete.
3. Flash the boot.img from your LOS 18.1 with fastboot.
4. Install in TWRP the canary app-debug_23015.zip (rename the .apk to .zip)

The canary does no longer have a hide list but uses now zygisk with a deny list. This almost the same in my eyes.
If you really need the hide list then you should use the alpha version of Magisk:
vvb2060/magisk_files at alpha
The alpha build has hide zygist.
Both versions are held synchron from tjw and vvb2060.

If you uses edxposed: this is outdated. You have to install now lsposed:
for Magisk canary (zygist): https://t.me/s/LSPosedArchives

General Magisk thread:
 

coolfranz

Senior Member
Jan 24, 2011
94
18
Thanks for this rom, works fine so far on the old z1 compact.

But currently I have one issue with nfc. Tried to read my german eID card (ePA), which doesn't work as the ROM doesn't support nfc extended length. Hardware wise it should be fine because I am able to read the card with the stock rom.

Here some information about the issue (sadly not in english, but the main points should be understandable). I tried to alter the mentioned file, but wasn't able to find it.

Is there any chance to get that changed?
 
New builds with December 2021 ASB patches

Hi all,
new builds with the December '21 ASB patches are available and should be offered already as OTA update through the Updater app:

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

B. Pre-installed microG build variant with additional security patches
  • Security String 2021-12-05
  • Bromite System Webview and Browser on 96.0.4664.54
  • microG 0.22.214516-21

@115ek - please update OP/Changelog

Happy flashing, regards, M.
 

115ek

Senior Member
Jan 30, 2017
611
695
Is there any chance to get that changed?
Nothing is impossible, but the chance is very tiny. At the moment no one really cares about this extended nfc length support. If you really need it, going back to stock is the only option at the moment. Or you could dig into that topic and fix the problem - contributions are always welcome. And I think you're not the only one trying to use this feature. There already were discussions before.
 
  • Like
Reactions: MSe1969

diimdeep

Member
Aug 21, 2016
17
2
Hello everyone. I want to use my Z1 as webcam with DroidCam app. Question is: should I stick with stock 7.1.1 ROM or use this ROM for better image quality in this 3rd party app ?
AFAIK stock rom using proprietary sony camera libs and this rom do not, I'm right that any 3rd party camera app will give better image quaility on stock ROM, or I'm wrong and stock ROM will work better only with sony own camera app ?
 

115ek

Senior Member
Jan 30, 2017
611
695
Hello everyone. I want to use my Z1 as webcam with DroidCam app. Question is: should I stick with stock 7.1.1 ROM or use this ROM for better image quality in this 3rd party app ?
AFAIK stock rom using proprietary sony camera libs and this rom do not, I'm right that any 3rd party camera app will give better image quaility on stock ROM, or I'm wrong and stock ROM will work better only with sony own camera app ?
There a few points to clarify:
  • This thread is about the Z1 compact (amami), NOT the Z1 (honami). Although they are quite similar, you can't simply flash the same firmware.
  • The latest stock firmware is Android 5, NOT 7.1.1 (for both Z1 compact and Z1).
  • The firmware you can download here also includes proprietary libs for the camera.
To sum up: I can not prove the camera quality being same as stock nor the opposite. What I can say, is that there was a heavy decrease in picture quality due to unlocking the bootloader in the past. However, this was "fixed" and is NO longer an issue. The camera performs quite well from my point of view (also given, that this device is already quite old (from 2014)).
 
  • Like
Reactions: tramp20

diimdeep

Member
Aug 21, 2016
17
2
There a few points to clarify:
  • This thread is about the Z1 compact (amami), NOT the Z1 (honami). Although they are quite similar, you can't simply flash the same firmware.
  • The latest stock firmware is Android 5, NOT 7.1.1 (for both Z1 compact and Z1).
  • The firmware you can download here also includes proprietary libs for the camera.
To sum up: I can not prove the camera quality being same as stock nor the opposite. What I can say, is that there was a heavy decrease in picture quality due to unlocking the bootloader in the past. However, this was "fixed" and is NO longer an issue. The camera performs quite well from my point of view (also given, that this device is already quite old (from 2014)).
Thanks, I meant Z1c amami. I've tried this 18.1 ROM and lineage-14.1-final-amami-munjeni. Decided to stick with 14.1, in my simple tests 3rd party camera(droidcam) quality looks the same, in 14.1 ROM there is more preferences available within app, but in 18.1 there is dealbreaking bug that is when you use zoom there is fps drop to almost zero, and audio is not working(in droidcam). Also in 14.1 in camera app there is 4k, 60fps and many more options, that not available in 18.1.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 3
    Hi all,

    new builds with the May '22 ASB patches (Security String 2022-05-05) are available and offered already as OTA update through the Updater app:

    A. Standard LineageOS 18.1 build
    • Security string 2022-05-05
    • System Webview 100.0.4896.127

    B. Pre-installed microG build variant with additional security patches
    • Security string 2022-05-05
    • Bromite Browser and Webview on 101.0.4951.53
    • microG updated to 0.2.24.214816-10
    • Mozilla Location provider on 1.5.0

    @115ek - please update OP / Change log

    Happy flashing, regards, M.
  • 16
    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 : Ok
    - 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 2022-05-09
    9
    You can dropp apps on android 12 with one finger this very good feature missing from android 11
    I have already explained in detail our approach in regards to coming (or not) to the next major Android release. This approach is for sure not influenced or accelerated by comments, strong desires or feature advertising in regards to the next Android version.
    This is my last comment on that topic, we will from now on ignore any further comments or statements pointing to the next Android release!
    8
    New builds with November 2021 ASB patches

    Hi all,
    new builds with the Octrober '21 ASB patches are available and should be offered already as OTA update through the Updater app:

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

    B. Pre-installed microG build variant with additional security patches
    • Security String 2021-11-05
    • Bromite System Webview and Browser updated to 94.0.4606.109

    @115ek - please update OP/Changelog

    Happy flashing, regards, M.
    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.
    6
    Hi all,
    new builds with the April '22 ASB patches (Security String 2022-04-05) are available and should be offered already as OTA update through the Updater app:

    A. Standard LineageOS 18.1 build
    • Security string 2022-04-05
    • System Webview 100.0.4896.58

    B. Pre-installed microG build variant with additional security patches
    • Security string 2022-04-05
    • Bromite Browser and Webview on 100.0.4896.57

    @115ek - please update OP/Changelog

    Happy flashing, regards, M.