yashsingh1/xdaforums huggingface dataset:
[Xperia Z5 Compact Android Development] Berni-0815:
Yes. Camera2 is not as configurable as Snap. There are no benefits at all.
[Xperia Z5 Compact Android Development] Hichem2006:
Good.

Is the focus problem with the hardware or is it LineageOS ?
[Xperia Z5 Compact Android Development] Berni-0815:
I can't answer your question exactly. But as far as I know it's a hardware related problem. The hardware cannot be addressed perfect due to closed source driver and we had to build our solution as a workaround arout this driver.

But that hasn't been my work. Maybe the user Tarkzim could answer the question better than me?
[Xperia Z5 Compact Android Development] Hichem2006:
Always closed-source ****.
[Xperia Z5 Compact Android Development] Berni-0815:
Unfortunately yes...

Brought to you by Sony and Qualcom.
[Xperia Z5 Compact Android Development] Berni-0815:
New version out; see 1st post.

SafetyNet test passed successfully
[Xperia Z5 Compact Android Development] Hichem2006:
Open source software is always the best !
[Xperia Z5 Compact Android Development] username one:
+1

I think it has a Caribbean vibe to it, which I find rather uplifting, contrary to the stock LOS with it's Soviet style coloured wallpapers.
[Xperia Z5 Compact Android Development] Berni-0815:
@momomomonsterbill : Does this version work for you?

If not, I'm willing to remove the changes that I've made to the "Preferred network type" section, because in my eyes that's too much for normal use.
[Xperia Z5 Compact Android Development] uncle-sam:
Do you have plans for fixing the hotspot? I just found out if your vodafone home internet is down for over 24h for no reason a hotspot ability would come in handy...
[Xperia Z5 Compact Android Development] Berni-0815:
I have a lot of plans and ideas but if I can't fix an issue, I can't fix it. As I wrote in this post, it seems to be a general problem.
[Xperia Z5 Compact Android Development] Hichem2006:
Then, you'll have to talk with the LineageOS team directly.
[Xperia Z5 Compact Android Development] uncle-sam:
Oh i see. If the LOS team would fix it (in a far away future), would it generally possible to embed this fix to your rom?
[Xperia Z5 Compact Android Development] Berni-0815:
Since hotspot seems to work in los17.1 and we haven't changes anything in our device tree source code regarding hotspot, I think, it will automatically work. But that's just guessing...
[Xperia Z5 Compact Android Development] Hichem2006:
Good, is Cast working in LineageOS 17.1 ?
[Xperia Z5 Compact Android Development] Berni-0815:
I don't know. But I don't think so.
[Xperia Z5 Compact Android Development] Hichem2006:
If you are running LOS 17.1, try at least.

If it works, what is the problem ?
[Xperia Z5 Compact Android Development] Berni-0815:
My device uses los18.1 as daily driver and I can only dance on one party.

But if I find some time, I'll reflash los17.1 and try it.
[Xperia Z5 Compact Android Development] Hichem2006:
OK !

I also use LineageOS 18.1 as my daily driver and it's soooooo smooth !
[Xperia Z5 Compact Android Development] Hichem2006:
I need some advices, I'm wondering about getting an Xperia XZ2.

Any recommended ROMs and some special things about the phone ?
[Xperia Z5 Compact Android Development] baristurunc:
I think this is not the right forum topic to ask such.
[Xperia Z5 Compact Android Development] :
It's not the hardware, focus works flawlessly when using htc camera or other camera apps that support 23 mpx capture.

It's just that the viewfinder doesen't work, berni never tried fixing this.
[Xperia Z5 Compact Android Development] Berni-0815:
How do you know what I've tried and what not?

Sorry, but it's not my business if the viewfinder of a 3rd party app is working or not. That's their business.

Our viewfinder is working and the focus issue can't currently be fixed by us.

I really don't know why the camera focus in app A is working and in app B not.

Please fetch the source code and fix the issue if you think that you can.

Sorry, that I have to say that, but I'm feeling a little bit pissed now...
[Xperia Z5 Compact Android Development] :
But the fact that the viewfinder doesen't work on those apps is because it's broken in the rom. it's not the apps fault...

Those are the apps that can fully utilize the sensor, and that's why they are the only ones that take good pictures.

