yashsingh1/xdaforums huggingface dataset:
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] Rrreutel:
Great to see new builds! I've done a personal LOS20 build where I have Charging Control (LOS name for the stock Smart Charging feature) working on XZ1C. Not just the UI, charging actually stops when it's supposed to. Really nice to have that feature back. (Not my work, but adapted it slightly for Yoshino) I'll test some more on my daily driver, and make a Pull Request if it looks good. It allows to select a hard limit (don't charge over 70-90%), or a customizable schedule, e.g. when plugging in a charger after 22:00, charge to 80% first, then stop and have a full charge done at the set target time (e.g. 06:00).
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] derf elot:
so does that differ in any way from how I implemented it for yoshino in 1.2 ( https://github.com/whatawurst/android_device_sony_yoshino-common/pull/97/commits/9d2880207619776820ddc85dc9cf6b56d1a723a4 )? from my limited tests it also stops charging properly.
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] Rrreutel:
Ah, I hadn't seen that you had your own PR ready. To be clear: you mention you've implemented it for 1.2, do you mean it's already included in your recently uploaded 1.2 version?

My version is very similar (adapted from here). Only difference is that you have a separate config/init/ueventd.yoshino.rc file, I added the entry from there directly to the existing ueventd.rc .

Yesterday I noticed a a smaller bug in the hal topic (the start time and the target time were interpreted as UTC time, causing the actual times to be 2 hours off in my UTC+2 region), it's fixed now, just tested it.

Still I'm not sure if the feature works completely as intended on our device, e.g. I think there's a separate red battery statusbar indicator icon which is supposed to be shown when charging is suspended. In our case the icon just stays white with charging bolt (even though it has actually paused charging). That icon did appear when I configured to use

/sys/class/power_supply/battery/charging_enabled

instead of

/sys/class/power_supply/battery/smart_charging_interruption

But using that node charging started jittering when the limit was reached (charging control turning charging off, and charging service turning it back on because a charger is connected).

Anyway, the statusbar icon is hopefully just cosmetic, most important is we can now stretch the life of our older batteries a bit further!

edit: smart_charging_activation->smart_charging_interruption
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] Rrreutel:
To remove confusion about the Charging Control feature: it's mentioned in the changelog for XZ1, so it's indeed already included in @derf elot s latest 1.2 release for lilac as well. Great!

One bug that's probably still in there I mentioned above: the start time and target time you enter are interpreted as UTC time, so if you're in UTC+3 and you like to set a target time of 07:00am, you probably have to enter 04:00am in the settings. The charging control notification will then display 07:00am.
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] Dfis:
Hello.

The microphone is a very low volume on normal calls but ok on Speaker mode...

Does anyone else experience a similar issue?
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] Maflo:
Same...
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] Dfis:
I tried to install stock image but still the same behavior... Maybe the root caused a damage to the microphone's config...

Does anyone know how to solve this?... Maybe Magisk module?
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] ninjy:
Hi,

I flashed twrp-3.6.2_12-0-20221002-lilac, but it seems to getting stuck on the logo.

Or it is normal it may take forever to load the UI ?

twrp-3.3.1-0-lilac-android10-1 from TWRP recovery is working fine
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] 4qx:
Does Magisk work okay for everyone? I updated to lineage 20 v1.2, reinstalled Magisk v 26.1, and it simply has no effect on apps
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] Danko Jones:
Really looking forward to the next LIneage4Microg update with battery care options. Many thanks in advance @petefoth ! :)
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] petefoth:
:)

Well the ROM is uploaded to AndroidFileHost

lineage-20.0-20230529-4microg-UNOFFICIAL-lilac.zip

It includes the 'LineageOS "Charging control hal" for battery charging care' code, but I can't see any UI for smart charging or battery care. Maybe it is waiting on upstream changes in LineageOS. Anyway, the build runs, does include the MicroG code, and location seems to work, so enjoy! :)
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] petefoth:
I really want to get IodéOS working with the lates code, but it wont be happening unless someone can give me a clue how to go about fixing this build error. Pretty please...
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] Rrreutel:
In order to get complete functionality you need to do 2 things before building:

1) pick the LOS HAL topic:

$ cd <LOS repo root dir>

$ repopick -t charging-control-hal-20

2) pick this PR from the whatawurst Yoshino-common device repo:

yoshino-common: Build lineage health HAL and related sepolicies by derfelot · Pull Request #97 · whatawurst/android_device_sony_yoshino-common

Change-Id: I1ca5f25f3a2d8734647b9cc0ff4885b0b817c6ad

github.com

The name of the feature in Settings is 'Charging control', you can use Settings search feature, or find it listed in the main Settings->Battery page.
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] Rrreutel:
Don't have a solution for your issue (and have never built IodéOS), but maybe this helps a step:

As your log shows, the failure occurs when running the checkvintf tool, invoked from check_target_files_vintf.py. The checkvintf tool is built from <root>/system/libvintf/check_vintf.cpp, its main() function is supposed to return 'compatible' (as it does with your other succesful builds). The invocation (the set of commandline parameters) is exactly as with the successful builds, so that's not the problem.

Error code 70 from your log means EX_SOFTWARE (as per sysexits.h: #define EX_SOFTWARE 70). This code is returned from checkvintf if it cannot determine either 'compatible' or 'incompatible'. You could check your log to see if it includes the error message from checkvintf which according to the check_vintf.cpp sourcecode should look like:

<log metadata like datetime>ERROR: <error code>: <some error description>

So search for "ERROR: " The <error code> might not be equal to 70 in this log line)

Maybe that error description gives some more info. Errors could include:

- No device HAL manifest

- Depricated HAL's

- Unused HAL's
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] petefoth:
That's it - the log contains this

Unable to print HALs from new FCMs: no device HAL manifest.
ERROR: No such device: No device manifest file from device or from update package
No device manifest.
No device HAL manifest: No such device

But before that we have

getDeviceHalManifest: -2147483648 VINTF parse error: Cannot add manifest fragment /vendor/etc/vintf/manifest/android.hardware.usb@1.0-service.basic.xml: HAL "android.hardware.usb" has a conflict: Conflicting major version: 1.0 (from /vendor/etc/vintf/manifest/android.hardware.usb@1.0-service.xml) vs. 1.0 (from /vendor/etc/vintf/manifest/android.hardware.usb@1.0-service.basic.xml).
Check whether or not multiple modules providing the same HAL are installed.

And looking in `out/target/product/lilac/vendor/etc/vintf/manifest' there is an old file `android.hardware.usb@1.0-service.xml` from an earlier build alongside the current `android.hardware.usb@1.0-service.basic.xml`

I'll clean up and rebuild - thanks for your help
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] petefoth:
Thanks for that. I make my LineageOS for microG builds using Docker. I could try and make a shell script to do all that before starting the build, but I think it's too complex for my shell coding skills, and I'd probably do it wrong anyway. The charging control functionality can wait util the code makes its way into the LOS and `yoshino-common` mainline code. (@Danko Jones - sorry - you'll have to wait ;) )
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] Danko Jones:
No problem. ;)

Other than that I successfully dirty flashed the updated microg rom and it's working perfectly for now. Thanks again for your effort!
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] petefoth:
So my IodeOS build succeeded after cleaning up the `out/target/product/lilac/vendor/etc/vintf/manifest` directory. This is what I use on my daily driver so I flashed it and started using it.

However, after a few days use on my daily driver, I noticed that the battery performance is badly degraded with this IodeOS build. The previous build would easily last a whole day, even with quite heavy use, Typically with ~20% or 30% left when I put it on charge before going to sleep. This build is running down to ~10%-15% by late afternoon / early evening with only light use. With heavy use it is likely to run out sometime in the afternoon.

I really need my phone to last a whole day, so I 'downdated` to me previous build, which does not have the smart charging changes. ( I 'dirty flashed the old build over the newbuild with no problems. I was concerned that it might not work so I did a TWRP backup **and** backed up using ABRT before I dirty flashed, but it seems that was not necessary for me at least).

I would be interested to know if the latest Lineage for microG build has the same problem
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] Danko Jones:
Yes, I noticed the same with newest build. I wasn't sure if the problem was on my side. Thanks for letting me know. I'll also downgrade to previous version. Other than that everything has worked fine so far.
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] Rrreutel:
My personal build with microG (from May 16) is fine wrt battery.
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] petefoth:
That's useful to know - thanks. For now, I'm using my spare phone, running my previous build, as my main phone. I'm investigating the charging problem on my daily driver.

