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

Search This thread

115ek

Senior Member
Jan 30, 2017
614
697
Would it make sense to use the Sony Flash Tool to flash a stock ROM and then start over again?
You should definitely be on latest stock firmware. Else weird things may happen.

It could also be some problem with the SIM card itself or some hardware problem.
But at first make sure to be on latest sony firmware before any further investigation.
 

gibar7

New member
Jan 9, 2022
2
0
I uploaded a testbuild here: https://sourceforge.net/projects/li...FICIAL-amami-signed_audiotest_v1.zip/download
This is only intended for testers (standard build only)! Before merging anything into the "stable" builds I'd like some other persons to test it.

For now it seems system sounds and fm radio are broken. But maybe someone could test if the echo cancellation works better now. And if there are further problems.
If you feel like a tester and are on the standard build (not microg!) feel free to share your experiences.
I gave it a try, but, unfortunately, the issue with echo still persists even with that testbuild. Anyway, thanks for looking into this at all!
 

traegr

Member
Sep 26, 2020
20
0
So I followed all the steps, placed the zip files in an external sd and flashed through TWRP and it was succesful. Then I tried to reboot, it went to the sim lock page and before I could key the code in, the screen shut down and went back to the Lineage loading screen, and it repeated a few times before I manage to quickly key in my code and then it showed my usual background wallpaper with the words 'Phone is starting...' with a progress bar underneath, then it shuts down again and loops back to the Lineage loading screen. It's just keeps looping like that until I shut the phone down (using the very short time window when it's showing 'Phone is starting...' to press on the power button and use the power off function).

Then I waited a bit and switched it on and the same thing repeats. So now I've shut it down again.

And then I went back into the TWRP Recovery and tried to reboot the system from there. Then there was a weird overlay of both the Lineage loading screen and the "Phone is starting' text. Then it goes into a loop again and the screen is now hung on ''Phone is starting..." with a black background and my status bars at the top and navigation buttons at the bottom visible before it goes blank and repeats again.

What have I done wrong? Thanks in advance.
 
Last edited:

traegr

Member
Sep 26, 2020
20
0
Yeah, adb only shows the progress for uploading the firmware to the device. The actual installation progress on the target itself is not shown as progress. So you just have to wait until the sideload command finishes.

Anyway - nice to hear that you had success. :)
Concerning the sd card: You could reformat it and give it another try. But if there are further issues you should probably just throw it away and get a new one.
Ok, so I thought of reinstalling using adb sideload and I also received this same problem of 47% stop. Does your comment mean that it still succeeded since on the phone it says 'adb sideload complete' successful. But does that mean it received only 47% successfully?

I did have a problem with installing fastboot (though adb worked) and through some youtube troubleshooting got the fastboot working

EDIT: I tried reinstalling by putting the zip files in root storage of the phone and again flash is successful but rebooting is not... So it's not the SD card problem. Is it because I have very little space left in internal memory (about 1,08GB left)? But I thought wiping the system would allow the new one space.

EDIT2: Tried again this morning to bootup and decide to wait longer, next thing it boots... into TWRP even though it was a normal boot from the power button