I'm sorry, i didn't mean to be rude. I thought you never tried because you told me multiple times that the sensor isn't capable of taking photos at an higher resolutions than what you support in this rom (which is right, but it doesen't mean that it cannot output a 23 mpx image), the resolution isn't what fixes the quality, but it's the fact that at that resolution the camera focus and everything else works properly. At the 8 mpx resolution we currently have in the rom, everything is broken. Even the area of focus (i don't know how to call it, basically the stock camera takes wider shots) isn't the same as pictures taken with the stock camera (or apps that can fully utilize the sensor).

I'm not a programmer, i don't know how to fix this. I'm just telling that the camera problems can probably be fixed by fixing the viewfinder at those resolutions. I don't think the assumption that the viewfinder not working is not the rom's fault is correct, The rom doesen't even know those resolutions can be captured by the sensor, on lineage 14 it did, and you could take 23 mpx pictures even with the stock camera (which is why it didn't have that problem).
[Xperia Z5 Compact Android Development] username one:
*removed*
[Xperia Z5 Compact Android Development] momomomonsterbill:
Unfortunately the camera annoys me too much so I will return to 14.1 for the time being. I tried scanning a QR code for 10 minutes yesterday within the nextcloud app but it just wouldn't focus.

Thanks! I tried the new build nad the default setting was still "GSM/WCDMA preferred" when I put in a new O2 SIM-card. I must admit, that I find the new menu more confusing than before. At least for me the only setting that makes sense is LTE preferred. I mean, I see no use in priorizing 2G or 3G. But this is definitely no real problem. I just always wondered why my connection was so bad everytime I changed to a new SIM until I remembered that you had to manually enable LTE :)

I tried flashing the Nanodroid MicroG package but the same result. No app did ever register for GCM / FCM even though all boxes were checked in the MicroG self-test. I ran out of ideas. I must add that I don't have a google account.

I was also thinking about switching. It has official LOS 17 available. But my impression was that berni is a more active developer than the mainainer of the "official" one. Maybe I'm a bit spoiled ;) Also there is no way to go back to factory settings once you unlocked the bootloader, because you cant backup and restore the DRM-keys. So you can't just undo everything before selling the phone. The XZ1 compact could be a minor upgrade.
[Xperia Z5 Compact Android Development] Berni-0815:
That's why I'm asking. So I will revert this change to make the menu as simple as before.
[Xperia Z5 Compact Android Development] Berni-0815:
Then please tell me how they are doing that! I don't know!
[Xperia Z5 Compact Android Development] litelinux:
In the meantime, hotspot over bluetooth is working well.
[Xperia Z5 Compact Android Development] Berni-0815:
New version out; see 1st post.

No improvements. Only latest updates from Google and LineageOS sources.

Back to normal "Preferred network type" menu.
[Xperia Z5 Compact Android Development] 1ggn3:
It's been a while since I was last online, sorry. One by one:

I tested that, and it works out of the box. Keep in mind that Miracast is a tricky thing, and just because two devices support it doesn't mean they'll want talk to each other ;)

Sorry, Berni, I have to disagree there. That's kind of like saying "put your washing machine on a 5 Amps breaker, because otherwise it will explode while spin-drying".

Tl;dr: At least, please put a warning in the first post, because lithium-ion batteries really dislike high temperatures and I don't want to read about someone setting their house on fire here!

Why do I think this bad (long version)?

First of all, please don't take this as me criticizing your work here. You are the one guy that is saving many of us from buying a worse phone for years now!

The whole USB power transmission is designed around the idea that the device can take up to as much power as the host/charger offers. The host/charger offers as much power as it has, for example 2,5W for a computer with USB 2.0 or even up to 100W for a USB type C laptop charger. It's up to the device to know it's own limits. That's why you can charge a tiny USB C smartwatch with a big laptop charger, it will only take as much power as it needs.

For the Z5C and common wall plugs, it means that the phone will detect the plug and start to take increasingly more current. This continues until a) the charger hits its limit and tells the phone it's maxed out (the +5V voltage starts to drop slightly) or b) the phone can't/shouldn't charge any faster.

This is how the phone used to work, since back in 2016 when I bought it. That's how all USB compatible phones I've got my hands on worked. I believe this ROM disables the internal limits completely. That's a bug, and I'd say it's a pretty serious one.

I think you could even get an official Sony fast charger back then, which I can only hope noone uses with this ROM. Yes, using a weaker charger is a workaround, but it's absolutely not a solution, and it might lead to dead phones or (in the very worst case) starting a fire :(
[Xperia Z5 Compact Android Development] Berni-0815:
You're right. I've put a warning in my 1st post.

