yashsingh1/xdaforums huggingface dataset:
[Xperia Z1 Compact Android Development] lm089:
Probably too late, but just to check I enabled NFC on my Z1c, installed the app mentioned by tramp20 - and find it is working nicely (might as well leave it installed). But only with my regular bank card; my VISA card is unresponsive.

Also tested my NFC capable printer - at least the printer's tag is recognized by the phone.

Am running the latest build of this LOS 17.1 ROM
[Xperia Z1 Compact Android Development] tramp20:
Yes, credit cards are ok, all giro cards are unreadable.
[Xperia Z1 Compact Android Development] lm089:
Well, in my case ir was exactly the other way around: VISA no, Giro yes. Strange
[Xperia Z1 Compact Android Development] IJK_CZ:
I am using Android Auto (latest version April 2021, downloaded form APK mirror ) on Lineage 17 (Dec 18 build) with PicoGaps without problems. Also Screen2Auto (req. root) works fine. I would like to update Lineage system to more fresh, I hope AA will be not affected.
[Xperia Z1 Compact Android Development] android666:
When I seldom having SD card checking (it takes a while) after I start phone (start from shutdown state), does it mean, I'm close to end of life of my card (SanDisk 400GB with ext4) ? it's anoying when desktop is locked due to such SD card checking for several minutes.
[Xperia Z1 Compact Android Development] traegr:
Oh I just realized there was a reply. Thanks!

The thing is, my 'Update Recovery' in developer options was enabled when I first installed Lineage so TWRP has been replaced with the built-in Lineage one with subsequent updates...

Do I have to replace it with TWRP again? Or can I use the built-in recovery? Booting into recovery shows the option of applying update from adb, internal memory, sd card etc... so I figured adb might work? But I don't really want to risk it without confirmation since this is my daily drive and don't want to lose app data and such.

Thanks in advance!
[Xperia Z1 Compact Android Development] MSe1969:
I have no experience with Lineage Recovery in conjunction with the Z1c/amami device. I provide builds for the Oneplus 7T Pro, where a fully working TWRP is not available, so there is no choice but using Lineage Recovery - and the option "Apply update" in fact allows the command 'adb sideload' to be executed. It *should* work, but I haven't tried myself, so when you say, the Z1c is your daily driver, I'd rather go for TWRP.
[Xperia Z1 Compact Android Development] MSe1969:
@115ek : Do you know, what is the default, when the ROM is clean-flashed and the dev. options aren't enabled?

Maybe we should default the property persist.sys.recovery_update accordingly in the device config to avoid this? By defaulting the prop, people still have a choice, but this won't happen by accident?

EDIT:

As far as I read the code of UpdateRecoveryPreferenceController.java, the default seems to be "don't update"?
[Xperia Z1 Compact Android Development] 115ek:
Yes. It should be defaulted to "not update recovery". Starting with lineage 18 you'll also be asked for that in the setup wizard (it is also default off there).
[Xperia Z1 Compact Android Development] lm089:
SD card checking on every first login after boot - yes, but only for ~5-10 seconds. In my case it's a 64GB Samsung EVO, approx. 6-7 years old. Probably not really comparable to your 400GB card. But: I never experience my phone / desktop being locked while SD card is being checked.

I'm not an SD card expert but as you write it's ext4 formatted: maybe there's something wrong with access permissions? In the worst case I'd try a backup of sd card contents to PC, then re-format and re-store. Good luck!
[Xperia Z1 Compact Android Development] MSe1969:
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

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

Security String 2021-05-05

System Webview on 90.0.4430.82

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

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

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.
[Xperia Z1 Compact Android Development] 2faraway2:
Two findings after installation the new microG build

Attention magisk users: For all magisk versions > 20.4 the survival script don't work, you will loose magisk / root

I had to go back to version 20.4 in which this script still works

Possible workaround (not tested): Flash the new build manually in TWRP and flash magisk right after the rom

Sometimes the navigation buttons (home, back and current apps) disappear. I couldn't figure out the reason/root cause so far ... Even I recognized this issues also in the elder builds

Anybody observed this too ???

Thanks for feedback
[Xperia Z1 Compact Android Development] 2faraway2:
Another thing, silly question ...

