yashsingh1/xdaforums huggingface dataset:
[Samsung Galaxy S 5 Unified Development] haggertk:
Yeah, Steve had a logic bug in his sdcardfs merge over the weekend which was fixed in this morning's build. The way I loaded the new build was to download to my computer and then sideload it in recovery.

On phone:

- boot into TWRP

- Advanced -> sideload

On computer:

- open shell

- cd to where ever you saved the download

- adb sideload $file_name

(substituting your download name for "$file_name", of course)

Back on phone:

- reboot system

- profit
[Samsung Galaxy S 5 Unified Development] jdrch:
FWIW after several episodes of (adoptable) microSD corruption during TWRP operations I turn my phone off completely and remove mine before booting into recovery and then turn it off completely again and replace it before booting back into system. That's the only way I've been able to consistently avoid microSD corruption using TWRP.

FWIW this a semi-known issue on the XDA TWRP thread, and I say "semi-known" because while people know it exists, it's poorly documented (surprise!) and there doesn't seem to be much effort behind a concrete fix.
[Samsung Galaxy S 5 Unified Development] !crazy:
His corruption is probably related to latest sdcardfs commits, and not TWRP 'operations' .

Recent nightlies are very solid IMO. The currents state, until this latest issue, is/was very good, definitely much better than many 'stable' pronounced builds from the past.

People who follow nightly branche should be aware of its nature, should read the changelog, and be prepared (with nandroid or whatever.) to handle breakages.

No one is forced to flash phone every day with latest build. Stick with the build from 22nd and enjoy it.

I use microsd card as adopted storage, and never had a single issue with it. I also use TWRP, and never pull the card out of the phone.
[Samsung Galaxy S 5 Unified Development] cal002:
I'm glad you figured this one out. So I guess this fle was left out of cm because noone needs it?

What I learned from this is that the camera firmware update is completely unneccessary

since the firmware is usually loaded from /system, not from the camera EEPROM, and cm

already uses the fw from latest Samsung image (I think).
[MENTION=2693412]haggertk[/MENTION]: It's up to you if you want to include the F16QL_s5k2p2xx_module_info.xml.
[Samsung Galaxy S 5 Unified Development] SB4BBs:
It's still a cm bug I'm on 21th build on clean flash
[Samsung Galaxy S 5 Unified Development] haggertk:
We aren't on the *latest* release of the camera blobs since they won't work with LP kernel. We're still going to reattack that and will bring the camera blobs with when we do.

I'll probably work to include this file just so that we don't all chase our tails in the event others try to force upgrade their camera firmware...
[Samsung Galaxy S 5 Unified Development] ScratMan38:
You may include the other xml also for the other models of the sensor used on SM-G900F :

- C16QL for the second model of Samsung camera

- F16QS for the phone with Sony IMX240 sensor
[Samsung Galaxy S 5 Unified Development] theelle:
But on last nightly problem sdcard is fixed?
[Samsung Galaxy S 5 Unified Development] haggertk:
Yup, we are on the same page. Here's what I put up on Gerrit last night. Didn't merge things yet because Ozzy is working camera stuff and wanted him to see it for a minute for awareness.

http://review.cyanogenmod.org/#/c/154053/

---------- Post added at 06:40 AM ---------- Previous post was at 06:12 AM ----------

Sure is here. Screenshots of my G900F that's actually running an official build.
[Samsung Galaxy S 5 Unified Development] oia12344321:
Guys does the torch (flashlight) is fixed? I am on one month old version and dont want to update if nothig bother me :)

Thanks to devs
[Samsung Galaxy S 5 Unified Development] haggertk:
Using it won't cause a bootloop anymore, but the change hasn't been merged for the camera crash yet. I'm working on testing Ozzy's latest patch. If things look good it might be as early as tomorrow that it's in an official build.
[Samsung Galaxy S 5 Unified Development] PorchSong:
7/26 is safe to flash. No sd errors. Problem seems to be fixed now.
[Samsung Galaxy S 5 Unified Development] Atento:
I hope you have success in this approach. It would be nice to have a rom without any substantial issue.
[Samsung Galaxy S 5 Unified Development] haggertk:
Things tested out well, I merged the changes a bit ago.

The only drawback is that we had to drop HDR (for now, for permanently, who knows) because we could beat the closed source HAL into submission to allow that while disabling zero shutter lag - the key thing causing the crash with flashlight.

