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

Search This thread
Thank you for this new update.

Btw: OTA not yet available (06:00) from 20210114
Hi all, yes - it is correct, that for variant A, no OTA update is identified.
I have found the issue and pushed a fix, which will be active, when the next build is created.
Sorry about that.

This means, that if you are on the January build, you have two options:

a. Manually flash the update via TWRP

b. My recommendation - please perform the following steps
Activate "Android debugging" and "Root debugging" on your device, connect your phone to your PC and enter the following two commands:
Code:
adb root
adb shell setprop lineage.updater.uri https://raw.githubusercontent.com/lin17-microG/OTA/lineage-17.1/amami.json
Afterwards, your device will find the update.
 
Hello,
Thanks for your work, I'm glad to be able to use Lineage 17.1 now :) using the «A standard version».
I used to run Lineage 16.1 before, and it worked well.

I have an issue with the camera, and although some of you pointed an issue with gallery, I'm not quite sure it's the same : the video is working fine, but I can't save photos. When I click to take the photo, depending on the app [Simple Camera, Open Camera, the basic camera], it freezes or does nothing. Using Open Notes scan, results are the same.
I'm worried I'm the only one with this issue.
Maybe I missed some answers, but if you have lead me so I can run further diagnostics, I'll be glad to do so.

Have a nice day,
I can't reproduce your issue. As you state, this happens with several apps, so I could think of two reasons:
a. Try wiping cache & dalvik in TWRP
b. Have you flashed anything on top of the ROM or do you use any Magisk modules?
 

tramp20

Senior Member
Jan 15, 2012
734
138
Rosenheim
Activate "Android debugging" and "Root debugging" on your device, connect your phone to your PC and enter the following two commands:

Thank you, I flashed already the update.

But I need help because I had never success with "adb root".
My adb Version 30.0.5 (Windows 10)

1. I cannot find "Root debugging" in the developer options, what is the correct German word?
2. adb root
restarting adbd as root
but I never see that this command finishes.
 

Attachments

  • Screenshot_20210209-063432_Einstellungen.png
    Screenshot_20210209-063432_Einstellungen.png
    106.1 KB · Views: 19

115ek

Senior Member
Jan 30, 2017
551
622
1. I cannot find "Root debugging" in the developer options, what is the correct German word?
Actually it should be there. However, I've just got a 18.1 device handy.
Perhaps it is also a problem caused by magisk. Can you do some settings in the magisk app?
I'm going to check a 17.1 build later on.
2. adb root
restarting adbd as root
but I never see that this command finishes.
So normally a dialogue will pop up on your phone's screen asking for permissions. Most times I also need to enable flie transfer mode for it to be working.

In any way: You could also do the stuff @MSe1969 mentioned in the TWRP. But you need to mount /system first. And setprop also won't work. You need to set it directly in build.prop or default.prop. However, it's a bit strange that it doesn't show up for you.

@MSe1969 Actually you're building userdebug, not user, right?
 
  • Like
Reactions: MSe1969
Actually it should be there. However, I've just got a 18.1 device handy.
Perhaps it is also a problem caused by magisk. Can you do some settings in the magisk app?
I'm going to check a 17.1 build later on.

So normally a dialogue will pop up on your phone's screen asking for permissions. Most times I also need to enable flie transfer mode for it to be working.

In any way: You could also do the stuff @MSe1969 mentioned in the TWRP. But you need to mount /system first. And setprop also won't work. You need to set it directly in build.prop or default.prop. However, it's a bit strange that it doesn't show up for you.

@MSe1969 Actually you're building userdebug, not user, right?
The screenshot indeed shows, that this option is missing, which seems to be caused by Magisk.