How can I manage to put a specific app (e.g. cam) on the lock screen ? Didn't find anything in the settings ... :unsure::unsure::unsure:
[Xperia Z1 Compact Android Development] tramp20:
I found this in the OP:

ANT+ isn't working?

You need the 2 apps: ....

Does ANT+ really work on our Z1c?
[Xperia Z1 Compact Android Development] 115ek:
Yes, it does.

EDIT: At least I tested reading heartrate data from a ANT+ HR sensor from time to time. And that worked.
[Xperia Z1 Compact Android Development] lm089:
Strange, same boot problems after updating as with the previous 2 verions: always reboots to trwp after installing from Ota. Will try the same as last time

UPDATE:

again tried to follow your hints from the March update (https://xdaforums.com/t/rom-unoffic...1-for-xperia-z1-compact.4007983/post-84656157), incl. full formatting of /data then restoring internal memory etc. Then, after the manual update of this full LOS version I again still end up in that bootloop that finally gets me back into twrp.

I tried to uninstall Magisk 22.1 at various stages in my restore / update flow (first after an update, and then once again before the next update) , but that didn't help either.

Wiped Dalvik multiple times, did multiple SELinux corrections + repair of /data and /system file systems, but I can't get the device to boot into the May update.

Since I already did a complete fresh / clean install back in March I don't feel much like doing that once again.

Instead, I'll stick with the April one for now.

If you want to have some kind of log let me know.
[Xperia Z1 Compact Android Development] tramp20:
Really it works with my Ciclo heart rate sensor in Locus Map pro.

Additionally I can activate the other sensors (cadence and speed) too.

Thank you.
[Xperia Z1 Compact Android Development] MSe1969:
Hmm... Difficult to comment.

Some thoughts:

You use Magisk. Did you flash Magisk from recovery, so a "survival script" has been installed? Or did you use the "patch & flash boot.IMG" method? The former is meanwhile considered obsolete by Magisk docu.

Could that survival script cause the trouble?

Also, seems that most recent versions of Magisk in general cause trouble with our Z1c, there is an open issue right now.

Also, when doing OTA update and using Magisk, it is key that the /data partition is accessible during the TWRP update execution, so never skip the decryption passphrase, in case your device is encrypted.

Also, seems that for older devices not running on the latest Android main version, the newest Magisk versions introduce trouble, so may be wise to stick with an older version.

Last, but not least, it may be an idea to temporarily deactivate all Magisk modules before the update. Also, do you maybe have an app requiring root, which auto-starts at boot? Also a potential troublemaker...

I don't use Magisk myself, just some thoughts - maybe others have any idea?

In my OP7T thread, a Magisk issue could be solved by using a version from Beta channel, but the OP7T has a crazy a/b partition layout, whilst the Z1c most probably requires an older version of Magisk...

Edit: Yes, if you can produce a log, this could always help.
[Xperia Z1 Compact Android Development] lm089:
Many thanks for sharing your thoughts!

Magisk:

yes that was my first thought as well. So what I did after the OTA update failed, and being back at recovery, was to first run a Magisk uninstaller script. Tried to boot back to system, but ran into the same loop.

Next I restored my April build backup, and booted to system to check. Booted back to recovery, ran the Magisk uninstaller, then flashed the update image. Result was the same: no way to boot to system.

Honestly, I currently doubt that Magisk is the root of all evil here. But I may be wrong.

To be honest, I never heard of a "survival script" before. Any way to check whether tat still is there after uninstalling Magisk?

How did I install Magisk? That's been years ago, back then flashing from recovery was the only way known to me, and since then I updated from the Magisk.apk every time there was an update. Right now I'm running the latest version (23), yesterday it was still V22.1

OK, there was my clean flash back in MArch: after I did that I first installed Magisk V20.3, then again ran the updates from Magisk Manager.

I'm not using any modules, so honestly I don't really care whether I use Magisk or not as long as I have a rooted device. Any recommendations? I assume that the old Lineage SU tool is outdated, too.

Else I indeed could try an older version; I still have an old V 18.1 lying around somewhere; you think that's old enough?

The device is not encrypted so that can't be an issue here.

root apps in use: only 2 different file managers, Titanium, Termux + a 2nd Terminal Emulator + Shell - that's all there is in Magisk's superuser list. I don't really think one of them would start on system boot. But who knows?

Finally in regards to a log:

please be patient with me, I'm a complete dummy when it comes to android logs. So: given the fact that my device always boots back to recovery: which kind of log would I then create? Would I get it through ADB while in recovery, or would I use some command from TWRP's terminal, or would I use TWRP's "copy log" tool?
[Xperia Z1 Compact Android Development] 2faraway2:
@lm089:

As stated here all magisk versions > 20.4 are causing trouble (either bootloops or a simply not installed magisk) after the rom update.

So my recommandation would be to stick with 20.4 (with this release you would also be able to do the OTA updates furthermore) ..
[Xperia Z1 Compact Android Development] MSe1969:
What I call "survival script" is the stuff stored in /system/addon.d - please check, whether you find any file there with the name "magisk" in it.

Normally, during an update, the entire /system partition is replaced. This however would mean, that everything, you have flashed via recovery onto the /system partition, like e.g. Gapps, would be lost after an update. Therefore, there is a mechanism within the flash process to execute the scripts in the /system/addon.d directory with a specific parameter, which first copies certain stuff and of course the scripts themselves into a temporary place, then the /system partition is replaced, and then the saved stuff is flashed again (by executing the same script again with a post-install parameter).

Magisk normally does not aim at modifying the /system partition, but it also used to store such a script there, to simply re-patch /boot and restore Magisk. Later versions of Magisk work differently, and if for whatever reason such an old Magisk survival script still is present, it will do the things, which have been meaningful in an older version, but not now. Hence we have a potential trouble maker.

You said you did a clean flash, but did you really wipe the /system partition, too? Or, did you maybe restore your old /system partition via TWRP, which would also restore /system/addon.d with those scripts ?
[Xperia Z1 Compact Android Development] lm089:
No luck either: was able to locate and remove that addon.d script, but it didn't help, i.e. bootloop after next update.

Then after having restored the April build I removed Magisk the official way (through its app). Checked for the addon.d script but that was gone. New update attempt failed again.. Am back at the April build now. Thanks nevertheless

As far as I remember I performed a complete wipe of everything from TWRP back then. I then didn't restore anything from a backup but did a fresh install of your LOS image, then installed a few crucial apps (my preferred launcher + Titanium and finally restored the few needed apps and their data from Titanium. That's how I usually proceed in cases like these
[Xperia Z1 Compact Android Development] MSe1969:
Then I don't have any good ideas any more... - just to be complete: Could you please list the contents of your /system/addon.d directory?
[Xperia Z1 Compact Android Development] 2faraway2:
Recommendation is to flash the latest stock rom via flash tool ( with full wipes ) and start from scratch .. ;-)
[Xperia Z1 Compact Android Development] lm089:
Right now it's 50-lineage.sh + 99-magisk.sh.

