yashsingh1/xdaforums huggingface dataset:
[Xperia Z5 Compact Android Development] 1ggn3:
I just tried this, with a 5V/2A charger and a rubber case. Starting from around 30%, the phone battery heats up, but keeps its temperature at around 42°C. If I remember the thermal throttling debate correctly, that is quite warm, but still okay for the battery. As soon as it hits 43°C, it limits the charging current from 1,9A to 0,7A and less (while also throttling the cpu).

This shows that the thermal limit is working as intended, so I wouldn't worry about overheating. You can check this for yourself, there are lots of apps that show the battery temperature and current. Also, I've had this phone with its battery since 2016, and it's still working well, so the temperature limit seems to be fine.
[Xperia Z5 Compact Android Development] Berni-0815:
Please don't be angry, but I'm hearing about this or any other issues that I've never seen at my device! I really don't know what you and others are doing wrong, but if all these things are working at my device, I don't think, that those issues are caused by my ROM.

For example:

My camera app is focusing as expected.

My sensors are all working as expected.

My device doesn't get hot.

My battery lasts very long.
[Xperia Z5 Compact Android Development] Berni-0815:
Please take a look at this post and this post too (as an addition to first mentioned post).

Maybe this fixes one or perhaps all those weird issues?
[Xperia Z5 Compact Android Development] :
The camera not focussing properly is true, maybe it doesen't happen with far subjects but if you try to take a picture at a text for example, it's impossible. When you tap the screen it will focus properly for half a second and then go back to blurry, this doesen't happen with camera apps that work at full res.
[Xperia Z5 Compact Android Development] 1ggn3:
Can't talk about that, my camera is broken (in hardware, dropped one time too often) ;)

What Berni said sounds good, I only had something similar when I played with Ubuntu touch and was too careless with the 'dd'. Sensors work fine on my phone, if they don't work on yours, something on your flash got erased. IIRC it helped to re-flash the stock rom.

It gets exactly as hot as designed - all modern phones use some thermal throttling, and as I said in my earlier post, it perfectly works in this rom.

I know, probably my fault.. I'm going to wipe /data as soon as I have some more time, I'm pretty sure that should do it.
[Xperia Z5 Compact Android Development] Berni-0815:
Yes. I've only tested far objects.

What makes you think that 8,3MP is not full res of the sensor? I've read somewhere (I don't remember where), that 8,3MP is the maximal possible physical res of the built-in sensor.

I think that other camera apps are using another way to focus.

But it's useless to discuss that; I can't change it unfortunately.
[Xperia Z5 Compact Android Development] beflythis:
I'm also experiencing the "focus / then out of focus" bug with cameras and would love more info on how to manually set focus distance. Is this simply just setting "manual focus" vs auto focus?

Separately, anyone else experiencing laggy video in preview and playback? appears as ultra low framerate / not smooth.

All that said, I did a stock wipe and full re-install with new Gapps and everything else working brilliantly!

-power consumption back to normal

-no issue with gapps or android auto (I had a nightmare with compatibility and getting my car to work with the last few versions)

-other than camera focus issues and laggy video, everything else like BUTTER.

Once again, awesome work and thanks for the continued efforts.
[Xperia Z5 Compact Android Development] :
try with close ones then, you will see the problem.

[/QUOTE]

it doesen't matter if it's interpolated or not, it still technically outputs a 23 mpx image... i'm not talking about what the sensor can and can't physically do, it doesen't matter here.

The difference is that when you use camera apps that can take 23 mpx images and are built to work with this phone, the pictures are way better and there are no focus issues, apart from the viewfinder not working. So clearly there is something that makes the camera crippled when it's used at the standard 8 mpx that apps use by default.

I think they don't, i think it's the camera driver that decides how to focus.

All 8 mpx camera apps have the same poor focus issue. (unless you use one that lets you manually adjust the focus slider, which is not ideal)

The 23 mpx cameras however, don't. They work perfectly like they always have, taking full advantage of the sensor's capabilities.
[Xperia Z5 Compact Android Development] litelinux:
A little off topic... but does Ubuntu Touch work with this device? Hadn't seen it anywhere.
[Xperia Z5 Compact Android Development] Aeny:
Just going to add my two cents here,

when using OpenCamera (limited to 8mpix) the focus slider sometimes seems to be working inverted from its intended behavior, I don't know what triggers this inverted slider but there must be something. If I don't use the manual focus then the pictures never come out right for me anyways.