What you need is a root session, when connected with your device via adb.
By the way, the reply "restarting adb as root" followed again by the command prompt is the expected answer. You can verify with "adb shell" that you have a root session (if you see the #). If you are in the root session, enter the "setprop ..." command and leave the session afterwards with "exit".
 

tramp20

Senior Member
Jan 15, 2012
734
138
Rosenheim
The screenshot indeed shows, that this option is missing, which seems to be caused by Magisk.
By the way, the reply "restarting adb as root" followed again by the command prompt...

I never get a command prompt after this reply. I have to kill adb with ctrl-C or to wait until the timeout after minutes.

The " dialogue will pop up on your phone's screen asking for permissions" was appearing ofc and file transfer over usb is enabled too.

Perhaps LOS 17.1 does not recognize Magisk as a root solution and does not show this option?

I cannot use LOS 18.1 without Magisk, there is until now for me no way to install/patch it :-(
 
I never get a command prompt after this reply. I have to kill adb with ctrl-C or to wait until the timeout after minutes.

The " dialogue will pop up on your phone's screen asking for permissions" was appearing ofc and file transfer over usb is enabled too.

Perhaps LOS 17.1 does not recognize Magisk as a root solution and does not show this option?

I cannot use LOS 18.1 without Magisk, there is until now for me no way to install/patch it :-(
If you have Magisk, you can also do the following: Enable the terminal (developer settings), launch it, enter the command su, grant root access via Magisk when the popup appears, and then enter the "setprop" command in the terminal.
You flashed already the update, but to close the topic.
 

tramp20

Senior Member
Jan 15, 2012
734
138
Rosenheim
Enable the terminal (developer settings), launch it, enter the command su, grant root access via Magisk when the popup appears, and then enter the "setprop" command in the terminal.

Thank you.
This command finished without errors :)

But now the updater does no longer find an update:
"Die Suche nach Updates ist fehlgeschlagen. Bitte überprüfen Sie die Internetverbindung".

How can I revert the setprop command without restoring my backup?
Sorry I do not understand enough :-(

In LOS 18.1 the option rooted debugging is visible, perhaps it is only forgotten in LOS 17.1 :)
 
Thank you.
This command finished without errors :)

But now the updater does no longer find an update:
"Die Suche nach Updates ist fehlgeschlagen. Bitte überprüfen Sie die Internetverbindung".

How can I revert the setprop command without restoring my backup?
Sorry I do not understand enough :-(

In LOS 18.1 the option rooted debugging is visible, perhaps it is only forgotten in LOS 17.1 :)
As you have already manually flashed the update, it is normal that the updater woundn't propose you any update. This is what I mentioned already in my previous post.
The root debugging option is visible also in 17.1, but I think not, if you have Magisk flashed.
I can later check the Java code to give you a precise answer.
 
  • Like
Reactions: tramp20

yldun

New member
Feb 3, 2021
4
3
I can't reproduce your issue. As you state, this happens with several apps, so I could think of two reasons:
a. Try wiping cache & dalvik in TWRP
b. Have you flashed anything on top of the ROM or do you use any Magisk modules?

Thank you,

I updated to february update.

a. I just did that. On first reboot, I had no more access to camera at all with Simple Camera being the most talkative "CameraAccessException : CAMERA_DISCONNECTED (2) : Camera service is currently unavailable"
After rebooting, it's back to "normal". While I was playing around to check it was indeed the same (video recording is ok, I can switch between front and back camera, I can't save photo), I noticed an error : there is a small cam icon on top right, indicating the ressource "Camera" is used, I forced all cam' apps to close, but the icon is still here, preventing other use. I checked permissions, but nothing odd there.

b. since I picked version "A", I flashed pico opengapps on top of that. But no Magisk.
On Lineage 16.1, I did have Magisk installed.
I don't remember doing anything specific on my previous installation, but I don't do it so often, is there anything I could check to see if something is odd ?
 

115ek

Senior Member
Jan 30, 2017
551
622
@yldun
Do you were on the latest official firmware sony released before installing lineage?
This would be 14.6.A.1.236 I think.

The final consequence to solve the issue would be a clean flash. So if you can afford it, this would be the fastest solution.
 

yldun

New member
Feb 3, 2021
4
3
@yldun
Do you were on the latest official firmware sony released before installing lineage?
This would be 14.6.A.1.236 I think.

The final consequence to solve the issue would be a clean flash. So if you can afford it, this would be the fastest solution.

Err, I don't know. Can I check it now somewhere (not in LOS system I think) ? And eventually upgrade the firmware ?

By clean flash you mean reinstall LOS 17.1 one more time or (if this makes sense) does it involve trying to set the official Kitkat rom first ?
 

115ek

Senior Member
Jan 30, 2017
551
622
Err, I don't know. Can I check it now somewhere (not in LOS system I think) ? And eventually upgrade the firmware ?
Unfortunately I don't know a way to check it directly.
Maybe someone else here has an idea.
By the way: the last official firmware was Lollipop on the Z1 compact.
You could flash it with the flashtool for example.
For getting the firmware have a look here.

By clean flash you mean reinstall LOS 17.1 one more time or (if this makes sense) does it involve trying to set the official Kitkat rom first ?
One time is enough. With clean flash I mean wiping /data, /system, and /cache before the installation.
 

lm089

