yashsingh1/xdaforums huggingface dataset:
[Samsung Galaxy S 5 Unified Development] ScratMan38:
[MENTION=2693412]haggertk[/MENTION] : since a while, I'm having an issue with the stock CM13 kernel and my camera.

The issue started a few months ago when the kernel SELinux mode has been switched to Enforce mode. My camera then failed to start, whatever the camera app I use.

The only way I found to get the camera working was to use the Boeffla 3.0 kernel that could boot with SELinux as Permissive (using the corresponding setting in the boeffla config app).

But now Lord Boeffla is switching to Anykernel method for his kernel, loading the stock kernel at flash and adding custom features ; and now my camera doesn't work with Boeffla kernel 3.1 anymore.

Before the stock CM13 kernel was set to Enforce, in december / january, I had some GPS fix issues. So I flashed the latest stock Samsung Touchwiz ROM from my operator (Orange France) to rebuild NVM, and I also made a camera FW update, using a method found on the forum. This may be the root cause, using incompatible camera firmware with CM13.

But my camera is working fine with Touchwiz ROM with SELinux as Enforce, and in CM13 when using custom kernel and SELinux as Permissive.

So why is it failing in CM13 with SELinux set to Enforce ?

Lord Boeffla doesn't understand why it fails to run, so I'm looking for somebody to help me.

Could someone please indicate its camera FW revision here so I can compare with mine and try to update my firmware with working version ?

For info, I tried several combinations with CM13 builds :

- July 11th

- July 14th (containing a camera wrapper cleanup)

- July 17th

and kernel (with SELinux mode):

- Boeffla 3.0 stable (Permissive)

- Boeffla 3.1 beta1 (Permissive)

- Boeffla 3.1 beta2 (Permissive)

- CM Stock (Application)

Only the stable Boeffla 3.0 kernel with SELinux set to permissive at boot makes the camera work. :crying:

Here are the logs with the kernels :

- stock CM : fail

- Boeffla 3.1 beta2 : fail

- Boeffle 3.0 stable : pass
[Samsung Galaxy S 5 Unified Development] jdrch:
Since the 20160703 build my phone has been unable to find GPS signal unless it's in airplane mode. Logcat (radio included) attached. JIRA issue is at https://jira.cyanogenmod.org/browse/NIGHTLIES-3161

Any ideas?
[Samsung Galaxy S 5 Unified Development] ljani:
I finally had enough time to try this. Indeed the flashlight icon does not disappear anymore, but during my initial testing my camera crashed and wouldn't open anymore. I was (rapidly) switching between HDR and the normal mode (the rightmost button) when the crash happened. I've attached a logcat of opening the camera when it's stuck. Flashlight won't work either when the camera is stuck. Anyway, even after reboot and clearing the camera's settings I was not able to switch between normal and HDR (sorry, I forgot to logcat this). Flashing back the build with ZSL_ON fixed the issue and now I'm able to switch between normal and HDR again.

In conclusion I cannot reliably say that commenting out the line will fix issue, but it seems to cause other issues instead.
[Samsung Galaxy S 5 Unified Development] systemcrash:
Wow, so many logcats. :eek:

It's like people are suddenly serious about getting bugs fixed.
[Samsung Galaxy S 5 Unified Development] cal002:
Thanks for testing. Well, the good news is I can reproduce it so I can debug it. Probably you found the

reason why ZSL was forced on.. and promptly I get the "bootloop", i.e. Watchdog kills system_server due

to hang in android.media.AudioSystem.setParameters, then after restart loops in

"ServiceManager: Waiting for service media.audio_policy..." because mediaserver hangs in