The current suspect is an update to Aperture: looking at Battery ussage showed it using a lot of battery, even though had hardly used it. on IodeOS, I use Iode's own build of Aperture from their F-Droid repo
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] Schorschi88:
Can someone help me please?

In the 1.1 build everything but the GPS worked fine.

Now i installed the 1.2 Rom and now the Gapps don't work.

I tried different Gapps, it didn't change. I always get the 'you are offline' error message.

Best regards
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] Rrreutel:
Interesting, sounds like a suspect app indeed. You could also check logcat, if I understand you correctly that you've included some part of the charging control feature changes, there might be constant attempts to -unsuccessfully- start/use a service, maybe that consumes some extra battery as well. I'd either include the feature properly in your build or not at all.
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] petefoth:
I didn't do anything special to include it. I just built with the latest code in the `Whatawurst` repos, as I always do. I thought those repos included some upstream changes to smart charging in this pull request. Looking at that PR again, I see this comment which says

So it seems the changes are not i my new build, so can;t be blamed for any battery problems :) I'll keep you informed of the outcome of my tests
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] Rrreutel:
Right, it's just a PR right now, not part of the los20 branch yet. If you're making another build, consider doing a fresh build (with empty 'out' folder), just to be sure. (Sounds suspect that you had to clean up a manifest subdir deep in the 'out' tree to make the build even succeed, why risk similar quirks)
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] petefoth:
TL:DR

there is no battery drain problem with the latest build: battery use is roughly the same as in the previous build;

issue was almost certainly a rogue app

After a few days running the old build on my backup phone (and using it as my main phone), running the new build on my daily driver, and monitoring battery discharge rates using BatteryBot Pro, it became clear that there is no problem with the new build. Batter discharge rates are similar in both builds.

I assume - because I have not been able to reproduce the problem - that the initial issue was caused by the Aperture app getting itself in a state and eating a lot of power. The app seems to run OK now in normal use.
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] decsimon:
Hello everyone , is there a possibility in lineageos 20, without root with magisk, to have the brightest led flashlight? Maybe via twrp flashing a zip file?
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] lossen1:
Same for me, not tested in speaker mode but all my callee complained about my very low voice volume.
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] decsimon:
In my experience no one has complained of microphone volume issues during calls
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] decsimon:
Yes, flashing this file: Flashlight_brigtness_fix_250mA_Android_9
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] k_basara:
Maybe a dumb question, can I flash this rom on Japanese version (SO-02K), assuming it's unlocked?
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] Purplearyes:
Ye brother. Done it
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] k_basara:
Did you spot any issues with it, unstable, battery drain, heating, or something else?

Thanks.
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] Purplearyes:
No, on the contrary, for some reason, the Pie variant of Docomo, comes extremely battery optimized (can't be sure if it's the Pie firmware or the hardware itself), and thus it runs smooth as butter, superb battery, everything working.

(I myself am on a long run of testing between 9-10, because 10 roms have a big hit on battery life compared to Pie. I'm having a headache with this. (Also bc i want stock cam)
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] k_basara:
Okay I now have LOS20.0 on my unlocked SO-02K.

