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

Search This thread
Whatever it is, I'm afraid there's something in my InternalMemory partition that is doing harm.

Meanwhile I'm back at my mentioned Nandroid, planning to do a complete clean installation, without restoring anything from IM. Hope that works
Hmm... - in fact, as you know, "Internal Memory" is not a "partition", but a directory structure within the /data partition.

How did you 'backup' Internal memory? Did you simply connect the device via USB and copy all files and directories to your PC via the PC's file manager (and did the restore later the same way)? Or did you use any special "low level method" (or application)? (I am not aware of any, but just to make sure...)

You could try to purge the 'Android' directory and all its subdirectories from recovery (of course after backing it up) after flashing the May build. This structure will be automatically rebuilt. I suspect, that some app data of system apps stored there causes the trouble...
 

lm089

Senior Member
Jun 26, 2011
880
320
Munich
Sony Xperia Z1 Compact
OnePlus 6
Hmm... - in fact, as you know, "Internal Memory" is not a "partition", but a directory structure within the /data partition.

How did you 'backup' Internal memory? Did you simply connect the device via USB and copy all files and directories to your PC via the PC's file manager (and did the restore later the same way)? Or did you use any special "low level method" (or application)? (I am not aware of any, but just to make sure...)

You could try to purge the 'Android' directory and all its subdirectories from recovery (of course after backing it up) after flashing the May build. This structure will be automatically rebuilt. I suspect, that some app data of system apps stored there causes the trouble...
Ok, sorry if I mix things up (in regards to misusing the "pertition" term).

Backup method: yes: just plain copy over all that's in there using Windows' file explorer

Meanwhile I re-did the entire wipe/format - clean flash May build - re-setup process. It doesn't take too long on that device, there's not too much on it. I had a very recent Titanium backup set. In regards to Magisk, I'm now running V20.3 from early last year, that should do. Only drawback is that I had to install it from TWRP as the newer instlalation method was introduced only a few versions ago.

Everything appears to be running fine now; hope the next update will run fine.

There's only one problem left: for some reason I cannot connect the device to the PC in fastboot mode. Adb is fine, but I never get an answer from "fastboot devices". Don't have any problems here with my other devices. But I'll take care of that another day.

UPDATE: solved, was my windows machine...

Cheers and good night, L
 
Last edited:
  • Like
Reactions: MSe1969

tramp20

Senior Member
Jan 15, 2012
798
166
Rosenheim
Apps & Games
flashed the May build, tried to reboot to system - and again I ended up in a bootloop
1. Before uninstalling Magisk you have to restore Magisk to the original name (unhide)!
After uninstalling Magisk you have to flash the original boot.img from the new LOS ROM (this is very important because on our XPerias the uninstall routine does not remove all changes to ram disk):
flashboot flash:raw boot boot.img

2. Don't boot now!
Instead do a "fastboot reboot" and press Vol down until the phone boots to TWRP.

3. Install now in TWRP the patched Magisk_23.001p.zip.
The patched Magisk installs correct, the Maggisk app (formerly Manager) is installed as a stub. Starting this stub downloads the full app.

4. Then you have to config Magisk.

5. Make a TWRP backup!

Patching the boot.img from the Manager fails every time so you have to use this method.

All Magisk updates can be installed without problems.

Important: every ROM update destroys parts of the boot partition, you can boot normal but boot to TWRP does not work.
So if the kernel has no important updates then after installing the update, restore the boot partition from #5.