[10750.499038] mediaserver D c0a354b4 0 21682 1 0x00000201
[10750.499068] [<c0a354b4>] (__schedule+0x590/0x7bc) from [<c0a33bd0>] (schedule_timeout+0x28/0x32c)
[10750.499088] [<c0a33bd0>] (schedule_timeout+0x28/0x32c) from [<c0a35d64>] (wait_for_common+0x11c/0x15c)
[10750.499108] [<c0a35d64>] (wait_for_common+0x11c/0x15c) from [<c01b0b14>] (wait_on_work+0xbc/0x108)
[10750.499129] [<c01b0b14>] (wait_on_work+0xbc/0x108) from [<c01b0bd8>] (__cancel_work_timer+0x78/0xec)
[10750.499149] [<c01b0bd8>] (__cancel_work_timer+0x78/0xec) from [<c0845a30>] (es705_wakeup+0x64/0x270)
[10750.499169] [<c0845a30>] (es705_wakeup+0x64/0x270) from [<c08461ac>] (es705_power_control+0x154/0x4d8)
[10750.499188] [<c08461ac>] (es705_power_control+0x154/0x4d8) from [<c0843360>] (es705_read_write_power_control+0x58/0x60)
[10750.499209] [<c0843360>] (es705_read_write_power_control+0x58/0x60) from [<c0843664>] (es705_get_control_enum+0x18/0x64)
[10750.499233] [<c0843664>] (es705_get_control_enum+0x18/0x64) from [<c07fcd8c>] (snd_ctl_ioctl+0x588/0xb1c)
[10750.499258] [<c07fcd8c>] (snd_ctl_ioctl+0x588/0xb1c) from [<c02681fc>] (vfs_ioctl+0x28/0x3c)
[10750.499279] [<c02681fc>] (vfs_ioctl+0x28/0x3c) from [<c0268c4c>] (do_vfs_ioctl+0x488/0x578)
[10750.499297] [<c0268c4c>] (do_vfs_ioctl+0x488/0x578) from [<c0268d84>] (sys_ioctl+0x48/0x74)
[10750.499317] [<c0268d84>] (sys_ioctl+0x48/0x74) from [<c010651c>] (__sys_trace_return+0x0/0x24)

update: I uploaded a patch which should fix the bootloop / mediaserver hang, if you want to test.

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

update2: I was a bit in time squeeze yesterday, just to clarify this patch doesn't fix the flashlight

or camera issue, it only fixes (or is supposed to fix) the "bootloop" after it. Since I also run into

the "Waiting for service media.audio_policy" on about every 20th boot so I guess this race condition

should be fixed anyway.
[Samsung Galaxy S 5 Unified Development] haggertk:
Not merged yet, life got in the way.

---------- Post added at 07:47 PM ---------- Previous post was at 07:42 PM ----------

Pretty sure i found it. Won't make tomorrow's nightly, but maybe the day after.
[Samsung Galaxy S 5 Unified Development] phalkon30:
Life comes first man, it's all good

Sent from my SM-G900R4 (klteusc) running CM13 7.10.16 official with xposed
[Samsung Galaxy S 5 Unified Development] ScratMan38:
In order to understand, I flashed via Odin the latest stock Touchwiz of "BTU" (United Kingdom) for Android 6.0.1, as it is used as development base by some developers. It is supposed to work well with CM.

I repeated the method tu check and update camera firmware, described here : http://xdaforums.com/galaxy-s5/help/camera-firmware-thread-t2832384

The camera firmware check gave me the following :

http://xdaforums.com/attachment.php?attachmentid=3817243&stc=1&d=1468930272

Rear Cam Main : F16QLHF01SB

Rear Cam 73CX : F16QLHC0410

Front Cam : S5K8B1YX

So it looks like it is the latest camera firmware, as the firmware is the same in the camera and on the phone, so the loaded firmware is from the camera.

To be sure everything is fine, I performed a reflash of all three firmwares (Main, 73CX and Front).

Again, everything works well in TW.

Now I'm restoring CM13 to check if my issue is fixed. Fingers crossed... :rolleyes:

Edit : No way, it still doesn't work :crying:
[Samsung Galaxy S 5 Unified Development] andacro:
Related to not being able to send SMS?

Permission Denial: broadcasting Intent { act=com.android.Bugle.intent.action.ACTION_NOTIFY_CONVERSATIONS_CHANGED flg=0x10 } from com.android.messaging (pid=13099, uid=10069) is not exported from uid 10103 due to receiver com.google.android.apps.messaging/.wearable.WearableReceiver
[Samsung Galaxy S 5 Unified Development] JulGer01:
SMS working fine.