EDIT3: I restored the backup to the previous firmware from an external SD card and it boots up but now my SD card is listed as corrupted and when I try to set to portable storage (as it always was) it prompts me to format it (saying it needs to be "formatted to store apps, files and media" which is the identical warning to setting up as phone storage which I don't want to do and it pops up no matter which option I choose) so I decided to leave it for now (I also have a copy of its contents on my PC). Booting into Recovery still shows TWRP so at least that was not overwritten (it had the Lineage custom recovery previously) and SD card as external SD
 
Last edited:

jurkoman

Senior Member
Oct 24, 2015
64
11
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.


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

Download

FAQ






Bugreports

Sources

Credits


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-01-22
Hello, i bought an Xperia Z1 compact from ebay, unlocked bootloader and tested with latest stable LOS 17.1 build.
Rom is working very good.
One weird thing i experienced with, i cant see that blue screen with shaking call on incoming calls, only status bar and navbar. Option for receive incoming call is going to quick settings and answer there.
I saw this also on latest stable LOS 16.0 build.
Because (maybe?):
Proximity/light sensor on my Z1c is working for adjusting brightness, but screen turns off (completely black) after answering an call. Option for turning on screen in call is push power button or camera button longer.
Device had installed latest SW .236
Maybe past user changed display and broked up an sensor. Idk
Question is - that incoming calls screen - it is also related to proximity/light sensor like in-call or it is software problem if it doesnt show properly? Someone experienced with similar problem?
 
Last edited:

115ek

Senior Member
Jan 30, 2017
614
697
I gave it a try, but, unfortunately, the issue with echo still persists even with that testbuild. Anyway, thanks for looking into this at all!
Hmm. I'll have another look when time permits.
What have I done wrong?
No idea. To be honest: Your description is a bit unclear to me. I'd say the easiest solution would be a clean flash here.
with LOS 17.1. latest build
17.1 is no longer supported. Please use 18.1.
It is hardware problem or software bug ?
No idea. I can't really understand your problem.
 

jurkoman

Senior Member
Oct 24, 2015
64
11
Hmm. I'll have another look when time permits.

No idea. To be honest: Your description is a bit unclear to me. I'd say the easiest solution would be a clean flash here.

17.1 is no longer supported. Please use 18.1.

No idea. I can't really understand your problem.
My point is, on incoming call, instead of answer or see Call ID directly at screen, i see black area with status bar like FC or not responding.
I must put down quick settings to see incoming call and answer...
 
Last edited:

Dystinato

Member
Feb 22, 2022
5
0
Denmark
You should definitely be on latest stock firmware. Else weird things may happen.

It could also be some problem with the SIM card itself or some hardware problem.
But at first make sure to be on latest sony firmware before any further investigation.

Thank you for your answer, when running the Sony Flash Tool (Emma) there are no firmware to get, only a full clear and ROM install, so I guess I am on the latest firmware. In fact, getting into TWRP with hardware buttons never was an issue if I just unplugged the USB cable - my bad :rolleyes:

I took out the SIM card out, cleaned the contacts with alcohol and used a piece of paper soaked in alcohol to clean the contacts in the SIM card slot, and now it seems like (knock on wood) there are no more issues with phone calls! :D

The issue with no notification on SMS is still unclear, there are no issues in the log that could hint what causes it. It seems to get worse with higher power saving modes. Calendar notifications are sometimes delayed by several minutes, which may be related to same "issue".

Another thing someone may be helpful with is that the microphone sensitivity is fine during phone calls, but when recording audio (or video with audio), the sound is barely audible - almost not present. It may be related to noise cancellation, anyway I would appreciate any hints on how to solve this.
 

115ek

Senior Member
Jan 30, 2017
614
697
My point is, on incoming call, instead of answer or see Call ID directly at screen, i see black area with status bar like FC or not responding.
This is how it looks for me.
Incoming call when screen turned off:
2.jpg

Incoming call when screen turned on:
1.jpg


This is the standard build with no gapps installed at all.
Maybe you use some different caller app and you're missing permissions or so. No idea. But for the standard configuration I'm not able to reproduce your problem.
there are no more issues with phone calls!
Nice to hear that :)

It seems to get worse with higher power saving modes.
Yes. This is a general problem on android. I think even some google apps itself are affected by that. I remember there was something about alarms from the google clock app ringing too late or not at all. It's a topic that comes up over and over again. It has to do with the doze mode.

Another thing someone may be helpful with is that the microphone sensitivity is fine during phone calls, but when recording audio (or video with audio), the sound is barely audible - almost not present. It may be related to noise cancellation, anyway I would appreciate any hints on how to solve this.
Audio is a tricky topic. We also have this echo cancellation problem still open. Some parts of the audio handling is like a black box. There are some binary files containing audio configurations you can only read/write with a proprietary qcom tool (you need to sign an nda for that).
Then there is also the mixer_paths.xml https://github.com/lin18-microG/android_device_sony_amami/blob/lineage-18.1/audio/mixer_paths.xml you could use to tweak some things. It defines some register values that should be set for specific use cases.
 

jurkoman

