Question Edge30Ultra Moto30XPro Camera research - Motorola Edge 30 Ultra / Motorola Moto X30 Pro

Let's see here how to make better use of the cams in this device
Find Attached the Camera2Test info about the cams
And the 200Mpx mode are not exposed....

The weird thing about their implementation is that their stock camera is limited in aspects that third party cameras are not, even without modding anything.
Stock camera is limited to 1080p 30fps on ultrawide and tele, while you can easily shoot 4k 30fps on both sensors in mcpro24fps, filmic pro and motioncam.
Also: Main sensor RAW output is semi-broken. No matter what app you use - you get a low contrast, low saturation, brown tinted DNG.
-----------------------------------------------------------------------
We could probably modify some camera aspects with camxoverridesettings.xml, but I can not find any good documentation about this.
-----------------------------------------------------------------------
ISP tuning seems to be done though ImagerTuning-V2.apk, which is installed on all devices.

yes good points looking a the debug device info using the stock camera app looks like it is using camera3 sdk
services/camera/libcameraservice/device3 - platform/frameworks/av - Git at Google
that may explains why new modes are not show in older apps.

And here we have the camera dump
you can get it with:
Code:
adb shell dumpsys media.camera > camera.txt
and we start to see the 200Mpx resolution
org.codeaurora.qcamera3.quadra_cfa.qcfa_dimension (80330001): int32[2]
[16384 12288 ]

Looks like to make the 200Mpx in other apps like opencamera we need to find the custom stream cameraCharacteristics, when I did it for the xiaomi 108Mpx worked with this https://gist.github.com/lgyjg/07fdc8146f1d472a0941dcd0e470c93d using "xiaomi.scaler.availableStreamConfigurations" but is failing since we need one like this for moto 'XXX.XXX.availableStreamConfigurations'
For xiami 108Mpx was:
xiaomi.scaler.availableStreamConfigurations (80400000): int32[1272]
[33 12032 9024 0 ]
[35 12032 9024 0 ]
[35 12032 9024 1 ]
....
The problem is that here the 200Mpx is not exposed a streamconfiguration
android.scaler.availableStreamConfigurations (d000a): int32[592]
[34 4096 3072 OUTPUT ]
[34 4096 3072 INPUT ]
but as
org.codeaurora.qcamera3.quadra_cfa.qcfa_dimension (80330001): int32[2]
[16384 12288 ]
or
org.quic.camera2.sensormode.info.SensorModeTable (80390000): int32[26]
[8 3 16384 12288 ]
[7 8192 6144 22 ]
[7680 4320 30 4096 ]
[3072 30 4096 3072 ]
[30 4096 3072 60 ]
[2048 1152 120 2048 ]
[1152 240 ]
or
com.lenovo.moto.quadra_cfa.qcfa_dimension (81050002): int32[2]
[16384 12288 ]
or
com.lenovo.moto.quadra_cfa.high_resolution_sizes (81050004): int32[6]
[16384 12288 16384 9216 ]
[16384 7372 ]

Also trying to set a custom CameraCharacteristics seems to be blocked, looks like it is an android 12 stuff to fix
Accessing hidden field Landroid/hardware/camera2/CameraCharacteristics;->SCALER_AVAILABLE_INPUT_OUTPUT_FORMATS_MAP:Landroid/hardware/camera2/CameraCharacteristics$Key; (blocked, reflection, allowed)

Hope someone with a similar knowledge level as yours can help out, all this low level stuff is kinda spanish to me.
You tried injecting camxoverridesettings through a magisk module and then dumped info to get the "blocked" result, right?

Killuminati91 said:
Hope someone with a similar knowledge level as yours can help out, all this low level stuff is kinda spanish to me.
You tried injecting camxoverridesettings through a magisk module and then dumped info to get the "blocked" result, right?
Click to expand...
Click to collapse
not yet with the camxoverridesettings, but I guess through that the unprocessed buffers can be obtained

there is no file in my device called camxoverridesettings.txt at vendor/etc/camera
adding one with reprocessDump=TRUE
to try to see if it generates the dump camera files at ./data/vendor/camera
but trying to do it as magisk module it does no create the file, don't know why???
we will need to wait for a TRPW soon to test directly to modify, even as RW mounted it always generates files 0 size if done with the device booted

Is there any chance that some non-root app will be able to use the 200MP mode on the camera? The stock camera app is really bad and missing of features. I tried opencamera, but it didn't recognize anything but the 12MP mode. The same for the GCam.

todortk said:
Is there any chance that some non-root app will be able to use the 200MP mode on the camera? The stock camera app is really bad and missing of features. I tried opencamera, but it didn't recognize anything but the 12MP mode. The same for the GCam.
Click to expand...
Click to collapse
not yet that I know of root or non root

Mb the key to unlock 200Mpx for other apps is finding something like "camxoverridesettingsOfUltra.txt" used in 108Mpx xiaomis like this one here https://forum.xda-developers.com/t/...-front-camera-and-full-res-jpeg-rear.4490709/