Gesendet von meinem SM-G900F mit Tapatalk
[Samsung Galaxy S 5 Unified Development] tomaasz:
Hi, how can I add my fingerprints? I can't find this in settings.

Wysłane z mojego SM-G900F przy użyciu Tapatalka
[Samsung Galaxy S 5 Unified Development] Cdub1976:
Settings/lock screen/fingerprints
[Samsung Galaxy S 5 Unified Development] haggertk:
The cmhw crash (VibratorHW and LiveDisplay not working) should be fixed in the 20 Jul nightly.

Also the occasional bootloop on flashlight turn off. Thanks for that patch [MENTION=7518817]cal002[/MENTION]!

I should note that the VibratorHW requires kernel mods, so third party kernels won't get it until they have an updated build released.
[Samsung Galaxy S 5 Unified Development] andacro:
Started working again. :victory:
[Samsung Galaxy S 5 Unified Development] ScratMan38:
So it won't work with the only kernel that lets my camera working :(
[Samsung Galaxy S 5 Unified Development] j1gga84:
[MENTION=2693412]haggertk[/MENTION]

Will the vibration intensity control be implemented again? It was removed some nightlies ago ;)

EDIT:

I just saw that vibration settings are back, many thanks! :)

regards
[Samsung Galaxy S 5 Unified Development] Cieptak:
what i have to do if i want to status bar will be always show ? because its hidden all the time
[Samsung Galaxy S 5 Unified Development] systemcrash:
edit: false alarm
[Samsung Galaxy S 5 Unified Development] haggertk:
Interestingly, I don't see anything in your logcats regarding selinux denials in the ones that supposedly fail. The one that works is the only one with avc entries in the logs. Can you try to get additional logs?

It seems to me that this force updating of the camera firmware, if that's what that tool really does, might have something to do with the problems.

No one likes to do it, but have you tried a 100% clean flash (no mods, no apps reinstalled even) to see if things work?

---------- Post added at 06:50 AM ---------- Previous post was at 06:06 AM ----------

Curious. I haven't witnessed it myself and I don't see anything that landed in that nightly that should impact things. Any possibility of catching it in a logcat?

---------- Post added at 06:57 AM ---------- Previous post was at 06:50 AM ----------

[MENTION=7518817]cal002[/MENTION] I cannot thank you enough for finding this one. I know that both Matt and I have wasted more hours than we should admit convinced it was a klte glitch. Thanks for not diving down that hole with us.

http://review.cyanogenmod.org/153188
[Samsung Galaxy S 5 Unified Development] ScratMan38:
OK, I understand what you said about avc.

Here are some more logs. To grab them, I used the following procedure (not sure if it is the right one) :

* boot to recovery

* flash kernel

* reboot system

* launch Matlog

* go back Home

* launch camera

* go back to Matlog

* pause the log

* save log to file

For Boeffla kernel, I made the logs with and without "SELinux strict" setting (strict = enforce, not strict = permissive).
[Samsung Galaxy S 5 Unified Development] mark1003:
Blutooth Fix

Long awaited fix on the horizon:

https://review.cyanogenmod.org/#/c/153188/

:fingers-crossed:
[Samsung Galaxy S 5 Unified Development] a7thousandths:
Is anybody having trouble with getting their data working with GPS at the same time? I am wondering od it has to do with the baseband version I have. The reason I say that is because I have access to two GS5, both virgin mobile/sprint and one has cm12.1 with baseband oa6 and I have another one with cm13 with baseband ok4. Is there a firmware that cm13 is based on for better compatibility? Tia as I cannot find a solution
[Samsung Galaxy S 5 Unified Development] cal002:
I also spent (not "wasted") countless hours on it, reading BT spec and code, doing many

experiments and learning a lot in the process. But in the end it was more luck than

anything else because I have an old SGS2 which still has cm10.1 and I compared

btsnoop logs with that, and the SGS2 also happens to have Broadcom BT.
[Samsung Galaxy S 5 Unified Development] babalas01:
Initiate update from "About->Updates"