Another thing I notice is when just tapping the screen and seeing the app go through the focus points rapidly then there's a moment where it's very sharp, yet it never seems to pick it that focus for the picture. I never can seem to get it as sharp with the manual slider either. Keep in mind that it might also just be an issue with this particular app and/or my camera.

Normally i wouldn't care very much about this sort of thing, blurry camera whatever. But in this case it starts to become a problem when scanning QR codes and things of that nature in for example a banking app where there's no manual focus sliders.

I'm grateful that the camera works already at all, thanks for the hard work Berni and team :)
[Xperia Z5 Compact Android Development] Berni-0815:
You're right. But currently I can't fix it.
[Xperia Z5 Compact Android Development] danielski_234:
Only solution in Open Camera for shooting close things (e.g. text) seems to shoot in manual mode with slider, for me that works (no issues with inverted slider). Nice that OC remembers the focus range once set, so you can switch quickly to manual for close shots.

On Snap it happens also, but not constantly. First i thought it depends on lighting conditions, but it doesn't (always).
[Xperia Z5 Compact Android Development] Berni-0815:
Please explain for everybody here how to enable this manual focus.
[Xperia Z5 Compact Android Development] esrevinu:
I have a problem with recording sound. Except for some apps, recording apps

including Google voice typing cannot record sound. Nothing or noise only is

recorded. Google assistant and Google recorder works properly.

I just found out this problem is related to FM radio. If FM radio app remains in

background, recording works. But if FM radio app is removed from memory,

recording does not work.

I guess that the default audio routing is in a wrong direction, and then FM

radio app corrects that routing.

For me, FM radio app did not work on LOS 14.1. I could hear only the same noise

as some recording app records now. With LOS 17.1, the case is similar, but if I

remove FM radio app from 'recent apps' when the tuner is running, and then

re-launch it, it works.

Don't you have these issues?
[Xperia Z5 Compact Android Development] danielski_234:
1. switch to Camera2-API (launch Open Camera -> open settings (gearwheel menu on preview screen) -> scroll down to "Camera-API" -> in there switch to Camera2-API); go back to preview screen

2. back on preview screen, open the three-dots-menu, switch to "m"

I've had some trouble after trying some settings and then deleting Open Camera's cache and memory. After that only continous focus worked, didn't matter to what i switched, slider of manual focus also had no effect. Deinstallation and a new installationen of Open Camera worked, now it's ok again.

*Edit: Once you switched to Camera2-API, you can leave it so, so step 1 has only to be done once. I can't notice any errors due to that.
[Xperia Z5 Compact Android Development] 1ggn3:
I never noticed laggy videos, as far as I remember, for me both Youtube and other clips work just fine. What app/site is lagging for you?

Not really. It is more like a tech demo, and since the phone is quite old, I think there's not enough interest left to fix things now. It boots and runs okay, but some core functions like cell radio or bluetooth just don't work.

If you want to play around for yourself, you can start here:

[device-port] [kitakami] [kitakami_sumire] Sony Xperia Z5 and other devices with that platform · Issue #44 · Halium/projectmanagement

Local Manifest: tbd Progress fix up mount points (sumire only and needs verification with most recent kernel) fix sdmmc detection in kernel startup fix kernel config (sumire only) build hybris-boot...

github.com

If you want to try out UT, it's probably better to simply buy a supported phone on ebay, though ;)
[Xperia Z5 Compact Android Development] danielski_234:
Here stock Lineageos recorder app works as it should, others i cannot say.
[Xperia Z5 Compact Android Development] udaemon:
there's an app in f-droid called AccA; it controls the current when charging and pauses charging to prevent the battery from getting too hot. I'd recommend to try this out, works pretty well here. but I have to say that I didn't observe these kind of problems with the battery of my z5c. the problem you describe is probably due to some hardware or software error.
[Xperia Z5 Compact Android Development] udaemon:
can you please provide a link to the version of HTC camera that works for you? I tried two versions - 7 and 9 - of which the former works but doesn't offer any settings on the resolution and the latter (v9) doesn't start up.

and what are other camera apps working for 23mpx cameras?

thanks!
[Xperia Z5 Compact Android Development] sabotage154:
does anyone know how to make flashlight/torch work on this rom? for some reason flashlight/torch is not working for me. not a hardware issue because it works on stock and also on los 17. thank you