I found that when set to auto, the screen brightness of LOS20.0 on both of my XZP (G8142) and XZ1C (SO-02K) tend to be too high. How can I make the brightness level lower when auto adjust is on?
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] k_basara:
I flashed LOS20.0 on my Docomo XZ1C, with stock 9.0 TWRP (the one provided in this thread wont work for me), everything looks fine as of now except for some minor issues like the screen brightness one.
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] petefoth:
With my more recent builds (of IodéOS and LineageOS4microG) for `lilac`, I started to encounter the mobile data problems that have been reported previously on LOS-based ROMs for this device . Specifically, some sites and some apps which access the internet were working fine when connected via WiFi, but failing or timing out when connected via mobile data, even though the phone was showing a good 4g connection.

My network provider is [Your Co-op](https://broadband.yourcoop.coop/mobile/mobile/), a UK MNVO which uses the EE network

The 'fix' that worked for me was to edit the `EE Internet` APN, changing `APN typ`e to `default` instead of `default,supl`. (I recall that I had to ***add*** the `,supl` a couple of years ago to fix a similar problem). I don;t know ***why*** the problem started to occur for me, or ***why*** the 'fix' works, but my experience might help others who are encountering a similar problem.
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] petefoth:
A new unofficial build of LineageOS4microG (using the code from this ROM) is available on AndroidFileHost

Boot and recovery images are available in the same directory if you need them. I don't - I use TWRP to flash the ROM zip file
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] Danko Jones:
Dirty flashed newest build with twrp without problems. Rom is working great so far. :) Also battery care feature is now included.

Any reason why microg version is still on 0.2.27 and not on current version 0.2.28?
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] petefoth:
Because that's the latest version in the lineageos4microg android_vendor_partner_gms repo. You can update it to 0.2.28 in F-Droid.

There's a PR to merge 0.2.28 but it hasn't been merged yet. I'll look into getting that merged
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] multiwirth:
Hi there,

Had anyone here luck using the Hi-Res output?

It seems like a regression - Poweramp could do 192khz 24bit in lineage-19.1 but now fails to initialize the Hi-Res output in almost every possible case.

Sometimes when replugging the headphones a million times, it will eventually do 48khz 24bit but that´s still not the "proper thing".

Seems like it´s broken or not entirely implemented in lineage-20.

Otherwise I´m very happy :)

Thanks for all the hard work!

Any chances to get this working though?

Login attachments (seems like it took a full log, audio related messages start somewhere at the bottom)
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] Arcline:
I really like the new build.

By the way, how is charging speed for everyone since 1.3?
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] wellwell999:
sometimes
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] Stix96:
Love the rom, great work! The only issue i found is I were not able to add my credit card to google pay. I rooted with magisk since without it the device did not pass safetynet check. Anybody else with the same issue? Somebody has a solution? Thank you!
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] anarki@butterblume:
@petefoth using your 20.0 build I experience a lot of microphone feedback noise during phone calls with wired headphones. Flamefire found this to be a driver bug that needs manual patching since the kernel won't include a fix. Would you apply the patch to your build as well?
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] petefoth:
My 20.0 builds don't use Flamefire's sources, they use the `whatawurst` github repos. I no longer make 18.1 or 19.1 builds so I don't keep my eyes on Flamefire's github repos.

I know that Flamefire usually pushes his source changes to Whatawurst, and they usually get merged. I'll pick up any fix if and when when it gets merged. I don't have sufficient knowledge or expertise to start trying to apply a patch from one repo to code from another repo. Sorry!
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] petefoth:
I did a couple of 'quick and dirty' tests, on both a testphone running my latest LineageOS4microG build (lineage-20.0-20230712-4microg-UNOFFICIAL-lilac) and on my daily driver running my latests IodéOS 4 build (iode-4.2-20230710-lilac).

Neither showed any sign of feedback, but I was using audio headphones with no microphone (because those are the obly wired headphones I own), so using the device microphone. Maybe a problem only on wired headsets with a microphone.

Which version are you running?
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] anarki@butterblume:
Yes, the feedback applies with external micropone only.

Here is the corresponding thread at github. Derfelot merged two weeks ago, so probably your recent build should already include the fix. Hmm.

