yashsingh1/xdaforums huggingface dataset:
[Xperia Z1 Compact Android Development] MSe1969:
Yes, there is one simpler way:

Change the property in the amami.json file in branch lineage-17.1 in the OTA repo. Just this one time. Can you do it? I'll be online only later this afternoon.
[Xperia Z1 Compact Android Development] 115ek:
Ah, right. Too simple :p

Allow migration · lin17-microG/OTA@cfe84c2

* this allows migration from older build using ro.lineage.releasetype UNOFFICIAL instead of UNOFFICIAL-signed * this needs to be dropped with the next build

github.com

Please comment if someone is still not able to find the new version via inbuilt updater.
[Xperia Z1 Compact Android Development] tramp20:
Now OTA is working again :-)

Thanks
[Xperia Z1 Compact Android Development] lm089:
Just worked for me, thx!
[Xperia Z1 Compact Android Development] Schuwarth:
Hello,

this problem still exists, also in google foto app. So it's not a gallery app problem. Pictures appear after a system reboot.
[Xperia Z1 Compact Android Development] J_C_D:
That's interesting. I'm using Simple Gallery Pro now as an alternative and that is working fine.
[Xperia Z1 Compact Android Development] Schuwarth:
Thanks for the Tip, Simple Gallery is a good alternative to google fotos, etc. and is working with this LOS rom!
[Xperia Z1 Compact Android Development] android666:
latest release (2021.01.14) disabling magisk functionality on my device. another experiences from magisk users ?

I have no clue how to root at this moment and I need it :-(
[Xperia Z1 Compact Android Development] 115ek:
I guess you're using a current magisk version.

Everything >20.4 is known to be broken as reported here.

However, magisk is absolutely not on my todo list as I don't use it and thus don't really care.

If someone comes up with a proper solution: We'll include it.
[Xperia Z1 Compact Android Development] tramp20:
Do you have a TWRP backup from the previous release with root?

Then you have to restore only the boot partition with TWRP (without data and system!).

You have to do this after every ROM update.

If you have success with this method you should make a TWRP backup only from root after every Magisk (release and canaries) update.
[Xperia Z1 Compact Android Development] tramp20:
See my previous post.

My experiancies:

LOS 17.1: to get root for the first time install Magisk 20.4, no higher version can be installed, so you should download the package before it disappears.

Then it is no problem to update Magisk in the Manager to the newest versions.

LOS 18.1: as Magisk 20.4 can not be installed (too old) there is no chance to get root. I tried all possibilities (flashing Magisk with TWRP or patching boot.img with the MM).

At least you get a boot loop, or at worst TWRP is broken (tried several times).

Btw has SpiritCroc stopped development?
[Xperia Z1 Compact Android Development] MSe1969:
I am no specialist for Magisk as I don't use it myself. However, if you have to restore the boot.IMG after each ROM upgrade, you will never get the kernel patches coming with the ROM updates.

Isn't Magisk supposed to put some kind of "survival script" into /system/addon.d to re-patch the boot partition after a ROM update?
[Xperia Z1 Compact Android Development] veloc_h:
Is it possible to integrate the Edit: the parts of the kernel, which include the Sony cam module from munjeni 14.1 LOS into LOS 17?
[Xperia Z1 Compact Android Development] MSe1969:
No. Why should we do that?
[Xperia Z1 Compact Android Development] veloc_h:
sorry, I should have written: the parts of the kernel, which include the Sony cam module. I would like to have the Sony cam because it would be a pity not tu use the outstanding qualitty of this cam.
[Xperia Z1 Compact Android Development] veloc_h:
The microg components allow to login to the (fake)-playstore, I can even see my apps, but the store says allways "installed", allthough it isn't. Somehow the status (installed/not installed) is not checked.

I'm using LOS 17 from 2021/01 (fresh install from 2020-02-01
[Xperia Z1 Compact Android Development] MSe1969:
Can you provide an example (screenshot)?
[Xperia Z1 Compact Android Development] veloc_h:
E.g. I had installed google chrome (with another android, using google playstore app), in the section "my apps" on playstore I see the status of chrome as installed, allthough it isn't. Therefore I cannot install chrome. The same with any other apps I had installed and which I want to reinstall.

The microg self-check doesn't show any errors.
[Xperia Z1 Compact Android Development] android666:
big Thanks for all advices. this is my working solution (i did restart after each step):

1) reboot to recovery