Senior Member
Oct 24, 2015
64
11
This is how it looks for me.
Incoming call when screen turned off:
View attachment 5556011
Incoming call when screen turned on:
View attachment 5556013

This is the standard build with no gapps installed at all.
Maybe you use some different caller app and you're missing permissions or so. No idea. But for the standard configuration I'm not able to reproduce your problem.

Nice to hear that :)


Yes. This is a general problem on android. I think even some google apps itself are affected by that. I remember there was something about alarms from the google clock app ringing too late or not at all. It's a topic that comes up over and over again. It has to do with the doze mode.


Audio is a tricky topic. We also have this echo cancellation problem still open. Some parts of the audio handling is like a black box. There are some binary files containing audio configurations you can only read/write with a proprietary qcom tool (you need to sign an nda for that).
Then there is also the mixer_paths.xml https://github.com/lin18-microG/android_device_sony_amami/blob/lineage-18.1/audio/mixer_paths.xml you could use to tweak some things. It defines some register values that should be set for specific use cases.
Yes, i tested LOS 15.1, 16 and 17.1 and this issue is in these versions. Incoming call screen FC, i think this "app" is sensor/hardware related, my device has maybe broken sensor or bad connected. Is not big problem, i need to put quicksettings down and answer from there.
Okay, thanks for check this issue and i will stay with LOS 17.1, i prefer android 10 UI.
 
  • Like
Reactions: irobbanka

Dystinato

Member
Feb 22, 2022
5
0
Denmark
Yes. This is a general problem on android.
Annoying. I remember once reading this info about optimizing for doze, but I since forgot about it. Notifications may be delayed by up to 9 minutes during doze. There might be a bug in the handling of "exempt from optimization" or Android is somehow detecting what is regarded as misbehavior from an app which is then having its notifications suppressed until behaving again. I guess that what is a feature for some is a bug for others! ;)

Audio is a tricky topic.
Weird that this is made so hard to handle. Audio recording in the stock ROM was poor at best, but in LOS 18.1 it is more or less completely absent. I might look at those mixer settings at some point and report back if I have any luck with that.

Thanks!
 
Hi all,
new builds with the January '22 ASB patches (Security String 2022-03-05) are available and should be offered already as OTA update through the Updater app:

A. Standard LineageOS 18.1 build
  • Security string 2022-03-05
  • Many kernel patches
  • System Webview 98.0.4758.101

B. Pre-installed microG build variant with additional security patches
  • Security string 2022-03-05
  • Many kernel patches
  • Bromite Browser and Webview on 99.0.4844.58
  • microG 0.2.24.214816-2
  • AuroraStore 4.1.1

@115ek - please update OP/Changelog

Happy flashing, regards, M.
 

Vslchk

New member
Apr 7, 2022
2
1
Hello guys, can anyone share fastboot or/and adb drivers? I can't find them anywhere... Without them, I can’t install the recovery to install this OS?
 

lm089

Senior Member
Jun 26, 2011
639
205
Munich
Hi, I'm having some kind of a weird problem here:
I'm still running on 17.1 but plan to finally upgrade to 18.1 soon (standard installation with GAPPS etc). In fact I already did back last December but then had to go back to 17.1 for some organisational reasons. Before I upgraded to 18 I of course created a full V17.1 backup from TWRP. I finished the 18.1 setup then again back to TWRP, created a 18.1 backup and restored 17.1.
Yesterday I decided it was time to finally upgrade to V18, so I booted to TWRP, created yet another V17.1 full backup and restored my V18.1 backup from December. Tried to boot to system but got into a boot loop. After staring at the LOS animation for ~10 Minutes I stopped this and tried another clean flash using the March version of the 18.1 (left internal storage intact). Flashed latest MindTheGapps on top then booted to system and did the usual setup. Like in December all appeared to be fine. Back to TWRP, created a new full backup and tried to test it right away. And again ended up in the same boot loop as before.

As I never before had any trouble with creating and restoring full backups: does anyone here have an idea what could be going wrong? As my backups apparently are working with V 17.1, what could it be in V 18.1 that sort of breaks the backups? Is it probably the way I install and setup everything?
 