***sorry i posted on wrong thread, i will post in correct thread,
[Xperia Z5 Compact Android Development] esrevinu:
Thanks for checking.

For me, the stock recorder app does not work.

So, it looks like gapps changed something.
[Xperia Z5 Compact Android Development] :
8.50.876780
[Xperia Z5 Compact Android Development] esrevinu:
I have solved this issue by modifying audio_policy_configuration.xml. There are two files with the same name under two different directories, 'system/vendor/etc' and 'system/vendor/odm/etc'. The contents of both files are exactly the same. I am not sure which one is used, so I modified both.

diff -u audio_policy_configuration.xml.vendor.etc audio_policy_configuration.xml.modified
--- audio_policy_configuration.xml.vendor.etc 2020-12-28 06:08:54.249092307 +0900
+++ audio_policy_configuration.xml.modified 2020-12-28 07:26:39.245178787 +0900
@@ -125,7 +125,7 @@
<profile name="" format="AUDIO_FORMAT_EVRCNW"
samplingRates="8000,16000" channelMasks="AUDIO_CHANNEL_OUT_MONO"/>
</mixPort>
- <mixPort name="primary input" role="sink" maxOpenCount="2" maxActiveCount="2">
+ <mixPort name="primary input" role="sink">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO,AUDIO_CHANNEL_IN_FRONT_BACK"/>