Senior Member
Jun 26, 2011
500
161
Munich
Unfortunately I don't know a way to check it directly.
Maybe someone else here has an idea.
Not sure whether that's related but every time while in TWRP flashing an update there's this line giving me a Sony firmware version string. Here it says:
"Target: Sony/D5503/D5503:5.1.1/14.6.A.1.236/2031203603:user/release-keys"
 

lm089

Senior Member
Jun 26, 2011
500
161
Munich
The screenshot indeed shows, that this option is missing, which seems to be caused by Magisk.
At least not in general: I'm running latest Magisk, and on my device the adb root option is showing (and working as well):
 

Attachments

  • Screenshot_20210210-090043_Magisk_Manager.png
    Screenshot_20210210-090043_Magisk_Manager.png
    96.5 KB · Views: 27
  • Screenshot_20210210-090128_Einstellungen.png
    Screenshot_20210210-090128_Einstellungen.png
    108.3 KB · Views: 27

lm089

Senior Member
Jun 26, 2011
500
161
Munich
Hi all, yes - it is correct, that for variant A, no OTA update is identified.
I have found the issue and pushed a fix, which will be active, when the next build is created.
Sorry about that.

This means, that if you are on the January build, you have two options:

a. Manually flash the update via TWRP

b. My recommendation - please perform the following steps
Activate "Android debugging" and "Root debugging" on your device, connect your phone to your PC and enter the following two commands:
Code:
adb root
adb shell setprop lineage.updater.uri https://raw.githubusercontent.com/lin17-microG/OTA/lineage-17.1/amami.json
Afterwards, your device will find the update.
Tried this, but ended up in a loop, showing the boot animation for some time until I forced the device to shut down (longest time I waited was well over 10 minutes).
What I did:
- ran your adb command then found the update through OTA; downloaded and installed. After install was finished ended up in the loop
- forced the device to shutdown, booted again to system ==> boot loop
- forced shutdown, then booted into TWRP; downloaded the update from SourceForge (via PC), then pushed the image to the device, then flashed the update from TWRP; cleaned DALVIK/Cache, tried to boot to system ==> boot loop
- another forced shutdown and boot into TWRP; restored latest Nandroid (from just before the OTA attempt) ==> now I'm back in system

Let me know if you need more info; if it's a log please tell me which one you need (after all these years flashing Android devices I still cannot remember which log is needed for what, and where/how I can get which; sorry for that :oops:)
 

lm089

Senior Member
Jun 26, 2011
500
161
Munich
I have 3 Z1c with the same Magisk version, LOS 17.1 and almost the same apps (to test) and no "adb root" option :-(
Do you have "debugging app" checked?
Look at my Screenshot, those are the checked options. Plus marked "file transfer" in the USB options while connecting device to pc.
Don't get me wrong, I'm not doubting your issues. Just wanted to clarify that Magisk alone cannot be responsible for that
 

tramp20

Senior Member
Jan 15, 2012
734
138
Rosenheim
Look at my Screenshot, those are the checked options.

Your Magisk (framework) shows N/A so it is not workíng/installed and you should not have root!
Please try to get root back (without restoring a TWRP backup!) and look again for "adb root".
Good luck :)
So you can see the problems some of us have with Magisk > 20.4 and LOS > 17.1 :)
 