The "ofUltra" part is used by Xiaomi for multi device roms afaik. I checked the ditib firmware, which is shared between the K50 Ultra and the 12t Pro (which have different sensors).
The Ultra config in that case is for the 12t Pro.
If you replace camxoverridesettings with one from another device via magisk module the camera crashes. So its definitely overriding the file and applying parameters on our phone.
Edit: This is the content of my ./data/vendor/camera folder after adding camxoverridesettings.txt with reprocessDump=TRUE as a magisk module and snapping a pic. Will pull the data and take a look.
Code:
ChiNodeGPU.cl.bin.B8097883
IPEBLMemoryDump_RealtimePostProcessor1_IPE10_cam0_492_rt_0_processType_0_profId_0_stabT_8_err_1.txt
PrecisionFlashData00.bin
PrecisionFlashData01.bin
PrecisionFlashData02.bin
PrecisionFlashData03.bin
RealtimePostProcessor1_IPE10_cam0_request_492_err_1.txt
awbWarmStartCamera_0.txt
awbWarmStartCamera_1.txt
awbWarmStartCamera_2.txt
awbWarmStartCamera_3.txt
camera_config_dump.bin
coredump
metadata
p[IdealRaw2YUVHAL1]_req[1]_batch[0]_BPS[0]_[in]_port[0]_w[4096]_h[3072]_stride[8192]_scanline[3072]_20221028_235143_772588.RawPlain16LSB1
p[InternalZSLYuv2Jpeg1]_req[1]_batch[0]_JPEG_DMA[0]_[in]_port[0]_w[4096]_h[3072]_stride[4096]_scanline[3072]_20221028_235144_122971.YUV420NV21
p[InternalZSLYuv2Jpeg1]_req[1]_batch[0]_JPEG_Encoder[0]_[in]_port[0]_w[4096]_h[3072]_stride[4096]_scanline[3072]_20221028_235144_108014.YUV420NV21
p[SNMergeIdealRaw1]_req[1]_batch[0]_com.arcsoft.node.supernightraw[0]_[in]_port[0]_w[4096]_h[3072]_stride[8192]_scanline[3072]_20221028_235141_980423.RawPlain16LSB1
p[ZSLReprocessYuvToYuv1Streams1]_req[1]_batch[0]_IPE[0]_[in]_port[0]_w[4096]_h[3072]_stride[4096]_scanline[3072]_20221028_235144_51710.YUV420NV21
p[ZSLSnapshotFormatConvertor1]_req[1]_batch[0]_BPS[0]_[in]_port[0]_w[4096]_h[3072]_stride[5120]_scanline[3072]_20221028_235141_511226.RAWMIPI10
p[ZSLSnapshotFormatConvertor1]_req[2]_batch[0]_BPS[0]_[in]_port[0]_w[4096]_h[3072]_stride[5120]_scanline[3072]_20221028_235141_525198.RAWMIPI10
p[ZSLSnapshotFormatConvertor1]_req[3]_batch[0]_BPS[0]_[in]_port[0]_w[4096]_h[3072]_stride[5120]_scanline[3072]_20221028_235141_536845.RAWMIPI10
p[ZSLSnapshotFormatConvertor1]_req[4]_batch[0]_BPS[0]_[in]_port[0]_w[4096]_h[3072]_stride[5120]_scanline[3072]_20221028_235141_649744.RAWMIPI10
p[ZSLSnapshotFormatConvertor1]_req[5]_batch[0]_BPS[0]_[in]_port[0]_w[4096]_h[3072]_stride[5120]_scanline[3072]_20221028_235141_793595.RAWMIPI10
p[ZSLSnapshotFormatConvertor1]_req[6]_batch[0]_BPS[0]_[in]_port[0]_w[4096]_h[3072]_stride[5120]_scanline[3072]_20221028_235141_941647.RAWMIPI10
pdlibdata3.bin
Edit 2: Attached the magisk module and my camera dump.
Edit 3: These camxsettings might be especially interesting for us:
Code:
defaultMaxFPS=30
maxNonHfrFps=60
exposeFullSizeForQCFA=0
FINAL EDIT: Tested with exposeFullSizeForQCFA=TRUE and it DOES increase the exposed resolution to 33,2MP in Open Camera. Why not 200mp? No idea. On the other hand it messes up all video modes in 30fps in the stock camera. I have absolutely NO idea how that would be even related to exposing the full resolution to all aps but congrats motorola.

Killuminati91 said:
The "ofUltra" part is used by Xiaomi for multi device roms afaik. I checked the ditib firmware, which is shared between the K50 Ultra and the 12t Pro (which have different sensors).
The Ultra config in that case is for the 12t Pro.
If you replace camxoverridesettings with one from another device via magisk module the camera crashes. So its definitely overriding the file and applying parameters on our phone.
Edit: This is the content of my ./data/vendor/camera folder after adding camxoverridesettings.txt with reprocessDump=TRUE as a magisk module and snapping a pic. Will pull the data and take a look.
Code:
ChiNodeGPU.cl.bin.B8097883
IPEBLMemoryDump_RealtimePostProcessor1_IPE10_cam0_492_rt_0_processType_0_profId_0_stabT_8_err_1.txt
PrecisionFlashData00.bin
PrecisionFlashData01.bin
PrecisionFlashData02.bin
PrecisionFlashData03.bin
RealtimePostProcessor1_IPE10_cam0_request_492_err_1.txt
awbWarmStartCamera_0.txt
awbWarmStartCamera_1.txt
awbWarmStartCamera_2.txt
awbWarmStartCamera_3.txt
camera_config_dump.bin
coredump
metadata
p[IdealRaw2YUVHAL1]_req[1]_batch[0]_BPS[0]_[in]_port[0]_w[4096]_h[3072]_stride[8192]_scanline[3072]_20221028_235143_772588.RawPlain16LSB1
p[InternalZSLYuv2Jpeg1]_req[1]_batch[0]_JPEG_DMA[0]_[in]_port[0]_w[4096]_h[3072]_stride[4096]_scanline[3072]_20221028_235144_122971.YUV420NV21
p[InternalZSLYuv2Jpeg1]_req[1]_batch[0]_JPEG_Encoder[0]_[in]_port[0]_w[4096]_h[3072]_stride[4096]_scanline[3072]_20221028_235144_108014.YUV420NV21
p[SNMergeIdealRaw1]_req[1]_batch[0]_com.arcsoft.node.supernightraw[0]_[in]_port[0]_w[4096]_h[3072]_stride[8192]_scanline[3072]_20221028_235141_980423.RawPlain16LSB1
p[ZSLReprocessYuvToYuv1Streams1]_req[1]_batch[0]_IPE[0]_[in]_port[0]_w[4096]_h[3072]_stride[4096]_scanline[3072]_20221028_235144_51710.YUV420NV21
p[ZSLSnapshotFormatConvertor1]_req[1]_batch[0]_BPS[0]_[in]_port[0]_w[4096]_h[3072]_stride[5120]_scanline[3072]_20221028_235141_511226.RAWMIPI10
p[ZSLSnapshotFormatConvertor1]_req[2]_batch[0]_BPS[0]_[in]_port[0]_w[4096]_h[3072]_stride[5120]_scanline[3072]_20221028_235141_525198.RAWMIPI10
p[ZSLSnapshotFormatConvertor1]_req[3]_batch[0]_BPS[0]_[in]_port[0]_w[4096]_h[3072]_stride[5120]_scanline[3072]_20221028_235141_536845.RAWMIPI10
p[ZSLSnapshotFormatConvertor1]_req[4]_batch[0]_BPS[0]_[in]_port[0]_w[4096]_h[3072]_stride[5120]_scanline[3072]_20221028_235141_649744.RAWMIPI10
p[ZSLSnapshotFormatConvertor1]_req[5]_batch[0]_BPS[0]_[in]_port[0]_w[4096]_h[3072]_stride[5120]_scanline[3072]_20221028_235141_793595.RAWMIPI10
p[ZSLSnapshotFormatConvertor1]_req[6]_batch[0]_BPS[0]_[in]_port[0]_w[4096]_h[3072]_stride[5120]_scanline[3072]_20221028_235141_941647.RAWMIPI10
pdlibdata3.bin
Edit 2: Attached the magisk module and my camera dump.
Edit 3: These camxsettings might be especially interesting for us:
Code:
defaultMaxFPS=30
maxNonHfrFps=60
exposeFullSizeForQCFA=0
FINAL EDIT: Tested with exposeFullSizeForQCFA=TRUE and it DOES increase the exposed resolution to 33,2MP in Open Camera. Why not 200mp? No idea. On the other hand it messes up all video modes in 30fps in the stock camera. I have absolutely NO idea how that would be even related to exposing the full resolution to all aps but congrats motorola.
Click to expand...
Click to collapse
Thanks @Killuminati91 good discoveries will dig into it too!