That's because I'm now back at the April build, with Magisk V23 installed and running.

Allow me to repeat my previous question: if the recent versions of Magisk are causing such troubles on our old device, then what other root / superuser solution can I use instead?

Nevertheless, as I listed before: the update problems occur no matter whether Magisk is installed or not (if uninstalled I made sure that the addon.d script was gone as well).

Anyways, next thing I'll try is to switch to 115ek's V18.1; that'll be another clean wipe and a fresh installation, then I'll see what happens. Thanks for your patience, once again. And: any ideas are still welcome!
[Xperia Z1 Compact Android Development] MSe1969:
OK, then we can forget about this being the trouble maker.

Unfortunately, I am not aware of any other current opensource root solution, which works on LineageOS 17.1.

There must be anything specific with your device - I always test the stuff before publishing and nobody else has complained either.

Just to be sure: When you make a full nandroid backup of your current April setup in TWRP (because you would like to get back to that state), then you wipe all of the following: system, data, cache & dalvik and flash the "naked" variant A, and you really

don't

install/restore anything else (even if you are 100% sure, that it won't have an impact) - does it boot properly [Y/N]? That should be the starting point...

(And sorry if I insist on this, you maybe did exactly that already)

Whatever will help you is fine, if it is to continue with 18.1, then 18.1 it is - but please first do, what I suggested in the previous section.
[Xperia Z1 Compact Android Development] lm089:
Hmm - I usually just restore a nandroid without previously wiping everything. Because the terminal output during the restore tells that it's wiping partitions I never felt that was necessary. But if you think that wiping before restore would make a difference I could try that.

One more thought: before March I never had trouble updating, OTA or manually. And with March and April builds I managed to update after some trouble. So something must have changed, whatever that is.

Btw: I'm fully aware that the current situation is very specific, never had any doubts in regards to quality of this ROM.
[Xperia Z1 Compact Android Development] MSe1969:
No, what I mean is really to do as I have described: Wipe everything, install the naked ROM and DON'T restore anything. Does it boot [Y/N]?

If it boots (which I am quite sure), the root cause is to be found in some stuff, which you restore. If it doesn't boot, there is a bigger issue...

As indicated, I have the suspicion, that you always somehow "restore the thing causing the trouble"...

So my idea would be to choose the following approach (of course, verify after each step that all is fine):

- Wipe everything (but DON'T format the /data partition, because you still need the internal memory)

- Install the naked ROM (and Gapps, if this is part of the game)

- Connect via adb root + adb shell and check, that on your Internal memory, the Magisk directories are really purged

- Install Magisk from scratch

- Install Titanium

- Step by Step restore the apps via TB, which you need - but only those, where installing from scratch would be inconvenient

- . . .
[Xperia Z1 Compact Android Development] MSe1969:
That's a drastic step - this would be my recommendation, if my advice to do the "wipe all and install the naked ROM" wouldn't succeed . . .

But see my last post, there is still hope ;)
[Xperia Z1 Compact Android Development] lm089:
Good task for the next rainy Sunday afternoon 😉🌧️
[Xperia Z1 Compact Android Development] lm089:
Please understand that I don't "Like" this :p (I'll try different means first)
[Xperia Z1 Compact Android Development] 2faraway2:
Jipp, I can imagine that's a lot of work, but imho the only way to be sure to have a clean basis.