Top Liked Posts

  • 2
    New builds with June 2021 ASB patches available

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

    A. Standard LineageOS 17.1 build
    • Security String 2021-06-05
    • A few kernel patches

    B. Pre-installed microG build variant with additional security patches
    • Security String 2021-06-05
    • Bromite System Webview and Browser updated to 91.0.4472.102
    • Upstreamed microG (0.2.19211515-9)
    • A few kernel patches

    @115ek - please update OP/Changelog

    Regards, M.
    apparently the clean install back in May (post #424) has helped: this was the first update in months that ran without any hassles. Many thanks once again to everyone involved!
  • 5
    New builds with June 2021 ASB patches available

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

    A. Standard LineageOS 17.1 build
    • Security String 2021-06-05
    • A few kernel patches

    B. Pre-installed microG build variant with additional security patches
    • Security String 2021-06-05
    • Bromite System Webview and Browser updated to 91.0.4472.102
    • Upstreamed microG (0.2.19211515-9)
    • A few kernel patches

    @115ek - please update OP/Changelog

    Regards, M.
    2
    I think it's not a problem of complexity. It's more a question of if we want to include it.
    If, then it would also only make sense for the microg builds.

    However, I don't really like the fact of including an arbitrary prebuilt apk.
    But in the end the microg builds are in @MSe1969's responsibility. So I'm just giving my opinion here.

    What about adding it on your own at first? Did you already try?
    Hello @115ek, correct, this would only make sense for the microG builds.

    @android666 Thanks for the interesting contribution, I will definitely have a look and do some testing.

    In fact, as this is a Stub, which requires to download the official AA app, which will then "update" the stub, it could be an interesting feature.

    Will get back on that, but no promises
    2
    New builds with June 2021 ASB patches available

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

    A. Standard LineageOS 17.1 build
    • Security String 2021-06-05
    • A few kernel patches

    B. Pre-installed microG build variant with additional security patches
    • Security String 2021-06-05
    • Bromite System Webview and Browser updated to 91.0.4472.102
    • Upstreamed microG (0.2.19211515-9)
    • A few kernel patches

    @115ek - please update OP/Changelog

    Regards, M.
    apparently the clean install back in May (post #424) has helped: this was the first update in months that ran without any hassles. Many thanks once again to everyone involved!
    1
    hello 115ek, MSe1969. could you please include AA support into future images, if it's not too complicated ?


  • 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-06-14
    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 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.
    6
    Changelog

    14.06.2021

    • ASB Security string 2021-06-05
    • A few kernel patches
    • microG build only:
      • Bromite System Webview and Browser updated to 91.0.4472.102
      • Upstreamed microG (0.2.19211515-9)
    12.05.2021
    • ASB Security string 2021-05-05
    • standard build only:
      • System Webview on 90.0.4430.82
    • microG build only:
      • 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
    11.04.2021
    • ASB Security string 2021-04-05
    • standard build only:
      • System Webview on 89.0.4389.105
    • microG build only:
      • Bromite System webview updated to 90.0.4430.59
      • Bromite Browser updated to 90.0.4430.59
      • F-Droid 1.12
      • Update: AuroraStore 4.0.4 with AuroraServices 1.1.0
    09.03.2021
    • ASB Security string 2021-03-05
    • standard build only:
      • System Webview on 88.0.4324.152
    • microG build only:
      • 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
    07.02.2021
    • ASB Security string 2021-02-05
    • misc. kernel patches
    • microG build only:
      • Bromite System webview updated to 88.0.4324.141
      • Bromite Browser updated to 88.0.4324.141
      • F-Droid 1.10-alpha-234
      • microG 0.2.17.204714-5
    14.01.2021
    • ASB Security string 2021-01-01
    • standard build only:
      • Kernel slightly upstreamed
      • System Webview: Fix of persistent histogram bug (eating space in some cases)
    • microG build only:
      • Bromite Webview on 87.0.4280.131
      • Updated microG from upstream to 0.2.16.204713-10 (picked until 2f29b93)
      • Updated F-Droid to 1.10-alpha1-212
    29.12.2020
    • introduce microG build variant (see this post or the OP for more information)
    18.12.2020
    • synced LineageOS sources (security patch level December 05, 2020)
    08.11.2020
    • synced LineageOS sources (security patch level November 05, 2020)
    • Seedvault is included officially now (inbuilt backup solution)
    07.10.2020
    • synced LineageOS sources (security patch level October 05, 2020)
    13.09.2020
    • synced LineageOS sources (security patch level September 05, 2020)
    17.08.2020
    • synced LineageOS sources (security patch level August 05, 2020)
    13.07.2020
    • synced LineageOS sources (security patch level July 05, 2020)
    16.06.2020
    • further GPS improvements
    • synced LineageOS sources (security patch level June 05, 2020)
    20.05.2020
    11.05.2020
    • synced LineageOS sources (security patch level May 05, 2020)
    16.04.2020
    • synced LineageOS sources (security patch level April 05, 2020)
    15.03.2020
    • fixed livedisplay
    • fixed OTA update URL
    11.03.2020
    • remove 5GHz hotspot option as it isn't available even on stock
    • start signing builds
    • enable OTA updates
    • synced LineageOS sources (security patch level March 05, 2020)
    28.02.2020
    • fixed sony bootlogo
    • fixed TWRP time bug
    25.02.2020
    • fixed buggy bootanimation
    11.02.2020
    • DRM fix (Netflix and co should work now)
    • synced LineageOS sources (security patch level February 05, 2020)
    01.02.2020
    • SE enforcing
    • synced LineageOS sources (security patch level January 01, 2020)
    22.11.2019
    • initial release
    5
    New build is up.
    17.08.2020
    • synced LineageOS sources (security patch level August 05, 2020)