We were able to enable the image stabilization key for video, so maybe even trade?
[Samsung Galaxy S 5 Unified Development] jeremiah.rs:
Hey guys, is anyone having any issues with their gyroscope and etc on their phones? Can't seem to access these functions anymore on my phone. I'm on a G900P running the latest nightly.
[Samsung Galaxy S 5 Unified Development] Decamerondix:
I'm on latest, no BT stutter, and gyro working for me
[Samsung Galaxy S 5 Unified Development] rayzen6:
HDR is not that useful and most importantly a "necessity".

People including me will never bother about HDR I guess. Only flashlight is a minor/major bug this time. If it can be solved with anything which isn't much useful it has to be fixed. U guys are working hard on it. And all the best and congratulations for current awesome progress :)

Ohh and its merged. Too good.
[Samsung Galaxy S 5 Unified Development] jeremiah.rs:
Hmm, what baseband are you running, and are you on the same device (kltespr)?

Thanks for checking!
[Samsung Galaxy S 5 Unified Development] Rvl7:
Hello,

Phone Model : G900F - 13.0-20160517-nightly-klte

There are Update notif from SuperSU.

"The SU binary needs to be updated!"

but when update with normal its always fail and also update with TWRP (3.0.2-1) via SuperSU notif it will make bootloop.