Hi,

at some time point updating from Application stopped working.

Is this a bug or do I have to do something to get it working, clean flash?

Thanks

---------- Post added at 06:23 PM ---------- Previous post was at 06:16 PM ----------

Hi

another issue I observe is that after a new nightly image is flashed + wipe of dalvik cache,

my S5 reboots after optimizing all apps step and just before to show the GUI.

When I reset the phone with Home+VolDown+Power it comes up properly.

Thanks
[Samsung Galaxy S 5 Unified Development] malbert16442:
ANYONE got adb on boot enabled cm kernel
[Samsung Galaxy S 5 Unified Development] Christiancs1969:
Edit.
[Samsung Galaxy S 5 Unified Development] carabinieri5675:
Hi [MENTION=2693412]haggertk[/MENTION]. No WiFi problems in our community in Germany. I asked a lot user having klte. Since a long time they don't have any problem. By the way : you and ozzy are doing a great job. Respect!

Gesendet von meinem ONEPLUS A3003
[Samsung Galaxy S 5 Unified Development] andacro:
Couple of days ago I had it. Ran the 19.7 build, but I'm pretty sure it was the router, since I was messing with custom firmware. The exclamation mark means it's connected to the router, but there is no internet, and is using mobile data instead.
[Samsung Galaxy S 5 Unified Development] dud root:
Are commits included in the next nightly build?
[Samsung Galaxy S 5 Unified Development] mark1003:
Yes :good:
[Samsung Galaxy S 5 Unified Development] Cieptak:
What I have to do if I want my status bar was always enabled?

Wysłane z mojego SM-G900F przy użyciu Tapatalka
[Samsung Galaxy S 5 Unified Development] ScratMan38:
[MENTION=2693412]haggertk[/MENTION] : Here is a new log, shot with fully clean install of CM13 nightly of 20th of July (wipe system, data, cache, internal storage, and removed external SD ; no mod, no custom thing, no xposed, etc...).

I took the log after boot and camera launch + crash.
[Samsung Galaxy S 5 Unified Development] phalkon30:
Omg, just dirty flashed the 7/21 version, and Bluetooth is FINALLY flawless! I am so excited... I use Bluetooth several times a day, every day.

Thank you guys for working together on this problem!

Sent from my SM-G900R4 (klteusc) running CM13 7.10.16 official with xposed
[Samsung Galaxy S 5 Unified Development] Cdub1976:
Yes. No bt stutter upon wake. Thanks [MENTION=7518817]cal002[/MENTION] for your hard work. You just made a crap ton of people happy.
[Samsung Galaxy S 5 Unified Development] systemcrash:
I've been chasing this one myself and it has been stable for ages, then with the 19th nightly it "reappeared".

I also suspected the router (it runs a custom openWRT), which I checked for, now that I tested the ROM with other access points. Since nobody else has the "!" problem, I'll leave it at that. All is well with 19th nightly wifi wise.

Sorry for the false alarm.
[Samsung Galaxy S 5 Unified Development] DJSgalaxy:
I've seen you in the RR thread, have you switched over to CM13? Is the MM bootloader needed? I want to switch to CM13 only because of the BT stutter fix, just trying to nail the process down before I do it.
[Samsung Galaxy S 5 Unified Development] haggertk:
No MM bootloader required.
[Samsung Galaxy S 5 Unified Development] DJSgalaxy:
Awesome! Thanks for the quick response.