CIP -st41 & ASB 2023-06 patches by Flamefire · Pull Request #91 · whatawurst/android_kernel_sony_msm8998

I merged the latest CIP tag and picked the 2 relevant Qualcomm commits for the 2023-06 ASB from CLO. The ASoC one had a conflict which pointed me at the 3 asoc commits which look reasonably enough ...

github.com

I'm using your recent build 20230712.
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] NihilsSkulptur:
Thanks for the great work providing an up-to-date ROM for this phone! I'm using the latest microg build and loving it!!

My only question is about adoptable storage, which is not presented as an option to me when I insert the external SD card. Is that an issue with the ROM or with my sd/formatting or other?
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] petefoth:
I believe that the option is disabled in the ROM, because adoptable storage is very buggy and unreliable in recent android versions. I can't find any reliable references to confirm that though
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] dvdkon:
I had the same issue after flashing stock firmware and then the TWRP from this thread (which worked only from Windows, but that seems like a Sony problem). Starting an ADB shell in the recovery and running logcat showed it trying to repeatedly start some service:

07-28 10:47:16.524 590 1646 I servicemanager: Tried to start aidl service android.system.keystore2.IKeystoreService/default as a lazy service, but was unable to. Usually this happens when a service is not installed, but if the service is intended to be used as a lazy service, then it may be configured incorrectly.
09-14 10:15:22.851 0 0 E init : Control message: Could not find 'aidl/android.system.keystore2.IKeystoreService/default' for ctl.interface_start from pid: 590 (/system/bin/servicemanager)
07-28 10:47:17.014 592 592 W HidlServiceManagement: Waited one second for android.hardware.keymaster@3.0::IKeymasterDevice/default
07-28 10:47:17.014 589 589 I hwservicemanager: Since android.hardware.keymaster@3.0::IKeymasterDevice/default is not registered, trying to start it as a lazy HAL.
07-28 10:47:17.014 592 592 I HidlServiceManagement: getService: Trying again for android.hardware.keymaster@3.0::IKeymasterDevice/default...
07-28 10:47:17.015 589 1647 W libc : Unable to set property "ctl.interface_start" to "android.hardware.keymaster@3.0::IKeymasterDevice/default": error code: 0x20
09-14 10:15:23.342 0 0 E init : Control message: Could not find 'android.hardware.keymaster@3.0::IKeymasterDevice/default' for ctl.interface_start from pid: 589 (/system/bin/hwservicemanager)
07-28 10:47:17.015 589 1647 I hwservicemanager: Tried to start android.hardware.keymaster@3.0::IKeymasterDevice/default as a lazy service, but was unable to. Usually this happens when a service is not installed, but if the service is intended to be used as a lazy service, then it may be configured incorrectly.
07-28 10:47:17.524 599 599 W ServiceManager: Waited one second for android.system.keystore2.IKeystoreService/default (is service started? are binder threads started and available?)
07-28 10:47:17.524 590 590 I servicemanager: Since 'android.system.keystore2.IKeystoreService/default' could not be found, trying to start it as a lazy AIDL service
07-28 10:47:17.525 590 1648 W libc : Unable to set property "ctl.interface_start" to "aidl/android.system.keystore2.IKeystoreService/default": error code: 0x20

I "fixed" this by formatting userdata:

umount /data
make_f2fs /dev/block/by-name/userdata
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] alesimattia:
Me too! Big issue IMHO

Except for this this OS is great! Very fast and clean
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] Arcline:
For that you need Magisk, Universal SafetyNet Fix and Shamiko modules, then put Google Wallet/Pay in denylist but DONT turn the "enforce deny list" option on. Should work.
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] compactifier:
I have encountered a problem with the German app Postident. It complains the device is rooted although it isn't, and stops.

Occurs with Lineageos 20 1.2 and 1.3, no matter if clean or dirty imstalled.

Not happening with Lineageos 18 or 19.

Anything else incl. all banking, signing etc. apps runs well with all roms.

Any idea what that Postident app mistakes for root in 20 ?