Now with
adb shell dumpsys media.camera > camera.txt
we get this data
and now it is here: so it seems possible now!
android.scaler.availableRawSizes (d0008): int32[26]
[16384 12288 8192 6144 ]
Also now there are 5 possible cameras but only 2 are visible: the key one is this one
== Camera HAL device [email protected]/legacy/4 (v3.7) static information: ==
since it has the correct scaler:
android.scaler.availableStreamConfigurations (d000a): int32[948]
[37 16384 12288 OUTPUT ]
To expose them in principle will be necesary to add in build.prop but so far it is not geting them
vendor.camera.aux.packagelist=org.codeaurora.snapcam,net.sourceforge.opencamera
persist.vendor.camera.privapp.list=org.codeaurora.snapcam,net.sourceforge.opencamera
ro.camera.cfa.packagelist=com.motorola.coresettingsext,com.motorola.camera2,com.motorola.camera3,com.motorola.actions,net.sourceforge.opencamera,org
vendor.camera.aux.packagelist2=com.motorola.ccc,com.android.settings,com.motorola.handycam,net.sourceforge.opencamera

@Killuminati91 for changing this props is possible via magisk, seems that it is not geting them or we need to do it via https://magiskroot.net/magiskhide-props-config/

Update: Changing props via maskhidepropsconfig to:
vendor.camera.aux.packagelist= com.motorola.camera2,com.motorola.camera3,com.motorola.motocit,net.sourceforge.opencamera
camera.aux.packagelist=net.sourceforge.opencamera
persist.vendor.camera.privapp.list=org.codeaurora.snapcam
ro.camera.cfa.packagelist=com.motorola.coresettingsext,com.motorola.camera2,com.motorola.camera3,com.motorola.actions,net.sourceforge.opencamera
Edit This one is not needed works the same with 1 or 3
persist.vendor.camera.expose.aux=3
anyway this makes visible 4 cameras on OpenCamera on back and 2 on front but still no new 200Mpx anywhere
Edit2: I think the key is in android.request.availableCapabilities of the Camera HAL device [email protected]/legacy/4 (v3.7) since it has: LOGICAL_MULTI_CAMERA this is what could enable in code the access to 200Mpx mode
searching for "LOGICAL_MULTI_CAMERA" here:
android/hardware/camera2/CameraCharacteristics.java - platform/prebuilts/fullsdk/sources/android-30 - Git at Google

Other update:
if the opencamera source code at the CameraController2.java
arround line 2770 you change the 2 occurances of ImageFormat.JPG to ImageFormat.RAW10 now the 200Mpx formats appear on
camera 0,1 & 4 not display anything on 0 & 1 but doing it on camera back 4 that is the one needed, but pictures saved are not that res...
More changes is opencamera code are needed anyway

Maybe also there is a prop or camx flag to enble UltraPixelQCFA that will bring more modes beyond 33Mpx

Also worth tryinh FreedDcam https://github.com/KillerInk/FreeDcam since it already detects 4 cams w/o any mod and there is some extra params like https://github.com/KillerInk/FreeDc...dden_keys/qcom/CameraCharacteristicsQcom.java
Edit: also some of this keys could be interesting

Related

chroot success: ? about Freedreno drivers