Will any gapps package work? I've been using slim mini gapps.
[Samsung Galaxy S 5 Unified Development] Cdub1976:
Yes any gapps package based on mm will work. I prefer opengapps mini.
[Samsung Galaxy S 5 Unified Development] DJSgalaxy:
Excellent. Thanks!
[Samsung Galaxy S 5 Unified Development] Atento:
Thank you [MENTION=7518817]cal002[/MENTION]! Finally the only bug in our phone in CM13 is flashlight. I'm sure it will, eventually, be fixed too because you are awesome.
[Samsung Galaxy S 5 Unified Development] f0xy:
I'm sure a patch has been submitted by cal002 already and been approved, I could be wrong
[Samsung Galaxy S 5 Unified Development] Cdub1976:
Just to follow up on Bluetooth stutter. To my surprise absolutely no stuttering even with wifi enabled while driving in the car. Notta. Ziltch. I was that close to selling my device and buying a Shamu. Thanks again Cal and Kevin for your hard work.
[Samsung Galaxy S 5 Unified Development] Zoomed:
It only fixes the "bootloop" (that could apparently even happen on a normal boot). The flashlight is still not totally fixed.
[Samsung Galaxy S 5 Unified Development] dud root:
BT stutter fixed on 2107 nightly, kltedv. Great work, thanks!
[Samsung Galaxy S 5 Unified Development] f0xy:
I have no 4g/LTE on latest nightly dirty flash on klte, I will do a clean flash after work, are there any short term fixes? 3g is fine

Scratch that, my access points got reset, sorted it
[Samsung Galaxy S 5 Unified Development] ScratMan38:
[MENTION=2693412]haggertk[/MENTION] :

I discussed with [MENTION=947981]Lord Boeffla[/MENTION] about difference between the stock CM kernel and the two versions of his kernel, and it seems the major one is regarding SELinux at boot : the Boeffla kernel 3.0 uses its own ramdisk, it starts with SELinux as permissive, and sets it to Enforce after boot ; while stock CM kernel boots with SELinux in enforce mode. The new Boeffla kernel version 3.1 is based on anykernel, so it extracts the ramdisk from stock kernel, and hence, starts in enforced mode too.

So it looks like on my phone, something is failing in the camera initialization at boot due to the SELinux strategy. The camera is then broken even if I set the SELinux to permissive later on.

Also, even with Boeffla kernel 3.0, when I boot in permissive, the camera works, but if I then change the SELinux mode to enforced after boot, it breaks the camera until I reboot in permissive mode.

Is there a way to analyze this issue on my phone ? I never used the android debugging, so if you need something from my side, please guide me, and I will be glad to help. I'm OK with using Linux and programming, even if I never coded in the android world (I'm using Python and I know a few other languages).

I know I'm the only one in the world having this problem (yeah, sometimes being unique isn't wonderful), but maybe it is due to a bug in the kernel that may lead to another issue :angel: (maybe linked also to the flashlight bug... who knows ? ).
[Samsung Galaxy S 5 Unified Development] snailer:
I had problems with my camera during the 'dark' period around 16/6 so I went back to 04/6 and reset the kernel by flashing boot.img (extracted from cm13.zip) in TWRP (I couldn't overwrite boeffla any other way). That solved the camera preview problem which affected all cameras and the status bar issue. Now back on nightlies & all good. Dunno if that's any help....
[Samsung Galaxy S 5 Unified Development] f0xy:
Flash stock and see if Samsung service will help :)
[Samsung Galaxy S 5 Unified Development] ScratMan38:
Stock ROM works perfectly well, no camera issue, and with SELinux as enforced.

So issue lies in the CM kernel.
[Samsung Galaxy S 5 Unified Development] Cieptak:
How to enabled status bar