2) TWRP full backup

3) flash Magisk v20.4 & reboot to recovery

4) flash new z1c image & reboot to recovery

5) flash latest magisk (21.x) zip (magisk.me/zip/) & Reboot the system

6) optionaly update magisk to latest version (over magisk gui)
[Xperia Z1 Compact Android Development] MSe1969:
OK, understood - however, it is not at all that simple!

In general, everybody is free to contribute (e.g. via pull request to our repositories). So if you exactly know the specific commits in munjeni's kernel, please create a pull request against our kernel, after you have successfully tested it on your device.
[Xperia Z1 Compact Android Development] MSe1969:
So you use the "microG" build variant, and you start the shipped AuroraStore and use your own Google credentials to access the play store (and not anonymously) and then AuroraStore tells you, that certain apps are installed already, bif they aren't? Or what exactly is your setup?
[Xperia Z1 Compact Android Development] veloc_h:
it says "installiert" which means installed...

you use the "microG" build variant

-> yes

you start the shipped AuroraStore and use your own Google credentials to access the play store

-> no, but I use my own login

then AuroraStore tells you, that certain apps are installed already, bif they aren't?

-> no, I enter google playstore in the browser search, then I login with my account

Edit: with Aurorastore it works fine, thanks a lot for your hint and sorry about the huzzle.
[Xperia Z1 Compact Android Development] veloc_h:
can't you get in contact with munjeni? I 'm not a programmer at all, but he should know exactly where the commits (edit wikipedia does explain it, but I don't think I 'm able to create a commit ) are and whether or not they might work with LOS 17
[Xperia Z1 Compact Android Development] 2faraway2:
Yes, that's exactly how it works and I can confirm that the magisk survival script does its job very well :)

So there should be no need to restore the boot.img after an ota update while loosing the kernel patches of the new release ..
[Xperia Z1 Compact Android Development] 2faraway2:
Come on, that's your demand so it should be your task (not the developpers one) to get in contact with munjeni ... afaik a not let's say that mainstreamed character .. ;-)
[Xperia Z1 Compact Android Development] tramp20:
I did this over a long time but as this is a lot of work I use now my version (not correct as I read here).

Did you read this

Magisk 21.2 cannot be installed on Sony Z1c with Android 10 Lineage 17.1 · Issue #3636 · topjohnwu/Magisk

Description The last Magisk version that could be correct installed was 20.4. All versions after 20.4 fail (from the first canaries to 21.2 magisk-debug_6d88d8ad). 1.1 Flashing magisk-debug_6d88d8a...

github.com

especially the last post?