If you are right (and I can neither prove nor disprove it) this is indeed a serious mistake. But it's one that I can't fix right now.
[Xperia Z5 Compact Android Development] 1ggn3:
Thanks. And by the way, thanks for all the good ROMs!

I can't exactly prove it (or even fix it) as well, because I know almost nothing of the charging internals in Android. All I know is that the battery should not go above a certain temperature, even when you are charging, recording in 4k and playing a game all at the same time.

Maybe I'll try to hook the phone to a bench power supply and see what it does.
[Xperia Z5 Compact Android Development] momomomonsterbill:
I don't know if this has anything to do with it, but does your charger support Quickcharge (QC)? Because I noticed too that when quickcharging the phone becomes warmer than with a non-qc charger. But I believe that is kind of expected and was also the case with older custom ROMs and stock ROM if I remember correctly. Also the z5c was notorious for overheating from the beginning.
[Xperia Z5 Compact Android Development] momomomonsterbill:
If you are still having the problem, I found a workaround today after several days of trial and error: Downgrade MicroG to version 0.2.15.204713 and it should work.
[Xperia Z5 Compact Android Development] Berni-0815:
That's a good idea! And I need to know which charger is used if the battery gets too hot. Model, Brand, electrical specifications, link and so on.

All this is also the reason they say always use the original charger!