But nevertheless if I were you I first would try @MSe1969 's suggestion ;)
[Xperia Z1 Compact Android Development] lm089:
Yes, it does boot: I made a separate backup of internalMemory first, then did a complete wipe incl. formatting /data. Flashed the may build and booted without any problems.

So I felt lucky:

restored my latest Nandroid (i.e. April build), booted to system

uninstalled Magisk from the Magisk app, rebooted to system to make sure that everything was alright; checked for any leftover Magisk folder or scripts, couldn't find any

rebooted to recovery, formatted /data (still had my InternalMemory backup, rebooted to recovery to be sure

booted to system where of course I had to re-setup the device

restored my InternalMemory backup, not before checking it thouroughly and removing anything that could be related to Magisk, then rebooted to recovery

flashed the May build, tried to reboot to system - and again I ended up in a bootloop

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
[Xperia Z1 Compact Android Development] MSe1969:
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...
[Xperia Z1 Compact Android Development] lm089:
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
[Xperia Z1 Compact Android Development] tramp20:
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 :-(
[Xperia Z1 Compact Android Development] lm089:
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
[Xperia Z1 Compact Android Development] tramp20:
Fine :-)

But if you want to ugrade to LOS 18.1 you definitively have to use Magisk >21.x and then you need to patch Magisk.zip too.
[Xperia Z1 Compact Android Development] android666:
hello 115ek, MSe1969. could you please include AA support into future images, if it's not too complicated ?

GitHub - dylangerdaly/android-auto-stub: Android Auto Stub

Android Auto Stub. Contribute to dylangerdaly/android-auto-stub development by creating an account on GitHub.

github.com

[ Feature Request ] : Android Auto Support · Issue #897 · microg/GmsCore

Installed : Google App / Google Maps / Android Auto Launched Android Auto Stuck at Android Auto launcher. Below are the logs : 07-21 00:12:25.191 16269 16305 I MicroDetectionWorker: #startMicroDete...

github.com
[Xperia Z1 Compact Android Development] 115ek:
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. :)