Edit: This fixes my FM radio issue too.
[Xperia Z5 Compact Android Development] Berni-0815:
Weird!
[Xperia Z5 Compact Android Development] H4NNE5:
Exactly the same here! :(

Problem occurs with built-in camera app and OpenCamera.The behavior is correlated to the recording resolution.

When I reduce the resolution, the preview gets less laggy. But during recording the screen preview gets laggy again for both, front and rear camera.
[Xperia Z5 Compact Android Development] esrevinu:
I found another bug. If 'Control playback' is on in 'Settings>System>Buttons>Volume buttons', I cannot adjust the volume when the screen is off. This is not specific to z5c, but I cannot report it to Lineage OS team since this build is not official.

I can fix this bug by patching 'lineage-sdk':

diff --git a/sdk/src/java/org/lineageos/internal/buttons/LineageButtons.java b/sdk/src/java/org/lineageos/internal/buttons/LineageButtons.java
index 70c5657..e781adb 100644
--- a/sdk/src/java/org/lineageos/internal/buttons/LineageButtons.java
+++ b/sdk/src/java/org/lineageos/internal/buttons/LineageButtons.java
@@ -120,6 +120,9 @@ public final class LineageButtons {
KeyEvent newEvent = new KeyEvent(KeyEvent.ACTION_DOWN, keyCode);
MediaSessionLegacyHelper.getHelper(mContext).sendVolumeKeyEvent(newEvent,
AudioManager.USE_DEFAULT_STREAM_TYPE, true);
+ newEvent = new KeyEvent(KeyEvent.ACTION_UP, keyCode);
+ MediaSessionLegacyHelper.getHelper(mContext).sendVolumeKeyEvent(newEvent,
+ AudioManager.USE_DEFAULT_STREAM_TYPE, true);
}
break;
default:
[Xperia Z5 Compact Android Development] Berni-0815:
Do you have a link to this patch?
[Xperia Z5 Compact Android Development] esrevinu:
No, I don't. But that diff inserted in my previous comment is all. This diff is made by git-diff commend. This can be apply to 'lineage-sdk' directory(checkout of LineageOS/android_lineage-sdk) under Lineage OS source root.
[Xperia Z5 Compact Android Development] Berni-0815:
I've changed this file: Klick

I hope this will help.

BTW:

Happy new year! 🥳
[Xperia Z5 Compact Android Development] Berni-0815:
Are those changes (or the idea behind it) from you? Or have you seen that somewhere? I'm asking because I would like to understand where it comes from.
[Xperia Z5 Compact Android Development] cdannebe:
Hi Berni,

I installed your latest 17.1 image (from 15.12.2020). I reflash the image twice in the last 3 weeks (I cleaned up everything I could find in TWRP). The result is the same. I have about 4% battery loss per hour (even if the display on for not more than 10 minutes per day, WLAN off, BT on, no social network app installed). With the same apps installed and similar configured in 14.1 LOS I had about 2%/hour.

By the way, if I shutdown the phone completely and I charge it, the temperature grow up to more than 50°C on the display surface. That's seems to be too much. What can I do?

Christian
[Xperia Z5 Compact Android Development] esrevinu:
Yes, it is from me. I have built a rom from your settings to fix my issues.
[Xperia Z5 Compact Android Development] 1ggn3:
Same here, erasing /data did not improve things for me. Maybe I need to re-flash everything from the Sony tool in the "green led mode". I don't have enough time right now to re-install all the apps I need, but that's all I can think of.

see my post here

tldr: If you charge the phone, try measuring the battery temperature with an app than can read the sensor values, they should stay well below 45°C. If they don't, your phone has a problem, otherwise it's just charging with as much current as the battery can take without damage.
[Xperia Z5 Compact Android Development] Berni-0815:
That's way too much! I am now at a loss ...

Have you tried to rewrite your /persist partition?

restorecon -RF /persist

I really don't know. Is the device getting so hot in normal (active/powered up) mode too?
[Xperia Z5 Compact Android Development] Berni-0815:
Cool! Can I use this code? Of have you tried to submit your fix to the LineageOS team?
[Xperia Z5 Compact Android Development] cdannebe:
... no, in normal mode the charging work as expected.
[Xperia Z5 Compact Android Development] Berni-0815:
Hmm. Never tried to charge my device in shutdown state...
[Xperia Z5 Compact Android Development] 1ggn3:
Oh, you talked about charging the phone while it's powered off, sorry.

If I remember correctly, it should boot into charge mode, which is just the kernel and a simple binary to show the progress. As far as I understand it, that should be enough to manage the charging current, right?
[Xperia Z5 Compact Android Development] cdannebe:
... yes should be enough.

Until now I thought this is controlled by hardware not by software.
[Xperia Z5 Compact Android Development] 1ggn3:
I have no idea. My best guess is that there is a charging IC that allows charging independently from any software (since the phone can charge even when there is no OS loaded, f.e. in fasboot mode), but the software (kernel module?) can control the IC over something like i2c.
[Xperia Z5 Compact Android Development] cdannebe:
Hi Berni,

I just installed your LOS18.1 image, NikGapps, I wipe the Data, Cache, Dalvik and I mount /persist and ran:

restorecon -RF /persist

I will report my result in the next days.
[Xperia Z5 Compact Android Development] &(*):
Berni, I'd like to chime in. I mentioned something similar to the issues with the thermal temperatures i.e. the battery swelling in my case. My discovery was the USB cable I was using was rather short, 2~3 inches. Try using a much longer cable (3~6 feet) when charging and see if the temperature changes. I believe most of the thermal activity you are feeling is being released from the battery not the board itself. I know from experience that batteries come with a little chip on the cable which I'm pretty sure is the voltage limiter. More than likely the conclusion is to get a new battery unless you alleviate the thermal charging issues with the method described above and are comfortable with the results.
[Xperia Z5 Compact Android Development] esrevinu:
Yes, you can use it . It would be appreciated if you would submit it to the LineageOS team.
[Xperia Z5 Compact Android Development] Berni-0815:
I'm not longer maintaining los17. I for myself switched to los18.1
[Xperia Z5 Compact Android Development] casouzaj:
Your 18.1 build is already published? What's its thread? Thanks, anyway!
[Xperia Z5 Compact Android Development] Berni-0815:
LineageOS 18.1
[Xperia Z5 Compact Android Development] tntcl:
hi berni, thanks a lot for your tireless efforts, they were the reason why i felt confident enough to get a Z5C.

does anybody have advice on how to reduce the massive echo my call partners experience when loudspeaker is active (both phone and app calls)? without loudspeaker there is a slighter but still noticeable echo. curiously, the problem was the other way round in berni's los14.1. haven't tried 18.1 yet but would be my next option.

cheers from berlin

(E5823 with december build)
[Xperia Z5 Compact Android Development] esrevinu:
I have made a patch to device/sony/kitakami-common for the DRM issue.

diff --git a/sepolicy/vendor/hal_drm_clearkey.te b/sepolicy/vendor/hal_drm_clearkey.te
index 286e248..ac671a3 100644
--- a/sepolicy/vendor/hal_drm_clearkey.te
+++ b/sepolicy/vendor/hal_drm_clearkey.te
@@ -8,3 +8,6 @@ allow hal_drm_clearkey hal_drm_hwservice:hwservice_manager { add find };
allow hal_drm_clearkey hidl_base_hwservice:hwservice_manager add;
allow hal_drm_clearkey hwservicemanager:binder { call transfer };
allow hal_drm_clearkey hwservicemanager_prop:file r_file_perms;
+
+allow mediadrmserver hal_drm_clearkey:binder { call transfer };
+allow hal_drm_clearkey mediadrmserver:binder { call transfer };
diff --git a/sepolicy/vendor/hal_drm_widevine.te b/sepolicy/vendor/hal_drm_widevine.te
new file mode 100644
index 0000000..b1b7867
--- /dev/null
+++ b/sepolicy/vendor/hal_drm_widevine.te
@@ -0,0 +1,2 @@
+allow hal_drm_widevine vendor_data_file:file create_file_perms;
+allow hal_drm_widevine vendor_data_file:dir create_dir_perms;
[Xperia Z5 Compact Android Development] Berni-0815:
Echo and microphone gain and speaker volume and all the other things related to mic/speaker are a very complex theme and that's not easy to solve.

There is a file called "mixer_paths.xml", that can be adapted to whatever you want.

But my experience is, if a value is changed, another weird phenomenon will happen.
[Xperia Z5 Compact Android Development] Berni-0815:
Does this issue occur at los18.1 too?

One question left: How do you know about those things? Don't you think you should involve yourself in LineageOS development?
[Xperia Z5 Compact Android Development] esrevinu:
I haven't used los18.1 much because of sudden reboots, so I didn't check it.

I think I like to fix the problem. :) But I am not an expert, so I have googled hard.
[Xperia Z5 Compact Android Development] Berni-0815:
LOL!