Hey everyone. Hope this is 'dev' enough.
I haven't seen anything anywhere about AT&T note3 chroots, other than AT&T N3 can not because of lack of boot loop. Anyway, I thought i'd mention that it works quite well with partition & Xsdl. I made a small post for the interested in the general forum.
To my question: has anyone tried the freedreno drivers? ~Github link~
I haven't been able to build it properly, it's missing some .o's. I have gcc working on my chroot.
I'm also having problems with pulse/alsa/gstreamer, I think it's a permission problem. The android audio user shows as aid_audio, but the dir /dev/socket/ shows as usr:Media/grp:audio and the socket is system/system. They're recognized as users in the chroot, but they're still unable to find get access to it. I couldn't get an alsa recording app on from playstore to connect to it either.
I'm kinda wondering if something funky with permissions after towelroot. I couldn't get su,chroot, etc to work properly until I got the system to recognize su as 'root' instead of uid:0. Once I got that everything for su started working? So, lost and confused. Ideas on what i'm doing wrong?
thanks!
I was able to build a kernel with DRM and KGSL DRM interface enabled, boot CM11 with it, open SSH in my Debian chroot, kill Android, and then attempt to run Xorg with the freedreno driver but I ended up getting a memory mapping error and a segfault.
The Note 3's panel is a command-mode DSI panel which means it will not automatically display what is written to /dev/graphics/fb0 like you would expect. Instead, you must call an ioctl (FBIOPAN_DISPLAY) to force a refresh of the display. The panel must be on for this to work. I'm not sure the exact sequence required to turn on the display but it involves opening /dev/graphics/fb0 and possibly mmap'ing it. If you use the fbdev Xorg driver it will turn on the panel, but you must then run a program to continuously send the FBIOPAN_DISPLAY ioctl to refresh it. This is non-accelerated and also seems to crash any GTK apps (only X11 basic apps like xterm worked, and even then the refreshing was glitchy).
I'm trying to tackle kexec-hardboot first because that will allow booting an entirely-Debian-focused kernel with the correct color mode and the DRM drivers and all. It will likely require some patches to the KGSL GPU code in the kernel, at least it did on my Note 1. Get on #freedreno on Freenode if you aren't already there, lots of knowledgeable people there to analyze logs and find patches. I got it working on my HP TouchPad and Note i717 with help from there.
Very nice, thanks!
I've only gotten fb to work on my nexus5.
Also thanks for the heads up on the freenode. Going to check it out.
Have you messed with sound at all?
Edit:
Wait, did you do this on a 900A? (I'm probably way behind times?)
N900T, so bootloader-unlocked. It will be doubly hard to do on the N900A since you'll have to compile as modules rather than just compile your own kernel, at least unless you guys get kexec (non-hardboot) working on the locked variants. You should be able to mess around with the framebuffer on the stock kernel just fine though, only the freedreno driver needs custom kernel changes.
I haven't messed around with sound at all. On my HP TouchPad I figured out how to use ALSA UCM files which set up the mixer controls. By default Android locks the sound devices so using them from a chroot while Android is running probably won't happen, but with Android out of the way you may be able to use them. I do know on the Note 1 and the HP TouchPad you have to load q6.xxx firmware files for the audio system to initialize during boot.
This file will be of interest when writing ALSA UCM files:
https://github.com/CyanogenMod/android_device_samsung_hlte-common/blob/cm-11.0/audio/mixer_paths.xml
I used the TouchPad's mixer_paths.xml file to write two UCM "verbs" - one to turn on internal speakers and one to turn on headphones. The UCM file basically sets the given switches to the given values and is basically just a reformatting of mixer_paths.xml. I was unable to find a mixer_paths.xml for the Note 1 and thus haven't messed with sound on it yet (it has to exist somewhere...).
CalcProgrammer1 said:
N900T, so bootloader-unlocked. It will be doubly hard to do on the N900A since you'll have to compile as modules rather than just compile your own kernel, at least unless you guys get kexec (non-hardboot) working on the locked variants. You should be able to mess around with the framebuffer on the stock kernel just fine though, only the freedreno driver needs custom kernel changes.
I haven't messed around with sound at all. On my HP TouchPad I figured out how to use ALSA UCM files which set up the mixer controls. By default Android locks the sound devices so using them from a chroot while Android is running probably won't happen, but with Android out of the way you may be able to use them. I do know on the Note 1 and the HP TouchPad you have to load q6.xxx firmware files for the audio system to initialize during boot.
This file will be of interest when writing ALSA UCM files:
https://github.com/CyanogenMod/android_device_samsung_hlte-common/blob/cm-11.0/audio/mixer_paths.xml
I used the TouchPad's mixer_paths.xml file to write two UCM "verbs" - one to turn on internal speakers and one to turn on headphones. The UCM file basically sets the given switches to the given values and is basically just a reformatting of mixer_paths.xml. I was unable to find a mixer_paths.xml for the Note 1 and thus haven't messed with sound on it yet (it has to exist somewhere...).
Click to expand...
Click to collapse
Great thanks! That explains a few things with the boot lock. FB has been a total no go for me. I read something about the type of display not working with it? I have no idea if that's true, and can't seem to find that information right now. (it worked great on the my note2). If someone has gotten success let me know! I'll check out the UCM once more. I did get ALSA working with debian on the note 1, so that's the first thing I tried. My Touchpad, I thought, worked right out of the box. (I miss that thing!)
I'll give it shot tonight and see what I get. thanks a lot to both of you.
The Note 3's panel is a command mode panel while the Note 1's panel is video mode. I'm not sure about the Note 2 as I don't have one but if it worked for you it was likely video mode as well. In video mode it works like you'd expect any display to work - the framebuffer memory is automatically drawn to the screen at a fixed refresh rate (60Hz). A command mode panel is different, the framebuffer is only drawn to the display when it is commanded to, and thus the software has control over the refresh rate of the display. I did a test where I found the section of code in the Note 3's kernel where it does the software refresh and stuck a printk in there. I had the kmsg printing out over SSH while I swiped the screen around in Android. Sure enough, the printout only happened when I moved my finger and caused the framebuffer to update, the screen completely stopped refreshing otherwise.
I'm still trying to find a good solution to this, especially in regards to running kexec-hardboot and the kexecboot bootloader GUI. I've been able to get kexecboot to display by sticking an FBIOPAN_DISPLAY ioctl into the framebuffer sync function that kexecboot calls after it updates the screen. This ioctl seems to force the display to refresh, but only if certain conditions are met (and I'm unsure what all these conditions are). I do know that the LCD (actually AMOLED but it's listed as LCD panel in the code) must be powered on, the framebuffer must be open (i.e. call the open() function to /dev/graphics/fb0 and get a file descriptor), and possibly memory-mapped as well (the code I was using as a software refresher had mmap, though it might not be necessary). This is another thing to go to #freedreno for, a user there (crondog) has been working on Freedreno on the 2013 Nexus 7 which also has a command mode panel and he's done some software refresher work.

[Q] RAW photos in Z3 with Android 5.0

It's really good to hear the Z3 models will get Android 5.0 sometime in the beginning of next year. As you might have read, Android 5.0 supports RAW image capture (in the API).
What I'm trying to figure out is if the Z3 will be able to utilize the RAW image capture functionality in the new Android.
I have written an "app" that prints all the possible camera settings to screen, and unfortunately there is no setting mentioning RAW. The only valid picture setting is 'jpeg'.
Maybe this will change in a future version? Or will A5 take RAW regardless of the capabilities in the camera settings?
Thanks!
Very inyereting . can't wait to see how this unveils
This article should answer the question: http://www.anandtech.com/show/8274/understanding-androids-camera-hal3
Doesn't this effectively mean that Lollipop (and new camera apps, utilizing Lollipops camera API) will solve most of the issues caused by unlocking the bootloader?
If third-party apps can access RAW from the camera, quality on par with, or even beyond, the stock camera-app on locked phones should be able to achieve.
I mean, degraded camera performance seems to be the most discussed problem with loosing the DRM keys. I for one wouldn't mind loosing Miracast and Sony services.
Yes and no. Third party software could do better in theory, but the sensor output still stays the same. Software can't perform miracles. And Sony's software already is quite advanced (whatever causes automatic mode to fail so badly is beyond me).
radicans said:
What I'm trying to figure out is if the Z3 will be able to utilize the RAW image capture functionality in the new Android.
I have written an "app" that prints all the possible camera settings to screen, and unfortunately there is no setting mentioning RAW. The only valid picture setting is 'jpeg'.
Click to expand...
Click to collapse
RAW isn't a sensor setting, it is a data encoding. The only "mandatory" difference between shooting "RAW" and "JPEG" in Android L is the binary format of the data you get back. RAW makes it possible to return *lots* of information about what's coming off the sensor, but it doesn't mandate it. For example, if Sony's proprietary software is using the white channel in the Exmor RS to get low-light performance (and no one knows for sure if it is), there's no guarantee they'll choose to include that in the RAW file. They could discard the W data (since only Sony's software really understands what to do with it) and give you back just the RGB.
Now, the ability to get back uncompressed (or losslessly compressed) data means 3rd party image post processing can do a better job with less artifacts. And the ability to request burst captures opens up the possibility of temporal noise reduction techniques. But we're probably a year or more away from having stable apps doing really interesting things with the new APIs.
Bottom line, if you must have root and camera quality is really important to you, do not buy a Z3C just on the "hope" that Android L will provide an adequate work-around.
Iruwen said:
This article should answer the question: http://www.anandtech.com/show/8274/understanding-androids-camera-hal3
Click to expand...
Click to collapse
Thanks for the informative article!
I have a slightly better image (!) of what is going on with the new API now. Although, it still leaves me uncertain about the RAW mode in the Z3. Quoting from the article:
"in effect it’s now possible to control shutter speed, ISO, focus, flash, white balance manually, along with options to control exposure level bias, exposure metering algorithms, and also select the capture format. This means that the images can be output as JPEG, YUV, RAW/DNG, or any other format that is supported."
Seeing as there is nothing in the current camera preferences indicating that RAW capture is allowed/supported, I guess we just have to wait and see.
Assuming though we will get RAW support, there will be quite some development work to get a decent noise free image, in phone, just working straight from the Bayer pattern! But if that is the only way to circumvent the sony processing algorithms, then so be it!
kopsis said:
RAW isn't a sensor setting, it is a data encoding. The only "mandatory" difference between shooting "RAW" and "JPEG" in Android L is the binary format of the data you get back. RAW makes it possible to return *lots* of information about what's coming off the sensor, but it doesn't mandate it. For example, if Sony's proprietary software is using the white channel in the Exmor RS to get low-light performance (and no one knows for sure if it is), there's no guarantee they'll choose to include that in the RAW file. They could discard the W data (since only Sony's software really understands what to do with it) and give you back just the RGB.
Click to expand...
Click to collapse
Thanks for the info, although I do know what RAW is What I was trying to point out is that there is nothing in the current camera parameters (in the API) indicating that we are allowed to ask for a RAW image, when taking a photo. So even if Android 5 supports RAW requests, I think the sony camera driver may still refuse to deliver one to us.
But what confuses me is that in Android 4 Camera API, you are also allowed to ask for a RAW image (not meaning you are guaranteed to get one), so in this respect I don't know what the difference is to Android 5.
radicans said:
But what confuses me is that in Android 4 Camera API, you are also allowed to ask for a RAW image (not meaning you are guaranteed to get one), so in this respect I don't know what the difference is to Android 5.
Click to expand...
Click to collapse
You can get a raw image with m8 or G2 or any other devices that permits it See this thread.
http://forum.xda-developers.com/showthread.php?t=2753946
As for further manual controls all are avialable except raw on the hybrid samsung zoom devices. There was no need for L there i don't know why vendors do not implement it more with their current flagship models.

[ROOT] Manual Video mode and other features on Oreo

Hello everybody,
I've been looking at the /system/etc/camera_config.xml file, and I noticed that there are so many features that the LG camera app supports, but some of them are disabled even if they work on our G5. So I made a flashable zip to enable these features:
Manual Video mode: works very well, but doesn't support 21:9 aspect ratio (also broken in Fulmics 5.5 G6 camera port)
Graphy (applies settings from existing photos to yours): working perfectly, you just need to install Graphy from the Play Store to access to many more photos.
Adjust Exposure in Automatic mode with a slider: working
Add signature: not working on my phone, may be worth to try on some other phones
ZSL (zero shutter lag) on Manual mode: working, but if you set exposure or shutter to AUTO, the camera shows a value of "0" for both ISO and shutter. It's just an UI bug, the photos are taken as expected.Removed, as it has too many drawbacks.
If you don't have TWRP, just extract the camera_config.xml file and place it in /system/etc/ and be sure to set permissions correctly.
If the options are not available after flashing the zip, clear the data of the camera app.
By the way, looking inside the Smali code of the camera app, it seems thate there is a [email protected] mode, but I have no clue on how to enable it to test if our camera supports such a high frame rate.
Lowering exposure on automatic would be useful. I always though on stock it was set too high with the wide angle exposure being perfect.
How exactly does that work? Will a slider button appear where there was none before? And do you think it can be done for Nougat?
EDIT: I'd like to manually edit the file myself, what do you have to change just to get the automatic mode exposure slider?
Thanks mate for your great finding.. I manually edit my LG V20 camera config according to yours and it's working as it should.
Those exposure slider should be a handy to me.. and graphy? idk what that is but i will try to explore those someday..
thanks again..
EDIT -
there is no need to reboot if change those config line, simply just clear the camera data and voila ! this should be time saving..
anyway, i'm going to spread your finding on LG V20 forums.. keep on the good works !
@tremalnaik
wow this is awesome, it is LG V30+ features for the Graphy things. Could you please find out how to get Cine Video Effect working as well?
@daniLaLaLaLaLa
Just found this thread, thanks to you.
Am I able to use this mod using Nougat on LGV20?
Please advise.
Thank you.
karkand said:
@tremalnaik
wow this is awesome, it is LG V30+ features for the Graphy things. Could you please find out how to get Cine Video Effect working as well?
@daniLaLaLaLaLa
Just found this thread, thanks to you.
Am I able to use this mod using Nougat on LGV20?
Please advise.
Thank you.
Click to expand...
Click to collapse
I guess it won't work on Nougat due to different camera apps.
ezzony said:
Lowering exposure on automatic would be useful. I always though on stock it was set too high with the wide angle exposure being perfect.
How exactly does that work? Will a slider button appear where there was none before? And do you think it can be done for Nougat?
EDIT: I'd like to manually edit the file myself, what do you have to change just to get the automatic mode exposure slider?
Click to expand...
Click to collapse
To lower the exposure just tap on the screen on the area you want to focus, then a slider with two suns will appear next to the shutter button. That's the slider for the exposure.
If you want to add that feature yourself, open the /system/etc/camera_config.xml file with a text editor (TotalCommander, Root Explorer, etc...) and look for AE_focus_supported string and replace "false" with "true".
If you want to do it on Nougat you can try, if you already find AE_focus_supported string in camera_config.xml, it will likely work.
karkand said:
@tremalnaik
wow this is awesome, it is LG V30+ features for the Graphy things. Could you please find out how to get Cine Video Effect working as well?
@daniLaLaLaLaLa
Just found this thread, thanks to you.
Am I able to use this mod using Nougat on LGV20?
Please advise.
Thank you.
Click to expand...
Click to collapse
I'll try to find out a way to use Cine Video Effect, there are some other modes, like mode_cinema and mode_disney_camera that are built in the camera code, but they make the camera app crash when selecting mode. There's also mode_food, that is shown correctly in the mode selection menu, but then crashes. Maybe some complementary files are missing from G5. I'll try to debug and see if it's just a matter of adding some files or if we need to edit the code.
If you want to use my file on V20 Nougat you can try, but make a backup of camera_config.xml, because different versions of camera app might not recognize some strings and crash. If you don't succeed, try editing your file, it's quite simple, you just have to replace some "false" with "true" and check if all works as expected.
EDIT: tried mode_cinema: the interface works perfectly, but it doesn't do anything You have the tutorial, the interactive zoom and the LUTs, but none of them works out of the box. As @xpirt explains here, Cinema Mode depends on the V30 camera sensor, and cannot be ported to G5 (and of course to G5, having the same sensor, at least on the primary camera).
Also Grid Photo (there are 4 modes) is buggy, because it takes stretched photos, with wrong aspect ratio and weird glitches. In this case doesn't seem to be a bug related to the hardware, but to the software.
@tremalnaik, ya that worked but it's ae_supported I think you meant not ae_focus. Anyway the setting was not available on my Nougat fone, I guess it could be made to work some way. I think I have the G6 camera app on my nougat g5 fone now I can't remember. Maybe it could be made to work by porting the G5 Oreo camera app over.
Incidentally what I don't like about the main rear camera is that it has a slighly orangy/yellow-y hue at times. The G4 camera was better. I wonder if there is any way to adjust it or is it basically the camera hardware.
For the AE Focus you might try adding this lines to your camera_config.xml
Code:
<item name="AE_focus_supported">
true
</item>
and see if your camera app makes use of this setting.
For the color I really don't know, there's so much code in that app to explore... If the color is too orange, you may want to switch to manual mode and set the white balance to something cooler. The problem would be if the color was too green or too purple (magenta), it wouldn't be possible to correct it using white balance, you woud need to edit the RAW file (or the JPG, with worst results).
https://drive.google.com/open?id=0BwmsIySoHg2FamhOaEQ1T1o0Wkk
---------- Post added at 01:30 PM ---------- Previous post was at 01:28 PM ----------
use this apk instead of playstore.after that active it in setting of camera.perhaps you may restart phone after install the apk.that's all
While I was testing the H-ROM G7, I noticed a bug in the camera that made me realize that Zero Shutter Lag and Manual mode are not compatible. If you have flashed the configuration with ZLS active in manual mode, please replace it flashing the other zip file.
Enabling ZLS has 2 huge drawbacks: not being able to save DNG raw files and having less control over shutter speed (especially not being able to take long exposures).
As I'm currently using H-ROM, I can't test if on stock Oreo this bug is there, but I'm pretty sure it is.
After playing around with smali code of the camera app, it seems to be possible to make manual video work without root (and the G7 camera app)
@jc9896 mind sharing your work?
Black_Eyes said:
@jc9896 mind sharing your work?
Click to expand...
Click to collapse
Extract the zip, install the app but dont open, and then copy the CamMod folder into the root of the internal storage.
I modified the app to search the CamMod folder for the relevant xml files.
Not a developer, no idea how to fix bugs and crashes.
Download here : https://mega.nz/#!ORIUBY6D!QzzC6m1BBYp-9LQB9kYIW9b2TFYyf7AqiO26T46sgos
Frank
Merci
tremalnaik said:
Hello everybody,
I've been looking at the /system/etc/camera_config.xml file, and I noticed that there are so many features that the LG camera app supports, but some of them are disabled even if they work on our G5. So I made a flashable zip to enable these features:
Manual Video mode: works very well, but doesn't support 21:9 aspect ratio (also broken in Fulmics 5.5 G6 camera port)
Graphy (applies settings from existing photos to yours): working perfectly, you just need to install Graphy from the Play Store to access to many more photos.
Adjust Exposure in Automatic mode with a slider: working
Add signature: not working on my phone, may be worth to try on some other phones
ZSL (zero shutter lag) on Manual mode: working, but if you set exposure or shutter to AUTO, the camera shows a value of "0" for both ISO and shutter. It's just an UI bug, the photos are taken as expected.Removed, as it has too many drawbacks.
If you don't have TWRP, just extract the camera_config.xml file and place it in /system/etc/ and be sure to set permissions correctly.
If the options are not available after flashing the zip, clear the data of the camera app.
By the way, looking inside the Smali code of the camera app, it seems thate there is a [email protected] mode, but I have no clue on how to enable it to test if our camera supports such a high frame rate.
Click to expand...
Click to collapse
Greetings!
I have a question. Is it possible in any way to install this apk on LG G5 running Nougat 7.0. When I try to install the app, It says "error parsing the package". This is probbably due to incompatibility with Nougat. I know there is a minimum SDK version set inside the apk files (AndroidManifest.xml) so would it be possible to tweak some settings? The software of the camera app on Oreo is messed up, producing noisy images so I wouldn't like to sacrifice that.
ToTheSpace2 said:
Greetings!
I have a question. Is it possible in any way to install this apk on LG G5 running Nougat 7.0. When I try to install the app, It says "error parsing the package". This is probbably due to incompatibility with Nougat. I know there is a minimum SDK version set inside the apk files (AndroidManifest.xml) so would it be possible to tweak some settings? The software of the camera app on Oreo is messed up, producing noisy images so I wouldn't like to sacrifice that.
Click to expand...
Click to collapse
For noisy images and general picture quality, I recommend Google Camera 6.1 on Oreo. (5.x on Nougat) Makes a huge difference in image quality.
You can find a good version by searching up google camera ports on xda, such as cstark's and Arnova's versions work well.
As for the stock cam, I tried with no success to port manual video over. There has been attempts iirc but it seems that manual video encoding is broken on Nougat. That issue is resolved on Oreo.
jc9896 said:
For noisy images and general picture quality, I recommend Google Camera 6.1 on Oreo. (5.x on Nougat) Makes a huge difference in image quality.
You can find a good version by searching up google camera ports on xda, such as cstark's and Arnova's versions work well.
As for the stock cam, I tried with no success to port manual video over. There has been attempts iirc but it seems that manual video encoding is broken on Nougat. That issue is resolved on Oreo.
Click to expand...
Click to collapse
Thank you for the reply!
Do you mind checking out a thread I made about LG G5 noise problem on Oreo (link: https://forum.xda-developers.com/lg-g5/help/long-exposure-images-lg-g5-oreo-noisier-t3956693)
I don't know if that's the general problem or is it just me, maybe you know something more about it? The manual video for Oreo is amazing but this image noise bug bothers me.
ToTheSpace2 said:
Thank you for the reply!
Do you mind checking out a thread I made about LG G5 noise problem on Oreo (link: https://forum.xda-developers.com/lg-g5/help/long-exposure-images-lg-g5-oreo-noisier-t3956693)
I don't know if that's the general problem or is it just me, maybe you know something more about it? The manual video for Oreo is amazing but this image noise bug bothers me.
Click to expand...
Click to collapse
There is noise on mine. Seems to be about the same as Nougat (can't really tell from my pics), but as I use GCam nowadays its not as much of a problem. Night sight on Oreo (GCam 6.1) does a lot to improve night shots and noise.
jc9896 said:
Extract the zip, install the app but dont open, and then copy the CamMod folder into the root of the internal storage.
I modified the app to search the CamMod folder for the relevant xml files.
Not a developer, no idea how to fix bugs and crashes.
Download here : https://mega.nz/#!ORIUBY6D!QzzC6m1BBYp-9LQB9kYIW9b2TFYyf7AqiO26T46sgos
Click to expand...
Click to collapse
I have tested your port for several days on my LG G5 (Oreo stock) and I am very grateful for your work. I know that some functions do not work but the most important ones for me such as manual video and manual photo modes work quite well. The LG Camera app 7.0 with your modifications is infinitely better than the one included in the stock rom.
Before, I had tried several video recording apps with manual controls from the Play Store but they used to have small jumps in the recordings. It seems that only LG apps record well in 4K with stock rom.
Works as described. Thank you for these tweaks. ???

Enable LG Camera app's 'Shutter sound' setting to toggle camera sound on/off (ROOT)

For those wanting to use the LG Camera app on the V40 but do not have an option to toggle the camera's sounds and want it, then the script below should enable the 'Shutter sound' setting.
*A disclaimer and a reminder that in Japan and Korea, and possibly other countries, by silencing the camera sounds you may be breaking the law iiuc - so do check! - I cannot be held liable if you are arrested, charged, fined, sent to jail, etc. - You do this at your own risk!*
That said, where I am based it is not, and I find the shutter sound annoying. There are modules around that will silence your LG Camera app, they work by changing the files containing the sound into silent/empty ones. Not a great solution if you want to have the choice about whether you want sound or not. However, there is already a setting for this buried inside the LG Camera app and this will enable it for you:
So, assuming you have Magisk installed on your phone, please run these commands from your computer:
Code:
adb shell
su
echo "resetprop ro.vendor.lge.build.target_operator TRF_VZW" > /data/adb/post-fs-data.d/enable_shutter_sound_setting.sh
chmod 755 /data/adb/post-fs-data.d/enable_shutter_sound_setting.sh
reboot
Once it restarts, load up the LG Camera app, tap the settings button (top left?), then if you scroll through the settings you should see a 'Shutter sound' setting you can toggle on and off. I've only tested this on my LM-V405EBW, it is possible other versions may be different.
If you'd like a bit more detail about what is going on here, then:
First (line) just starts up a shell on your phone
Second gives you root (you may need to grant access in Magisk)
Third writes a system property to a file to change the mobile operator your LG apps may believe they are running against. The TRF_VZW value is one of two that will allow the 'Shutter sound' setting to appear in the LG Camera app
Forth makes the file you just created executable to the android system
Fifth will reboot the phone and enable this property for the LG Camera app to use, and give you the 'Shutter sound' setting option
I should point out a caveat: this setting change may mean other LG apps may also make assumptions about what you can or cannot do as if you were a Tracfone phone. This only affects LG apps it seems though, so probably not too bad, but worth knowing perhaps :angel:. If you want to remove this change then please run:
Code:
adb shell
su
rm /data/adb/post-fs-data.d/enable_shutter_sound_setting.sh
reboot
Something I don't understand (yet) is why some report that turning the phone to silent/vibrate mode will also silence the LG Camera app's shutter sound too - this does not work on mine... not a big thing as this works well for me. Maybe it is something about starting with a LM-V405EBW V20a-IND-XX - if anyone knows, please leave a comment. Thank you
Finally, If you'd like far too much detail about this under the hood then please indulged yourself:
I downloaded the app from the phone at /system/product/priv-app/LGCameraApp/LGCameraApp.apk
Decompiled it and found this interesting piece of code in the playSound function of the SoundManager class:
Code:
if (!FunctionProperties.isSupportedShutterSoundSetting() || ... )
So looking at the isSupportedShutterSoundSetting function in the FunctionProperties class, we see that this is how it determines who has this setting:
Code:
ModelProperties.getCarrierCode() == 6;
Looking inside the getCarrierCode function of the ModelProperties class, we find that two carriers return a 6, and we also see the system property they use:
Code:
sCarrierCodeMap.put("VZW", 6);
...
if ("TRF_VZW".equals(SystemProperties.get("ro.vendor.lge.build.target_operator"))) {
sCarrierCode = 6;
So by setting the system property 'ro.vendor.lge.build.target_operator' to 'VZW' (Verizon Wireless, I'd guess) or 'TRF_VZW' (Tracfone on Verizon ¯\_(ツ)_/¯) we can enable seeing the 'Shutter sound' option in LG's Camera app's menu. Enjoy!
Update: So after playing around with other LG apps, Phone and Contacts had some issues using VZW. I didn't dig too deeply into this, but can imagine an if statement or two. I found TRF_VZW is largely an unknown operator which seems to default to OPEN, as you would probably want
Stone-cold stock on V405UA20F in USA. I'm guessing only where disabling it is illegal, will be interested. View attachment 4951499
Sent from my LM-V405 using Tapatalk
Einsteindks said:
Stone-cold stock on V405UA20F in USA
Click to expand...
Click to collapse
Thank you for the data point... I'll do a bit more digging later on.
For others: this image is what you should see, I should have posted one too, thank you @Einsteindks
Einsteindks said:
Stone-cold stock on V405UA20F in USA
Click to expand...
Click to collapse
So this stock is Verizon Wireless - so your build target operator will be VZW under the hood.
You may check this with:
Code:
adb shell
getprop ro.vendor.lge.build.target_operator
If I am correct, it should say 'VZW' - and why you have the 'Shutter sound' setting by default.
Before doing what the original post said, mine was set to 'OPEN' - which is what both my original and flashed firmwares were built with
Thanks, the small Code from #1 is working finde in my Android 12 LG V50 (500N40C). Korean Phone with 4G Vodafone.de

persist.camera.switch.aux=unknown

What is purpose of this prop? It appeared after android 10 update. I could not find any information about it but I cannot use second rear camera with any third party apps. I tried changing camera.aux.packagelist, vendor.camera.aux.packagelist, persist.vendor.camera.expose.aux, I also added persist.camera.expose.aux but apps still can't detect second rear camera. Does anyone know values of prop in the title?
Thanks in advance.
Edit: persist.vendor.camera.switch.aux=unknown
If you want to use the second cam on the rear you need different things:
1. A gcam that can switch between cams like the latest The_Dise version here: https://www.celsoazevedo.com/files/android/google-camera/dev-the_dise/#apk1549
2. You also need the Magisk module to enable the auxiliary buttons. You can download this from within The_Dise's gcam or from here directly: https://f.celsoazevedo.com/file/cfiles/gcm1/dmgcaux_v1.zip
3. You need a ROM that can handle it. It didn't work on stock for me, but on Pixel Experience it works.
All and all it was not worth the trouble in my opinion, but I just wanted to test it. I think it has more purpose for the higher end phones with more different cams on their back.

Categories

Resources