Hi, I'm having some kind of a weird problem here:
I'm still running on 17.1 but plan to finally upgrade to 18.1 soon (standard installation with GAPPS etc). In fact I already did back last December but then had to go back to 17.1 for some organisational reasons. Before I upgraded to 18 I of course created a full V17.1 backup from TWRP. I finished the 18.1 setup then again back to TWRP, created a 18.1 backup and restored 17.1.
Yesterday I decided it was time to finally upgrade to V18, so I booted to TWRP, created yet another V17.1 full backup and restored my V18.1 backup from December. Tried to boot to system but got into a boot loop. After staring at the LOS animation for ~10 Minutes I stopped this and tried another clean flash using the March version of the 18.1 (left internal storage intact). Flashed latest MindTheGapps on top then booted to system and did the usual setup. Like in December all appeared to be fine. Back to TWRP, created a new full backup and tried to test it right away. And again ended up in the same boot loop as before.

As I never before had any trouble with creating and restoring full backups: does anyone here have an idea what could be going wrong? As my backups apparently are working with V 17.1, what could it be in V 18.1 that sort of breaks the backups? Is it probably the way I install and setup everything?

An idea, at least to exclude any obvious reasons:
When you say "full backup", this also includes the system partition, right? This question may sound stupid, but I remember having had a while back a case (not sure on which device), where backing up system was skipped and the backup did not contain the system image.
You could also simply try to flash 18.1 and the Gapps stuff again, after having restored the 18.1 backup.
Finally, are you using Magisk? Maybe also worth a try to install it again after restore...
 
  • Like
Reactions: lm089

lm089

Senior Member
Jun 26, 2011
639
205
Munich
An idea, at least to exclude any obvious reasons:
When you say "full backup", this also includes the system partition, right? This question may sound stupid, but I remember having had a while back a case (not sure on which device), where backing up system was skipped and the backup did not contain the system image.
You could also simply try to flash 18.1 and the Gapps stuff again, after having restored the 18.1 backup.
Finally, are you using Magisk? Maybe also worth a try to install it again after restore...
Good idea, thanks for your input.
Looking at the backup folder, it contains system.ext4.win (1.46 GiB) + the accompanying .sha2 file + system.info. But maybe it's still broken. Trying to re-flash 18.1 + Gapps sounds promising, I'll try that tonight!

Magisk is not in the game (yet). It's a "left-over" device (with a slowly dying battery, fair enough after 8 years). No SIM card and to be used for security-aware apps (banking, etc.)
 

lm089

Senior Member
Jun 26, 2011
639
205
Munich
I'll try that tonight!
OK, got it to work, if I follow a very strict path (different from what I'm used to), which I still think is quite strange.
Starting point is my full backup from December '21, which has BitGapps plus Magisk V23 (a canary version to be exact) installed:
- restore that backup, then - still in TWRP - flash latest LOS 18.1 + latest BitGapps. Remark: while flashing latest LOS I see messages regarding some BitGapps OTA survival script being active...
- boot to system - works fine
- in system update all apps that had updates since last December
- uninstall Magisk V23, let phone reboot to system

so now I am unrooted. Reason is that any new full backup which has a working Magisk installation seems to fail when it come to restoring it. Although I'm not quite sure whether BitGapps might be the root of my problems, see messages mentioned above

To restore that new backup I have to:
- restore backup from TWRP
- reflash latest LOS, but NOT BitGapps (that is giving me "error 1" messages I admit that I don't understand). Maybe that's because I don't have a newer BitGapps version, but maybe not
- reboot to system

In case I want root I have to do a new Magisk installation

What I don't understand is the fact why my old December backup can be used although it contains Magisk AND BitGapps, but any newer backup canot (I tried ~5 times in various combinations).

Does that make any sense? But for the moment I'm a happy Z1c LOS 18.1 user.

Finally some rather off-topic questions - sorry for that: I googled quite a bit last night but couldn't find proper answers:
As far as I get it Magisk is patching the boot partition. So wiping boot then flashing LOS should have the effect of removing Magisk. Correct? Or am I missing something?
Which partition is a GAPPS solution installed to? Is that system, or is it data? Or even some place else?

Thanks for your patience anyone
 

Top Liked Posts