[Google Pixel XL ROMs, Kernels, Recoveries, & Other] Alcolawl:
sdcardfs :(

Initial Problem

This is the second kernel I've tried where sdcardfs somehow breaks the stock/Google camera app.

Launching the camera after a fresh reboot results in an error about how the Camera can't find the Internal Storage. Opening my favorite Gallery app, Piktures, fixes this. After launching camera app, I can take pictures but as soon as HDR+ ends processing, the picture erases itself. I can literally just watch it disappear. Attempting to record a video (by swiping left) results in a "Can't connect to the camera." error and the app closes. Every one else seems to report that they have no problems with sdcardfs. It must be something I'm doing.

I enabled sdcardfs by adding ro.sys.sdcardfs=true to the bottom of my build.prop file.

I have verified that sdcardfs is working by dumping dmseg after a reboot:

[ 30.064606] c3 1605 sdcardfs version 2.0
[ 30.064622] c3 1605 sdcardfs: dev_name -> /data/media
[ 30.064743] c3 1605 sdcardfs: options -> fsuid=1023,fsgid=1023,multiuser,mask=6,userid=0,gid=1015
[ 30.064750] c3 1605 sdcardfs: mnt -> ffffffc0deeff320
[ 30.064788] c3 1605 sdcardfs: mounted on top of /data/media type ext4
[ 30.064876] c3 1605 SELinux: initialized (dev sdcardfs, type sdcardfs), uses genfs_contexts
[ 30.065378] c3 1605 sdcardfs version 2.0
[ 30.065391] c3 1605 sdcardfs: dev_name -> /data/media
[ 30.065397] c3 1605 sdcardfs: options -> fsuid=1023,fsgid=1023,multiuser,mask=23,userid=0,gid=9997
[ 30.065405] c3 1605 sdcardfs: mnt -> ffffffc074e2f320
[ 30.065438] c3 1605 sdcardfs: mounted on top of /data/media type ext4
[ 30.065456] c3 1605 SELinux: initialized (dev sdcardfs, type sdcardfs), uses genfs_contexts
[ 30.065555] c3 1605 sdcardfs version 2.0
[ 30.065563] c3 1605 sdcardfs: dev_name -> /data/media
[ 30.065569] c3 1605 sdcardfs: options -> fsuid=1023,fsgid=1023,multiuser,mask=7,userid=0,gid=9997
[ 30.065575] c3 1605 sdcardfs: mnt -> ffffffc0dc7217a0
[ 30.065597] c3 1605 sdcardfs: mounted on top of /data/media type ext4
[ 30.065608] c3 1605 SELinux: initialized (dev sdcardfs, type sdcardfs), uses genfs_contexts

Oddly enough, taking and saving pictures and videos with Snapchat works just fine. I also tried Z Camera from the Play Store and was able to take pictures and record video just fine. Not really a fan of the app but I just wanted to see if it effected other camera apps.

I'm currently running NOF26V and the latest release of your kernel. No other mods or bull****tery. I've checked permissions for the Google Camera app and all appears normal.

I have also attached a kmsg capture (of me taking a picture and then switching to the video camera) and logcat at the bottom. I hope that this helps identify the issue. Seems like it's just Google Camera being stupid.

EDIT:

Solution

I've fixed it! Of course right after making this long-winded post and collecting logs, I notice some errors in the kmsg.txt file and, after some quick Googling, check to see if SELinux is set to permissive. It wasn't. Ran this:

adb shell su root setenforce 0

and what do you know, the Google Camera app can take pictures and video now. How strange... And stupid on my part. Of course, I'll have to make sure that SELinux is set to permissive on boot, but that's easy. I hope this helps others in the future.