I know, this is easy to say, but no one will be able to fix all issues with all 3rd party stuff all over the world.
[Xperia Z5 Compact Android Development] Berni-0815:
Really? Since I've always used the shipped charger, I don't know about that.
[Xperia Z5 Compact Android Development] momomomonsterbill:
Sorry I was unclear. I wasn't talking about getting hot during charging but that the z5c generally has always run kind of hot. Not necessarily over-hot in the sense that it would exceed specifications, but there are quite a few google-results if you search for "z5 compact overheating".
[Xperia Z5 Compact Android Development] 1ggn3:
I think the CPU does overheat quite fast, which leads to strong thermal throttling. All phones do that to some degree (since you can't just shove a 2 GHz octa core in a phone case and expect it to stay cool), but the SN810 in the Z5C is known for being especially bad here.

The issue people are complaining about is the thermal throttling, not their phones getting too hot to touch. The throttling is happening to avoid just that.
[Xperia Z5 Compact Android Development] 1ggn3:
I currently use an off-brand 5V 2A charger. It has no Qualcomm QuickCharge (but it should in theory support Samsung's proprietary quick charging method - idk, I don't have a Samsung phone, so I've never tried it see my post below, something's strange). It has been working just fine for me with Stock and LOS 14.1-17.1, and some other people have also used it to charged their phones (from other manufacturers) without issues.

I haven't measured it myself, but I'd bet that it follows the USB battery charger spec (wikipedia). The standard, which is used in 90% of the cheap chargers today, says that a (non-apple) charger will tell the device that it is a charger by shorting the data pins, and the device is then allowed to draw as much power as the charger will output and it can take. See post below.

EDIT: I just looked around in /sys/class/power_supply, and it looks like they added more information here. According to the files here, my battery has around 77% capacity left (which isn't that bad for a device that is ~5 years old and has seen some abuse). Maybe I can compare the values here with someone who has installed 18.1 (I currently have 17.1)?
[Xperia Z5 Compact Android Development] 1ggn3:
So, I looked into it a bit more, and I found that the Samsung fast charge adaptor I was using somehow gets detected by our Qualcomm phone as a USB_HVDCP (high voltage dedicated chargeing port) instead of a USB_DCP (regular dedicated port). I cross-checked this with a Raspberry power plug, which I know provides a solid 5V/2A and nothing more: The Raspberry plug gets detected as a DCP, and overall current draw is limited to 1,5A (a bit "conservative", but a reasonable value to be compatible with old chargers).

So this would mean that, for some reason I don't yet understand, both of you are right, I am actually quick charging (in some way). This would make a lot of sense, because for quick charging you absolutely need to monitor the battery temperature internally. I'm heating up my soldering iron as I type this - let's see what really happens there :)

EDIT: I just tested this by cutting up a USB cable and soldering it to some scrap PCB. I'm sorry for the terrible image quality, but I can't use my Z5C for obvious reasons, and my backup phone is ~15 years old. Anyway, you can clearly see that it says 9V, which means that it is, in fact, quick charging. I don't know why a QC phone can do that with a Samsung-type charger, but I think this is not a bug, but a feature.

This does explain why @Berni-0815 and many others have no issues, since with a regular charger, the phone seems to limit itself to 1,5A. Maybe there are some non-QC chargers that make the phone charge faster than that, but my guess would be that this is a limitation of the phone.

So, all in all, this means that I was only half-right at best. I do suggest to keep the warning, because QC used to be an official feature of this phone. I still believe the whole issue a bug of this ROM, but if you stick to a non-QC charger and maybe keep an eye on the temperature while charging, everything should be fine.

EDIT2: I connected the phone to a bench psu and shorted the data wires to indicate a "dumb" charger. The phone behaves exactly as I thought: If I set a low current limit (eg 700mA), it will try to max out the current by slowly raising its current draw until the voltage starts to drop. If I set the current limit to something high like 5A, the phone will limit its current draw to 1,5A. I had to raise the voltage quite a bit, to make up for the wire resistance (I didn't want to cut up a good cable). Note that I did this with LOS17.1, if someone here has 18.1 and a dumb charger with more than 1,5A, please confirm that it's the same there too!
[Xperia Z5 Compact Android Development] uncle-sam:
I had these issues from the very beginning. I thought it was due to the damaged (since delivery) battery of my device. It was "bloated" (i don't know if this is the right word for it) and the backcover was already making a curve. After I changed the battery I was rarely using the phone.

Back to camera:

I encountered the focusing issue also with the stock rom with modified kernel. I think this might be connected to the whole drm-keys topic and also linked to the 23mpx issue. In my subjective perception it got worse with the inofficial LOS but I am quite sure

the issue was there before

. Maybe some of you could test my observation.

The question is if this issue is due to the missing drm-keys is there any solution in sight?
[Xperia Z5 Compact Android Development] :
drm-keys have nothing to do with the blurry camera (at least on custom roms that are based on aosp).

This didn't happen in lineage 14 and other nougat roms, you can also use camera apps that can utilize the full 23 mpx resolution (like Camera FV-5 or the old HTC Camera) and the focus works as normal, but the viewfinder doesen't work.

missing drm keys only affect roms based on stock.

I also think this is connected to the 23 mpx issue. The rom just doesen't use the correct camera resolutions that the sensor is expecting.

With third camera apps with 23 mpx support, i think it works because they force those resolutions, they are hard coded to not use the standard ones provided by the rom, and the viewfinder doesen't work because probably the software that renders the viewfinder won't work at those resolutions (again, not sure but that's what i think is happening).
[Xperia Z5 Compact Android Development] 1ggn3:
That is absolutely not normal. All LiIon batteries can "move" a bit while charging and discharging. But if your battery is visibly bloated, it is already damaged (by overcharging, over-discharging, overheating...) and one shouldn't use it anymore.

I hope you got some kind of warranty replacement. I've put my phone through some abuse, like running Maps in a 40°C+ car for hours. As part of my recent charging "experiments" I've even tried to (slightly) overheat it on purpose. Unless you use a fast charger with this 18.1 ROM (see my posts above), there should be almost no chance of damaging your phone, since it will just throttle down to get cooler again.
[Xperia Z5 Compact Android Development] username one:
I checked mine and it says 77 in the capacity file. The charge_full file says 2783000. My battery is about two months old and I use Acca.
[Xperia Z5 Compact Android Development] Berni-0815:
I don't know what you're talking about... :rolleyes:
[Xperia Z5 Compact Android Development] uncle-sam:
No, i did not get any warranty replacement. I replaced it myself. But this damage was from the very beginning (i got a brand new one in 2015) without any custom rom rooting thing. The old battery was laying around, just for fun i tried the last days to measure the capacity that's left, but there is none. Literally none! This is also not normal for LiIon batteries - even if they're damaged. I can just guess, that this was some kind of fabrication error.

But this is somehow off topic...

EDIT:

Which version of HTC camera are you using? Just curious if i can get it running properly on my phone.
[Xperia Z5 Compact Android Development] :
8.50.876780

You can find it easily on apkmirror.
[Xperia Z5 Compact Android Development] 1ggn3:
To clarify: The "capacity" file is just your current battery percentage. If you charge or use your phone, that value should go up and down, just like the battery indicator.

My "77% remaining" value comes from dividing the last full charge by the original (design) full charge, like this:

suzuran:/sys/class/power_supply/battery # cat uevent | grep POWER_SUPPLY_CHARGE_FULL
POWER_SUPPLY_CHARGE_FULL=2208000
POWER_SUPPLY_CHARGE_FULL_DESIGN=2840000

2208mAh / 2840mAh = about 78% of the original "full" capacity

There are some low-level information about power and battery stats here. Maybe I'm wrong, but I think there are some new files here. Maybe I just never looked hard enough before :)
[Xperia Z5 Compact Android Development] uncle-sam:
With my phone the camera does not work properly. Focus is still Bad and while being in the camera i can't see - the view is black. strangely the camera can take photos.
[Xperia Z5 Compact Android Development] uncle-sam:
On my phone front and backcamera are working. 23mpx and hdr too. Frontcamera is laggy but working! But the view oft the camera is black and focus is not working.

But i replaced the camera with one from the z5, i thought it would be the same?
[Xperia Z5 Compact Android Development] Berni-0815:
For los17.1 you can find a similar ROM here.
[Xperia Z5 Compact Android Development] Berni-0815:
suzuran:/sys/class/power_supply/battery # cat uevent | grep POWER_SUPPLY_CHARGE_FULL
POWER_SUPPLY_CHARGE_FULL=2290000
POWER_SUPPLY_CHARGE_FULL_DESIGN=2840000
[Xperia Z5 Compact Android Development] Berni-0815:
This camera app focuses just as badly at close range as the integrated Snap app. Useless! (n)
[Xperia Z5 Compact Android Development] Berni-0815:
And for me in personal it is very important to see in a viewfinder what I want to take a picture from.

Twice useless app!
[Xperia Z5 Compact Android Development] :
Wait... but the viewfinder works on your device?
[Xperia Z5 Compact Android Development] uncle-sam:
I agree with that. But i assume the issue with the black viewfinder is rom-related. I got the same issue with some other camera apps from googleplay.
[Xperia Z5 Compact Android Development] Berni-0815:
Same here too.
[Xperia Z5 Compact Android Development] Berni-0815:
I've forgotten to say "thank you" for your measurement.

Could you please try to measure the power (Ampere) that's served to the device?
[Xperia Z5 Compact Android Development] :
Whaaat?

did you edit anything camera related for it to work?
[Xperia Z5 Compact Android Development] :
Tried, doesen't work.

Are you on Lineage 18 or 17?

Maybe on Lineage 18 the viewfinder works and everyone else tested it on 17 like i did?

The thread is getting a bit mixed up...

Also, does your default snap camera have the option for 23 mpx or does it only go up to 8?
[Xperia Z5 Compact Android Development] uncle-sam:
No, i'm on Lineage 18.1
[Xperia Z5 Compact Android Development] Berni-0815:
No.

Yes. And according to the threads title, this is valid for los18.1
[Xperia Z5 Compact Android Development] Berni-0815:
I need feedback! ;)
[Xperia Z5 Compact Android Development] Berni-0815:
Next question:

What is hot? In celsius degrees. Please don't guess, I need measurements.

How warm does the battery really gets when charging in powered down mode with that HVDCP charger?
[Xperia Z5 Compact Android Development] 1ggn3:
I'll try tomorrow with a slightly more reliable method. But if I remember correctly I think I wrote about the following temps: <42-43°C when temperature monitoring is working, and more than 45°C if it's not (I think I saw 50°C, but I was to worried at that time to make a screenshot).
[Xperia Z5 Compact Android Development] Berni-0815:
There are operational limits than you can find in the file kernel/sony/msm8994/arch/arm/boot/dts/qcom/msm8994-kitakami_common.dtsi beginning at line 790:

&pmi8994_fg {
qcom,hot-bat-decidegc = <550>;
qcom,warm-bat-decidegc = <450>;
qcom,cool-bat-decidegc = <100>;
qcom,cold-bat-decidegc = <50>;

Following that, 55°C is defined as hot and everything below that is within operational limits.

And, no, we don't have sucked these values out of our fingers; that's used since los14. ;)

I really don't know what to do next ...
[Xperia Z5 Compact Android Development] H4NNE5:
CAMERA PROBLEM like in LOS 17.1 :cry:

I just installed this ROM and encountered the same problem with the Camera as in this post.

Is there anyone with the same behaviour?

Also the stock camera app crashes sometimes upon hitting the record button when making a video.

Also the focus doesn't work when taking pictures, which was also described in the linked thread.

Update: I had to go back to Berni's 14.1 release to get a normal camera behaviour...