I cannot try this tip as I have only Windows.
[Xperia Z1 Compact Android Development] veloc_h:
Ok, I have asked him to get in contact with you, but it might be much more efficient if the developpers would speak to each other (don't know why it should be so difficult for the LOS 17.1 programmers to get in contact with munjeni...).

There is no use if I acted as an interface between the developers, because I don't understand the programming details. I have a rought idea, that there are certain prerequisites for the Munjeni (or Sony) code, which are related to kernel or the Android Version.
[Xperia Z1 Compact Android Development] veloc_h:
it's not necessary - even for "not mainstreamed" ones- to get personal. A good friend would know a bit of my personality and even he would stick to criticism, which is related to a specific situation.
[Xperia Z1 Compact Android Development] veloc_h:
Don''t know whether or not it's up to my gps.conf or any other configuration file on my installation: With 17.1 (latest version) my GPS doesn't get a fix. Tested it with different gps-software (the module of locus pro, GPS Test, ...) . Quite a lot of satellites are seen, but no fix, even after half an hour (at the window, where I got a fix with my Xiaomi Mi5 within 1 oder 2 minutes). These fixes https://review.lineageos.org/c/LineageOS/android_device_samsung_msm8930-common/+/275856 and https://review.lineageos.org/c/LineageOS/android_device_samsung_serrano-common/+/275865 are implemented, aren't they? According to the description the rollover fix is implemented: " fixed with 20200520 build " Or is it lost with a later version?
[Xperia Z1 Compact Android Development] MSe1969:
As you use the microG build, did you configure the coarse location providers in microG settings? This is known to cause issues if not done. Has nothing to do with self test, it appears on the overview page. You can either use the shipped Mozilla location provider and the nominatim for address res. Or you e.g. install Dejavu from F-Droid and freeze the Mozilla provider, if you prefer. But configure and activate the stuff. Then the GPS fix should work normally.
[Xperia Z1 Compact Android Development] Schuwarth:
Hi there,

I installed this rom with pico gapps last Christmas, coming from stock rom. The rom is very stable, fast and up-to-date --> nearly perfect!

But the battery cycle time is very poor compared to stock rom. On stock rom I got up to four days with one charge cycle.

Now with this rom it's hard to get two days per battery cycle even without using the phone. Battery consumption is about 2-3 % per hour and it's nearly all mobile network. I use same apps as on stock. I'm wondering because

- I can't see any difference between Edge and LTE (O2 Germany) as I saw on stock

- even with deactivated mobile data battery consumption is about 2-3 % per hour

- only on airplane mode I have "normal" battery drain.

Is this normal for this rom? It looks like a bug in mobile network energy management.

Best regards

Florian
[Xperia Z1 Compact Android Development] MSe1969:
Thanks for the in general positive feedback.

Regarding battery behavior - let's start first with some generic statements:

When you say, you come from Stock ROM, this means Android 5.0.2 (aka API level 21) or even Android 4.4.4 (aka API level 20). LineageOS 17.1 is Android 10 (aka API level 29) - each Android generation in general is more resource-demanding than its predecessor, which obviously also impacts the battery behavior. Same as for the opensource-parts of Android, this also applies especially to the Google-apps, which also have grown over time and are for sure not really known for their energy efficiency (the Google Play services for Android 5 are significantly lighter than those for Android 10).

Custom ROMs consist of an Opensource part, but they also make use of the device manufacturer's closed source drivers (so called vendor blobs). So specific energy optimizations depend on the collaboration of specific kernel tweaks (open source) with the closed source device drivers. Whilst there are manufacturers being developer friendly, others aren't by means of really sharing their tweaks. And Sony is "not that developer friendly", even if one could get a different impression, when looking at their open devices program... - There are specific examples, where Sony even implemented things in their closed source parts, which didn't truly have a technical meaning other than making it more difficult for Custom ROM developers... (e.g. Camera)...

Talking about vendor blobs, the last vendor blobs from Sony for this device, which are still in use, come from 2015 and were designed for Android 5.0.2 and the Android 10 operating system has to work with them, which also isn't really ideal.

So from that generic stand point, I am not surprised, that the latest Stock ROM has shown a better battery behavior than this ROM. So in the case of older devices like this one, you indeed have often only the choice between an outdated Stock ROM with an outdated Android version, which does not provide basic privacy features and hasn't received any security update since years, but is lightweight, and a modern, but meanwhile heavier Custom ROM.

I'm not saying, that there isn't any potential for improvement, but neither @115ek nor myself are really "kernel/device cracks" being able to optimize everything - we take advantage of the work of very good developers, who managed to get the Z1c working with modern Android versions. Nevertheless, based on the above stated, I am pretty sure that it won't be possible to fully get to the level of the Stock ROM.

Regards, M.
[Xperia Z1 Compact Android Development] Schuwarth:
Thanks for the explanation and your work for this device!
[Xperia Z1 Compact Android Development] 115ek:
Dropping google apps completely is a good idea for several reasons. Also when it comes to battery usage.

If you really can't renounce apps relying on the google framework, microG can be a less ressource-intensive alternative.

And then there are the performance settings in the battery options you may also try.

Anyway: If I bring my device to the office it'll also loose battery faster than outside. Leaving it in a place with bad reception is most likely having an influence.

And one more tip: Sometimes also a reboot is a good idea.
[Xperia Z1 Compact Android Development] veloc_h:
Even me as a noob has now understood the difficulties you are facing and the problems in General to create a custom rom for an old mobile, especially for a Sony mobile, whose developpers hide important parts of their code. Thanks a lot, @MSe1969 !
[Xperia Z1 Compact Android Development] veloc_h:
good point. I just realized, that there is a performance profile setting, thanks
[Xperia Z1 Compact Android Development] MSe1969:
To conclude the Sony camera topic:

If I have understood your request correctly, you would like to use the Sony Stock Camera app, which has been shipped with the Android 5.0.2 Stock ROM - so I seriously doubt - taking e.g. Android 10 specific features like "scoped storage" into consideration - that this would even be possible at all.

What I explained in my previous post about battery behavior, many aspects of that post would also apply to this topic. So this would by far not be trivial at all and would involve a lot of work and testing!

Camera indeed has been a big topic for this device: Android 5.x Custom ROMs used the Android 4.3 drivers (w/o that Sony DRM BS involving the TA partition) as a workaround (with lower resolution), there was no Android 6 Custom ROM with a working cam, and starting with Android 7, a breakthrough was made in regards to a working cam, which means that many excellent devs have put already effort into this topic - devs having more skills in that specific area than we do.

The Z1c is not my primary ("daily driver") device, and I think it's the same for @115ek - that having said and considering that this is a hobby for us (we both have more than one device thread), I am pretty sure that you will understand, that - independent from its unproven technical feasibility - "this won't represent our highest priority", to put it diplomatically, but bluntly...

Nevertheless, feedback, questions and ideas are welcome! But not all can be implemented.

:cool:
[Xperia Z1 Compact Android Development] tramp20:
You are really sure that a ROM update does not kill all Magisk versions > 20.4?

I don't believe this ( I have several Z1c) and you are alone with this statement.

look here:

Magisk 21.2 cannot be installed on Sony Z1c with Android 10 Lineage 17.1 · Issue #3636 · topjohnwu/Magisk

Description The last Magisk version that could be correct installed was 20.4. All versions after 20.4 fail (from the first canaries to 21.2 magisk-debug_6d88d8ad). 1.1 Flashing magisk-debug_6d88d8a...

github.com
[Xperia Z1 Compact Android Development] veloc_h:
In the meantime I have asked munjeni to make available the specific commits in his kernel in order to create a pull request, but he said they were too old (he didn't specify his statement yet).

"... you would like to use the Sony Stock Camera app, which has been shipped with the Android 5.0.2 Stock ROM - so I seriously doubt - taking e.g. Android 10 specific features like "scoped storage" into consideration."

-> I should have written: does it make sense and is it possible to implement the Sony stock camera app; limited scope for reading and writing files: obviously a conflict of a user-right system (?)

"... by far not be trivial at all and would involve a lot of work and testing!"

Ok, I do understand that.

"... won't represent our highest priority"

It was my second phone until I lost my number one mobile, that's why I wondered to buy a new or another used mobile or to keep the z1c. Because a friend had installed a new battery und a new vibration sensor I decided to give LOS a try (and because revengeos on Mi5 made me quite happy, including acceptable photos). But this is my personal "priority" and I really appreciate that you und 11Sek take your (free!) time for the LOS z1c development. Generally I'm buying used electronics and try to use the gadgets as long as possible. The z1c is quite powerful (compared to my second mobile, a s3mini) and the camera sensor (20mb) is quite huge for the time, the z1c was sold and even now.

By the way: I'm surprised, how performant the s3mini behaves with Android 5 and without google!

I'm going to test the slider power save settings and I will report the results.

Thanks and best regards

veloc_h
[Xperia Z1 Compact Android Development] veloc_h:
My plan was to use only the built in gps module of the z1c.

Edit: therefore I have disabled any google server. wlan and network gps source.
[Xperia Z1 Compact Android Development] yldun:
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,
[Xperia Z1 Compact Android Development] MSe1969:
In fact, in Android 10, there is no distinction any longer, whether to use GPS or coarse location, the system decides it. What you should do, as indicated by me, is the following: Install Déjàvu from FDroid as coarse location provider. It has no internet connection and simply records locally, what the GPS finds. By doing so, you have no connection to any location server and you have a properly configured microG not disturbing any GPS fix.
[Xperia Z1 Compact Android Development] veloc_h:
déja vu according to https://github.com/n76/DejaVu#:~:te...data acquired by the phone stays on the phone. "uses locally acquired WLAN/WiFi AP and mobile/cellular tower data to resolve user location. Collectively, “WLAN/WiFi and mobile/cellular” signals will be called “RF emitters” below."

My intention was to use the gps on my walks in the middle of nowhere, where there is no wlan, no cellular, only the built in gps module. Or didn't I understand the principle?
[Xperia Z1 Compact Android Development] MSe1969:
:)

OK, I'll explain again.

1. You only want to use your GPS and do not want to deal with any coarse location provider. Understood.

2. A side effect of microG is, that if you don't configure a coarse location provider, it may disrupt the location process, even if you don't want to use it. Hence, you need to configure a coarse location provider just for the sake of getting a proper GPS fix.

3. You could easily use the shipped Mozilla location provider. Mozilla isn't Google, but the Mozilla location provider is a server, to which your phone needs to send cell tower data, and I understand, that you don't like that idea. So my suggestion to install and configure Dejavu in microG should give you, what you want:

GPS fix isn't disrupted any longer and no cell tower data sent to any server.
[Xperia Z1 Compact Android Development] veloc_h:
did you check the gestures settings? I don't have this issue (basic built in cam and open camera). Which version of LOS have you got?
[Xperia Z1 Compact Android Development] 2faraway2:
You're right, I didn't read your question carefully that you are already on 21.4.

I'm still on 20.4 (means I didn't updated to 21.4) and on this release the rom ota-update works fine thanks to the survival-script