I'm not an expert too. It's been a long process of learning to come to the point where I'm now; you can also say "trial and error"...

And I'm still learning a lot every day.

But there are still enough things I've no idea of.

Do you know the tool audit2allow? I'm using this tool to extract what should be included in sepolicy files.
[Xperia Z5 Compact Android Development] esrevinu:
Here is my version:

Taegil Bae / mixer_paths.xml for Xperia Z5c · GitLab

/system/etc/mixer_paths.xml for Xperia Z5c

gitlab.com

Please try this. In recovery, replace (/system)/system/vendor/etc/mixer_paths.xml.
[Xperia Z5 Compact Android Development] esrevinu:
I saw audit2allow reading google document yesterday and tried it, but it was not much helpful. I still don't know how to fix secd_exec access denials from many daemons.
[Xperia Z5 Compact Android Development] sabar_op:
I am using the old way with setenv LD_PRELOAD to lib-preload64 in Z4 tablet device to fix secd_exec denials... Perhaps it works in your device.
[Xperia Z5 Compact Android Development] esrevinu:
Thanks. I will try it.
[Xperia Z5 Compact Android Development] Berni-0815:
Oh, don't do this. It's useless and does only spam your logs...
[Xperia Z5 Compact Android Development] Berni-0815:
I've built a new version of LineageOS 18.1 in which this issue might be fixed. No further improvements made. Please try this version and report.

FYI:

Using audit2allow the following changes would be enough to fix this DRM issue:

#============= hal_drm_widevine ==============
allow hal_drm_widevine vendor_data_file:file { getattr open read };

#============= mediadrmserver ==============
allow mediadrmserver hal_drm_clearkey:binder call;

But I've included all changes mentioned in this post.
[Xperia Z5 Compact Android Development] esrevinu:
audit2allow's suggestion is not enough. widevine needs create file and dir permissions to create files in /data/vender/mediadrm directory. If widevine already create that files, denials for create does not happen. clearkey also needs call and transfer permissions from and to mediadrmserver.
[Xperia Z5 Compact Android Development] tntcl:
thx! unfortunately that killed all sound, outgoing and incoming, in phone and all apps ;)

also unfortunately, after restoring the original file, i still lost all sound :unsure:
[Xperia Z5 Compact Android Development] &(*):
Wipe everything from within TWRP (Dalvik, Data, Cache, System, Internal) then format data. Flash the original 32.4.A.1.54 firmware and do not perform a .TA recovery from backup. Before booting into system flash recovery. Boot 7.1.1 system and complete basic setup (added from reply below). Boot into recovery and repeat first step: wipe everything followed by a format of data. Flash 18.1, after setup and report back as to the status of the sound issues.
[Xperia Z5 Compact Android Development] &(*):
removed: error in reply form, see above