Wysłane z mojego SM-G900F przy użyciu Tapatalka
[Samsung Galaxy S 5 Unified Development] a3yd:
Hello. I had CM 13 working great on my S5 until on a whim I tried to 'Encrypt' my device. The encryption failed (I shouldn't have tried it anyways on Nightlies). After a little struggling, I managed to put the Stock Rom and then clean installed CM 13 again on the device.

The problem now is that the 16gb model is showing 11.5GB total storage under 'Storage & USB'. I wiped all the caches and storage in Recovery twice. Could it be that the failed encrypted partition is still on the device and inaccessible? Has anyone run into this problem?
[Samsung Galaxy S 5 Unified Development] f0xy:
On 21st nightly just noticed my landscape videos are stretched :(

Also with my LTE/4g issue, it will go off when screen off and I have to toggle from 3g to 4g to get it to work
[Samsung Galaxy S 5 Unified Development] cal002:
I peeked at the log you posted, but it's not usable since too many messages get dropped

(I mentioned before in another posting, "logcat -b events -s liblog" shows the number

of messages dropped). A recent change in CameraWrapper enabled a default

log spew of CameraParameters which practically guarantees that some interesting

messages get dropped. The only thing I got from your log is an exception

because "startPreview failed", but no hint why.

Your best bet atm is to try and get all SELinux denial message at boot.

So: reboot, and run "adb logcat -b events -s auditd | tee audit.log" (it'll

wait for the device to come up). Then search for camera releated messages.

BTW, could you also post the output of "grep . /sys/class/camera/rear/*"

and "grep . /sys/class/video4linux/v*/name"?

---------- Post added at 23:26 ---------- Previous post was at 23:10 ----------

Could you describe what you mean by "failed"?

When I first encrypted mine, I didn't have a pin set because i was curious what would happen.

(What should have happened is that the device is encrypted with a default password,

which is not completely useless because on "factory data reset" the key is wiped and thus

your data unrecoverably erased.)

IIRC the result was an error message during encryption, then crashes and bootloop after reboot.

To fix, I wiped data in recovery (no need to use stock ROM). Next try I set a pin and encryption worked.
[Samsung Galaxy S 5 Unified Development] xAD3r1ty:
Anyone having troubles with today's build? i can't get past setup, status bar keeps coming and won't let me press continue

Edit: even with clean install
[Samsung Galaxy S 5 Unified Development] a3yd:
Hi. Yes it failed as it read 'Encryption Unsuccessful' - 'Reset Phone'. Rest button sent the phone into a boot loop.

I am now trying to read this thread: http://xdaforums.com/showthread.php?t=1447303

The funny thing is my /data, /system and other partitions are still available as I can still install CM 13 on the device.. only that the total storage is smaller. About 11.5GB and not 16GB.

This is why I am thinking that the failed encryption process has maybe locked out and rendered that part of the partition invisible.
[Samsung Galaxy S 5 Unified Development] callum_88:
I just tried this nightly too and same problem. Can't get passed setup. Trying an earlier one to see if I have the same problem
[Samsung Galaxy S 5 Unified Development] cal002:
11.5GB for /data is normal, 16GB total is split in many partitions for /system, firmwares, bootloaders, kernel, recovery etc.

The thread you pointed is old, for ICS and stock ROM. Not sure it'll help. But yes, when I checked source code I found

a partially done encryption should finish after reboot, so the advice to not immediately reset is good. No idea if

it will work in practise, though.

While your /data is still empty you could painlessly run some experiments to find out

what works and what doesn't, and let us know about it ;)
[Samsung Galaxy S 5 Unified Development] ScratMan38:
I took some dmesg logs right after boot yesterday using tasker to get them as fast as possible. It looks like there are much more things about camera init. They are in the Logs.zip attachment.

By looking for "cam" in the logs, I can see many lines with some read errors in the stock and 3.1 logs, with some voltage regulators disabling/enabling/setting in between (tentative to reset the camera module ?).

In the logs from stable 3.0, there are many messages about camera firmware read and write, it looks totally different...

I included the output of the two grep commands you asked in the grep_logs.zip archive. I did it for the three kernels : stock CM, Boeffla 3.1 beta 5 (both failing) and Boeffla 3.0 stable (working).
[Samsung Galaxy S 5 Unified Development] Atento:
So, is today's build buggy?

EDIT: I tried the latest one and I can confirm the bug in setup part.
[Samsung Galaxy S 5 Unified Development] EmilRodSalvador:
When you tap on the lower part (the pull down notif will appear), slide it up and use another finger to tap the button again.
[Samsung Galaxy S 5 Unified Development] DJSgalaxy:
I switched over from RR 5.7.1 and so far so good. Battery life is similar and the BT stutter when waking the screen is gone. I am still having a minor BT hiccup during music streaming in my truck. It's random but occurs regularly. I call it a hiccup because it's like a pop while the song plays. Anyways, it's a G900T, 7-21 nightly, slim mini gapps, clean flash.

Thanks again for the great work in figuring out the BT stutter.