Sorry for the confusion !

But for me a hint not to update magisk .. ;-)
[Xperia Z1 Compact Android Development] tramp20:
OK,

it is really complicated :-(

If you use a banking app and it does not detected root then you can stay with 20.4.
[Xperia Z1 Compact Android Development] MSe1969:
New builds with February 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

https://sourceforge.net/projects/lin17/files/amami/LineageOS_17_signed/lineage-17.1-20210207-UNOFFICIAL-signed-amami.zip/download

Security String 2021-02-05

misc. kernel patches

B. Pre-installed microG build variant with additional security patches

https://sourceforge.net/projects/lin17/files/amami/LineageOS_17_signed/lineage-17.1-20210206-UNOFFICIAL-microG-signed-amami.zip/download

Security String 2021-02-05

misc. kernel patches

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

@115ek - please update OP/Changelog

Regards, M.
[Xperia Z1 Compact Android Development] tramp20:
Thank you for this new update.

Btw: OTA not yet available (06:00) from 20210114

Are these kernel patches important/necessary?

See https://xdaforums.com/t/rom-unoffic...1-for-xperia-z1-compact.4007983/post-84404975

It is a lot of work:

uninstall Magisk 21.4 (all settings are gone).

install 20.4 (configuring all again)

update Magisk and Manager to 21.4
[Xperia Z1 Compact Android Development] MSe1969:
Hi,

rgd. OTA - which build variant (A or B) do you use?

Rgd. Kernel - I try to keep Kernel "current" by trying to apply, whatever sec. patches are available for 3.4, which is out of maintenance, but there still ARE thing being back ported.

For sure, you can omit kernel patches for a while by restoring the patched boot.img, but this leaves you more and more open to issues...
[Xperia Z1 Compact Android Development] tramp20:
Sorry, I am using A.

Thank you for explaining and ofc maintaining.

Today I patched the newest boot.img in the Magisk Manager 21.408 (with many bug fixes). Patching ended without error but after flashing this patched boot.img I lost root again as before.
[Xperia Z1 Compact Android Development] MSe1969:
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:

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.