how to update binary?
[Samsung Galaxy S 5 Unified Development] ScratMan38:
:( sensor's HDR is a really nice feature, as it allows to improve the dynamic range of the pixels in order to avoid burning the high lights while still capturing details in the shadows. This is really useful when shooting landscapes with trees, sun and clouds in the same picture.

It is completely different of the usual HDR mode of third party camera apps (tone mapping), that takes several pictures with different exposures, and then merges them in a single one.

Most of the time, the tone mapping HDR method produces highly saturated pictures, with a surrealistic look ; while sensor HDR is just capturing more details and keeps the picture nice.

Here are some (ugly, but representative) examples shot from my office :

Normal mode : https://drive.google.com/open?id=0B9E5ilhc4bl-ZG9VS2xVQWF0MHc

HDR Sensor : https://drive.google.com/open?id=0B9E5ilhc4bl-SHRXbGxHeTRWVTg

HDR Tone Mapping : https://drive.google.com/open?id=0B9E5ilhc4bl-UnNhUm84eTZiaHc

You can see that the sensor captures much more details in the shadows in HDR vs the normal mode, and this with a single shot. The tone mapping method (made using A Better Camera app) is much longer to take a picture (need 3 exposures) ; and even if it gives pretty good results, colors are too saturated, and there are some colored artifacts in the bottom area, where the shadows were merged.

So the HDR sensor is a great feature, and it is (was) working very well, so it's a pity to loose such a feature. Hope it will come back later.
[Samsung Galaxy S 5 Unified Development] Atento:
I agree with you. I think HDR is more important than stock flashlight. We can replace buggy flashlight with 3rd part applications, but HDR is way more difficult as you already explained.
[Samsung Galaxy S 5 Unified Development] phalkon30:
I'll probably upgrade just to see, but I agree, I use hdr on pretty much every picture.

Decisions had to be made, and random reboots/functions silently breaking are not ok either, so I understand.

Sent from my SM-G900R4 (klteusc) running CM13 7.21.16 official with xposed
[Samsung Galaxy S 5 Unified Development] ScratMan38:
I agree with the fact that fixing flashlight is mandatory ; having bootloops just when using a light isn't acceptable.

But the HDR should be repaired afterward, the feature is important enough not to be dropped.
[Samsung Galaxy S 5 Unified Development] j1gga84:
I already wrote it in the Snap Camera HDR thread here on xda but I don't know if this is app or CM related.

I can't help myself but it seems that macro focus mode does not work on Samsung Galaxy S5.

Everytime I am very close to an object I want to take a photo of and set the focus mode to macro it does not focus correctly and the picture is blurry all the time

It gets sharp but then it gets blurry and the photo is taken..

Could the focus issues also be related to camera drivers?

Regards
[Samsung Galaxy S 5 Unified Development] humercab:
I 'm on 20160726 and I have the same problem. I don't know how to solve this....
[Samsung Galaxy S 5 Unified Development] zavorrax:
Guys,

I would not drop HDR capabilities to fix flashlight. After all there are a lot of working third party flashlight apps that one could install!!! If the problem is the bootloop then maybe we could simply disable the flashlight option.

HDR provides a far better dynamic range in photos, it is a very important feature for those using the camera.
[Samsung Galaxy S 5 Unified Development] ljani:
I agree with people above. HDR is more important than the flashlight for me too. Let's hope a proper fix will be found.

Same here and it has been this way with CM always. It's like the camera finds the correct focus, stops the focus and then rolls back messing up the focus.

I also noticed that with different camera apps, you can feel the lens moving more radically. Try macros with eg. OpenCamera.
[Samsung Galaxy S 5 Unified Development] rayzen6:
the problem was not only flashlight toggling guys. it was crashing whole media server and also sometimes playback of music without even toggling was disturbing. it was annoying much. yah maybe hdr can be useful for some of you guys and i wish devs will find a way to bring back, but in my opinion as a cm lover(open source) i can not mind that feature in front of MORE STABILITY.
[Samsung Galaxy S 5 Unified Development] phalkon30:
I think it's the hardware, I have never been able to get this phone on stock or cm to focus on anything close. For example, the Wells Fargo app can't focus on checks to deposit them online. This happens on stock and cm for me.

Sent from my SM-G900R4 (klteusc) running CM13 7.21.16 official with xposed
[Samsung Galaxy S 5 Unified Development] ScratMan38:
[MENTION=2693412]haggertk[/MENTION], [MENTION=7518817]cal002[/MENTION] : Thanks a lot for your work, and your help on my camera issue.

Maybe you will consider I'm abusing your patience, but I need some more help on an issue with my network connection.

I have very frequent network disconnect, while the network power is really good in my area. The signal may be full for several minutes, and suddenly the signal gauge becomes empty and the phone looses connection.

It's not a drop in signal power, because my old Defy is connected on the same network in the same area, and it never looses the network. Also, it is not a simple network change from 3G to 4G or EDGE, it looks like the radio reboots by itself.

I took a radio log, and I could find three lines "DcActivatingState: ERR_RilError ..." mentioning restart of the RIL, and it occurs every 12 minutes !

Do you know what can cause this behavior ? it's annoying as sometimes I missed some calls due to this.

Thanks a lot
[Samsung Galaxy S 5 Unified Development] haggertk:
To add some context, remind me, what is your specific phone model and baseband? May be visible in the logcat, but I'm on my phone and walking out the door for work.

BTW, the files you need for your camera will be in tomorrow's nightly. They didn't make it before the build server kicked off the sync for any of the klte* variants this morning.

---------- Post added at 08:22 AM ---------- Previous post was at 08:05 AM ----------

Thanks, I didn't mean it to come off like it was an easy decision. My first reaction was "oh hell no we aren't dropping that, I use that almost all the time", but neither Ozzy nor I could come up with a good way of having everything work. Zhao had the same problem on jf. It's not unreasonable to think that the two camera HALs are similar.

When we get back to MM kernel and bring the MM HAL (and other camera blobs) with us we will try again to get it re-enabled.

The tough, and predictably unpopular, decision had to be made, and we couldn't let one feature break multiple other features when we have a straightforward method to mitigate that. Like I said, I don't like it *personally*, but if we cannot come up with a way to enable HDR without breaking other parts of the ROM, then we cannot enable it.

I know some of you are SW developers, I urge anyone with the desire to jump in and try to help us out, just like [MENTION=7518817]cal002[/MENTION] did when he fixed BT for every damn Broadcom device out there. Some of this is hard, and the black-box, completely undocumented, blob interfaces are the hardest. Working things in our free time makes it even harder; squeezing in an hour or two a day working CM while maintaining a personal life balance only makes cracking those blobs even harder...
[Samsung Galaxy S 5 Unified Development] ScratMan38:
The phone : SM-G900F

CSC : FTM

Operator : Orange F / 20801

Bootloader : G900FXXU1CPF3

Modem : G900FXXU1CPE8
[Samsung Galaxy S 5 Unified Development] Atento:
Which is the latest build with HDR enabled? I'll stay there until the fix is found.
[Samsung Galaxy S 5 Unified Development] omgbossis21:
Are your connection drops only when on WiFi? I have a T-Mobile variant and signal drops like yours. Never happens if I'm not on WiFi, however when I AM connected to WiFi I get about one out of ten calls. Been this way since the start. I know I'd said before I would look into the camera quality issue and haven't! Between my recently torn disc in my back and getting married finding time has been impossible.

I think you nailed it with every 12 minutes so I'll log my phone tonight and try to catch my signal lose and tamper with the camera as well!
[Samsung Galaxy S 5 Unified Development] theelle:
So if I inderstabd, from tomorrow nightly we don't have hdr anymore but working flashlight?

Who think that flashlight is more important than hdr? I propose to vote for this because a change like that is deeper and maybe not necessary of the majority of us don't use flashkight...

Edit.. HDR isn't available from today's nightly... I don't agree with this decision, drop a functionality for fix another one isn't acceptable for me....
[Samsung Galaxy S 5 Unified Development] Ozzy2403:
it is really interesting how people can complain about a little feature instead of being happy about system stability. the decision was really not easy to disable hdr. i tried several things to keep it alive but wothout success. and i don't think you will be happy about completly disabling flashlight only to keep hdr.

so please be patient. i will come back to the camera wrapper soon. there are more things that need to be fixed like preview sizes... i really don't think the resolution for front camera is 1920*1080 as it is for rear camera.

but the next milestone has to be mm kernel and blobs. i already tested a build and had no issues with bluetooth data connection. but i had no time to test audio streaming yet. so give us some time. the hdr is not so important to survive. but system stability is. so this feature should have never get enables as it breaks other things.

if anybody has an idea how to enable hdr and keep mediaserver alive when using torch then feel free to send a patch to gerrit!!! for now this topic is closed for me. but "I'llbe back"
[Samsung Galaxy S 5 Unified Development] omgbossis21:
I dont think their understanding how it affected much more than "just the flashlight". To be honest when I need to take pictures I use my girls s5 which is still on touchwhiz. I'd like to use mine but honestly, the camera quality is freaking terrible! I use it to take pics for eBay listings and take at least 3 pictures of everything before it takes a usable picture. Its not bad in a WELL lit environment, but anything else is just not worth it. That's why I wanted to look into it before, just haven't had a chance.
[Samsung Galaxy S 5 Unified Development] theelle:
Sorry but i don't complain with that. Why don't disable flashlight option instead of hdr? Is the same thing: disable a feature that don't works instead of one that works... IF flashlight is fixed, then came back.

That's just my two cent...
[Samsung Galaxy S 5 Unified Development] Ozzy2403:
first disable things that break system and after that find a solution to activate again. stability first. as i said the aim is to activate hdr again soon.
[Samsung Galaxy S 5 Unified Development] haggertk:
I keep meaning to get CTS running... I know that will identify a whole lot of stuff in camera and media. Maybe next week when I'm on travel. It's funny how I sometimes have more time when I'm on the other side of the world with just work.
[Samsung Galaxy S 5 Unified Development] rayzen6:
Ur right I will always with stability. And fully working things. Currently on latest nightly and you guys done a fantastic job. Plz don't listen what others are saying. Go with what u think is best for stability. Now I can say that our cm latest nightly is just freaking stable.

Hey guys don't think I'm rude but if u want that tiny feature without which we can easily survive with rock stability, I have to say that ur not really understanding an android open source complexity with Samsung.
[Samsung Galaxy S 5 Unified Development] ScratMan38:
The problem was not only the flashlight.

The problem was with the media server and camera wrapper, and due to this problem, using the flashlight could trigger a bootloop (and some data corruption at the same time).

So no, HDR is not important enough for sacrificing stability.

It doesn't depend on WiFi : Enabled or disabled, connected or not, I have the "network drop" on the cellular.

It really looks like if the flight mode was triggered on/off regularly.
[Samsung Galaxy S 5 Unified Development] omgbossis21:
Outside of WiFi on I am rock stable with signal switching to LTE when hotspot is active, h+ with mild use and h at standby. WiFi on doesn't matter the WiFi connection I drop service nonstop. I tried setting, keep cellular network alive but no go. May try using the lollipop dhcp in settings but I'm sure I tested it at some point. Should be easy to catch on a log and I'll compare it to the one you posted.
[Samsung Galaxy S 5 Unified Development] ScratMan38:
May have fixed the disconnects, I tried to clean up the APN this afternoon (as far as I remember, I already did this previously, but it didn't help, and looks like the APN were reset).

This evening, I took a one hour radio logcat, and no trace of "restart" ; and when looking at the detailed battery history, there is almost no more red area next to the GSM signal, while previously it was taking almost half of the history.

In the APN, I had many entries for some MVNO that are using the Orange France network, so, same network, but slightly different settings. I removed them all, and kept only :

Orange Internet (selected)

Orange France

Orange MMS "Orange.acte"

Orange MMS "orange.acte"

Will see if it works for long term.
[Samsung Galaxy S 5 Unified Development] ljani:
If anyone has time to test, these guys seem to be doing some HDR, ZSL and focus magic: https://github.com/CyanogenMod/android_device_lge_g3-common/blob/cm-13.0/camera/CameraWrapper.cpp

/* LIE! The camera will set 3 snaps when doing HDR, and only return one. This hangs apps
* that wait for the rest to come in. Make sure we never return multiple snaps unless
* doing ZSL */
[Samsung Galaxy S 5 Unified Development] cal002:
I wouldn't expect too much from CTS since Samsung stock is already buggy (judging from web search).

Maybe if you compare stock and cm results it would be interesting. However, I'd put

the blob upgrade first as basis for debugging binary blob issues.
[Samsung Galaxy S 5 Unified Development] haggertk:
Very true... so very true. I wish I were developing for a non-buggy platform, but even the vendors who partnered with Cyngn Inc. had things that CM has had to work around.
[Samsung Galaxy S 5 Unified Development] theelle:
Sorry but is flashlight or hdr the problem?? Don't understand that....
[Samsung Galaxy S 5 Unified Development] compmodder26:
Just dirty flashed 07/27. Camera force closes every time I try to open it.

Here is the exception that is being thrown:

07-27 17:01:14.061 10841 10865 E AndroidRuntime: FATAL EXCEPTION: Camera Handler Thread

07-27 17:01:14.061 10841 10865 E AndroidRuntime: Process: org.cyanogenmod.snap, PID: 10841

07-27 17:01:14.061 10841 10865 E AndroidRuntime: Theme: themes:{default=overlay:com.brit.swiftdark, fontPkg:com.brit.swiftdark, com.android.systemui=overlay:com.brit.swiftdark, com.android.systemui.navbar=overlay:com.brit.swiftdark}

07-27 17:01:14.061 10841 10865 E AndroidRuntime: java.lang.RuntimeException: startPreview failed

07-27 17:01:14.061 10841 10865 E AndroidRuntime:	at android.hardware.Camera.startPreview(Native Method)

07-27 17:01:14.061 10841 10865 E AndroidRuntime:	at com.android.camera.AndroidCameraManagerImpl$CameraHandler.handleMessage(AndroidCameraManagerImpl.java:287)

07-27 17:01:14.061 10841 10865 E AndroidRuntime:	at android.os.Handler.dispatchMessage(Handler.java:102)

07-27 17:01:14.061 10841 10865 E AndroidRuntime:	at android.os.Looper.loop(Looper.java:148)

07-27 17:01:14.061 10841 10865 E AndroidRuntime:	at android.os.HandlerThread.run(HandlerThread.java:61)
[Samsung Galaxy S 5 Unified Development] aholeinthewor1d:
Is it possible to get the TouchWiz gallery on CM? That's one of the small things that I keep going back for. It's nice being able to long press and select a bunch of pictures and then drag them to another folder. I have been running the note 5 port and really like the messaging app. CM messages and contacts drive me crazy cause you have the little colored circles next to everything
[Samsung Galaxy S 5 Unified Development] Cdub1976:
No flashlight or camera issues with my G900t. Actually everything running flawlessly with latest nightly.
[Samsung Galaxy S 5 Unified Development] rayzen6:
+1 on g900f
[Samsung Galaxy S 5 Unified Development] cal002:
The problem is Samsung's binary camera HAL is buggy and crashes. Finding a workaround

that fixes all issues at the same time is hard and takes time, but eventually we'll get it done.

So, please be patient. In the mean time, if you can't live without HDR, keep using the last nightly that

supports it (or just its /system/lib/hw/camera.msm8974.so).