Patching the Magisk_xxx.zip:
Please read my post in https://github.com/topjohnwu/Magisk/issues/3636
Especially the patch from user bleckdeth (I can use it but I don't understand it).

I can offer to download
1. the actual patched boot_patch.sh
2. the already patched Magisk app-debug_23001p.zip

Link to 1: https://www.magentacloud.de/lnk/KqvysqQq
Link to 2: https://www.magentacloud.de/lnk/jVvSM4Qu



With this method you can flash Magisk on LOS 17.1 and 18.1.
It seams that many XPeria are affected, topjohwu knows this problem since Jan 2021 :-(
 
Last edited:

lm089

Senior Member
Jun 26, 2011
880
320
Munich
Sony Xperia Z1 Compact
OnePlus 6
...
With this method you can flash Magisk on LOS 17.1 and 18.1.
It seams that many XPeria are affected, topjohwu knows this problem since Jan 2021 :-(
First of all, a big thank you to every one for their patience and help. and esp. for that comprehensive explanation in regards to Magisk on old Xperia devices! (y)
As stated above I meanwhile have a fresh and clean installed LOS 17.1 May build running, with GApps pico and Magisk 20.3 which was installed the old way (i.e. flash Zip from TWRP, then install the apk from system). For what I use the device for I'm perfectly happy with that solution: no need to hide the root solution.
While I was fighting with fastboot last night I had one crash, but that's all there was so far. Fingers crossed that the next update will again run smoothly
Have a nice day everyone
 

android666

Senior Member
Jun 19, 2010
105
19
hello 115ek, MSe1969. could you please include AA support into future images, if it's not too complicated ?


 
  • Like
Reactions: 115ek

115ek

Senior Member
Jan 30, 2017
614
704
hello 115ek, MSe1969. could you please include AA support into future images, if it's not too complicated ?



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?

EDIT:
@android666 Regardless how this will develop, thanks for your notice. I think we're all interested in improving the system. :)
 
Last edited:
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
 
hello 115ek, MSe1969. could you please include AA support into future images, if it's not too complicated ?


Interim status:
I have tested it on my primary device (One plus 7T Pro): Updating the stub with AA from Aurora works, AA is visible in the respective config screens, but it won't connect with the car!

Reading through the linked issue reveals, that the work was done for an Android 11 AOSP based system (Graphene OS), so might be some adaptations necessary, either because of Android 10, because of LineageOS or because of some of my hardening measures. When I find more time and the right mood, I'll have a closer look.

In general however, I am wondering, whether this all really leads into the right direction. I admit, that I did not so far really look, what exactly AA is. I e.g. have wrongly assumed, that you could stream any app to the car display.
However, it seems that an app needs to be explicitly developed/foreseen for AA and also somehow "certified" by G*. Hence AA primarily focuses on all the proprietary Google bloat (Maps, YT-app, ... - at least the "Hey Google" spyware is spoofed, so you don't have to deal with that cr*) and the known extra-nosy (but popular) apps (Spotify, WA, ...). It does not really seem to support all the good FOSS alternatives (OSM, NewPipe, ...), which I e.g. would like to see on my car display.

So at least for me, AA does not provide a true added value compared to the default options of the car's entertainment system (that point of view varies individually, of course)...
 

android666

Senior Member
Jun 19, 2010
105
19
yes, G certified apps can use AA (like Sygic navigation), but there are several tools helping adjust environment:

here I found some hint for 17.1 (18.1): link (they are using some stub, even if gapps)
 
Last edited:
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.
 

lm089

Senior Member
Jun 26, 2011
880
320
Munich
Sony Xperia Z1 Compact
OnePlus 6
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!
 
  • Like
Reactions: 115ek and MSe1969
New builds with July 2021 ASB patches available

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


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

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

@115ek - please update OP/Changelog

Regards, M.
 
Awesome to see my CVE patcher used more!
You might want to give it another run, I did a huge addition for 3.4 recently from @haggertk's 3.4 backports.

You might also put the patches on an another branch, as patch output can change/improve overtime and it'll be easier to maintain that way.
I did already apply before Kevin's 3.4 backports from his LineageOS Samsung msm8974 branch and for the recent patching action with this ROM's Sony msm8974 kernel, I used the patches listed in here as this is also a msm8974 kernel in your 17.1 directory.
Do you recommend to me to look further?

And by the way, whilst I have the opportunity to communicate with you:
As I prefer to truly apply the commits to my/our kernel forks, I have noticed, that few of your patches do not contain commit messages. For some of them, I found them and applied accordingly, but at least for that one I did not manage to find it.
Do you have the commit message(s) handy?
And if not - would you like me to make a pull request for those patches, where I was able to identify the originating upstream commit?
 

SkewedZeppelin

Senior Member
Mar 19, 2021
372
360
I did already apply before Kevin's 3.4 backports from his LineageOS Samsung msm8974 branch and for the recent patching action with this ROM's Sony msm8974 kernel, I used the patches listed in here as this is also a msm8974 kernel in your 17.1 directory.
Do you recommend to me to look further?

And by the way, whilst I have the opportunity to communicate with you:
As I prefer to truly apply the commits to my/our kernel forks, I have noticed, that few of your patches do not contain commit messages. For some of them, I found them and applied accordingly, but at least for that one I did not manage to find it.
Do you have the commit message(s) handy?
And if not - would you like me to make a pull request for those patches, where I was able to identify the originating upstream commit?

> I used the patches listed in here

The program is intended to be used to check which patches apply.

> I have noticed, that few of your patches do not contain commit messages.

Many of them are plain diffs due to various reasons, eg. Gerrit only gives base64'ed plain diff
I'm happy to accept patches that replace diffs with matching patches.

> but at least for that one

That is https://lkml.org/lkml/2017/10/2/352

--

In case it isn't clear, patches are added to this file first https://raw.githubusercontent.com/Divested-Mobile/Kernel_Patches/master/Kernel_CVE_Patch_List.txt

then downloaded with the program https://github.com/Divested-Mobile/CVE_Checker

and also checked using the program

you can use https://github.com/Divested-Mobile/CVE_Checker/blob/master/mk_dir_from_list.sh to convert the program output to a directory of the patches

you can download prebuilts of the program here https://gitlab.com/divested-mobile/cve_checker/-/jobs/artifacts/master/browse?job=build

furthermore a large amount of the patches in the list are extracted using this tool https://gitlab.com/cip-project/cip-kernel/cip-kernel-sec, you can add any kernel you want to the script config and extract matching patches from any given repository, and propagate that back into the final patch list


edit: here is example output https://github.com/SkewedZeppelin/android_kernel_sony_msm8974/commits/fixup it contains an additional ~60 patches
 
Last edited:
  • Like
Reactions: MSe1969
LineageOS 18.1 "microG Variant" Testbuild

Hi all,

for the 2nd build variant ("microG build"), a test build on LineageOS 18.1 is available here:

It has the same features, as described in the OP for this 17.1 build variant, with the following additions:
- AuroraDroid app replaces F-Droid app to access F-Droid repositories
- Option to only use fingerprint unlock for apps and not for the device
- Optional timeout for Bluetooth and WLAN connections
- Some more hardening features ported from GrapheneOS

@115ek and I plan to switch completely to LineageOS 18.1 for both build variants (variant A is already available for LineageOS 18.1, as you for sure know). Right now, this is still a test build, this means we truly appreciate any feedback (especially, if things don't work as expected). And there definitely will be an update with ASB patches for August for both 17.1 build variants.

Installation instructions:
  • Make a backup in TWRP

  • If your device is not encrypted, it is up to you whether you want to do a clean or dirty flash
  • Do or don't do a factory reset and flash the test build

  • If your device is encrypted, encryption is not compatible! It will be necessary to format the /data partition.
  • If you need to format the /data partition, make sure to before:
    - Backup the 'Internal memory' of your device
    - Watch out for your TWRP backup files and copy them, if needed, to your local PC
  • Format /data, reboot into TWRP and flash the above test build build and boot into an empty system (don't restore anything,yet)
  • Encrypt the device now - it'll take not very long until the device reboots - wait for the reboot to finish
  • Restore now the Internal Memory and reboot to TWRP
  • if you want to "dirty-flash", restore the nandroid backup now and afterwards, still in TWRP,
  • Flash the above test build again
Feedback appreciated - Thanks & regards, M.
 
Last edited:
  • Like
Reactions: 115ek and tramp20
New builds with August 2021 ASB patches available

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


A. Standard LineageOS 17.1 build
  • Security String 2021-08-05
  • System Webview updated to 91.0.4472.164

B. Pre-installed microG build variant with additional security patches
  • Security String 2021-08-05
  • Bromite System Webview and Browser updated to 92.0.4515.134
  • F-Droid updated to 1.13
  • Fix in WiFi randomization

@115ek - please update OP/Changelog

Regards, M.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 20

    This thread is discontinued - please visit the LineageOS 18.1 sucessor thread

    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-10-11
    9
    New builds with July 2021 ASB patches available

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


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

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

    @115ek - please update OP/Changelog

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

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

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

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

    @115ek - please update OP/Changelog

    Regards, M.
    7
    EOL
    Hi all, as no comment / reaction to the final builds has been posted, I assume that all is fine with those builds.
    Instructions and recommendations to upgrade have been provided. So time to declare officially the EOL of this thread. Thanks for your interest and see you in our 18.1 successor thread.
    7
    New builds with September 2021 ASB patches available

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


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

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

    @115ek - please update OP/Changelog

    Regards, M.