[T-Mobile Galaxy Note 4 Android Development] fattire:
Makin' Open Camera work

That's because it's still in-progress. I didn't push my changes to the repo yet. I was hoping gekke would show up, as we were kind of working on it together yesterday, but anyway, he was out most of the day.

Here is how to get it to work with open camera. if you apply the diff above for CameraWrapper and media_profiles.xml, you should have UHD recording in Open Camera.

So that fixes it for Open Camera. However, I think the issue we're having with getting it to work with stock/google camera is that we're not properly building the Camera2 support stuff. I discovered we may be short-changing ourselves w/our current HAL and other library files/bins (using the CameraWrapper that is modified above).. So I've spent the last few hours trying to build the caf (code aurora) hardware support. But I'm burnt out now and it's still getting a missing symbol error I don't feel like trying it any more, so I'll share my progress in case anyone wants to pick it up. I know where the missing bit is, but it's been too many hours.

Basically, and this is mostly directed to gekke, but anyway-- to try using CAF's camera stuff-- get rid of the current camerawrapper (you can just rename the Android.mk in /camera to like Android.mk.dontuse) so you don't build it accidentally, then add this to roomservice.xml:

<remote fetch="git://codeaurora.org" name="caf" />

<project name="external/gigabyte/platform/hardware/qcom/camera" path="hardware/qcom/camera-caf/apq8084" remote="caf" revision="caf/LA.BF.2.1_rb1.6" />

I was putting this in "hardware/qcom/camera-caf/apq8084" originally to keep with convention, but it's probably better to just put it in hardware/qcom/camera -- anyway, if you want to use camera-caf/apq8084, you'll need these changes:

diff --git a/QCamera2/Android.mk b/QCamera2/Android.mk
index 0282add..82127af 100644
--- a/QCamera2/Android.mk
+++ b/QCamera2/Android.mk
@@ -41,6 +41,7 @@ LOCAL_C_INCLUDES := \
frameworks/native/include/media/hardware \
frameworks/native/include/media/openmax \
hardware/qcom/media/libstagefrighthw \
+ hardware/qcom/media-caf/apq8084/libstagefrighthw \
system/media/camera/include \
$(LOCAL_PATH)/../mm-image-codec/qexif \
$(LOCAL_PATH)/../mm-image-codec/qomx_core \
@@ -49,20 +50,22 @@ LOCAL_C_INCLUDES := \
#HAL 1.0 Include paths
LOCAL_C_INCLUDES += \
frameworks/native/include/media/hardware \
- hardware/qcom/camera/QCamera2/HAL
+ hardware/qcom/camera/QCamera2/HAL \
+ hardware/qcom/camera-caf/apq8084/QCamera2/HAL

LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include

#LOCAL_STATIC_LIBRARIES := libqcamera2_util
LOCAL_C_INCLUDES += \
- hardware/qcom/display/libgralloc
+ hardware/qcom/display/libgralloc \
+ hardware/qcom/display-caf/apq8084/libgralloc

LOCAL_SHARED_LIBRARIES := libcamera_client liblog libhardware libutils libcutils libdl
LOCAL_SHARED_LIBRARIES += libmmcamera_interface libmmjpeg_interface libui libcamera_metadata

LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/hw
-#LOCAL_MODULE := camera.$(TARGET_BOARD_PLATFORM)
-LOCAL_MODULE := camera.$(TARGET_DEVICE)
+LOCAL_MODULE := camera.$(TARGET_BOARD_PLATFORM)
+#LOCAL_MODULE := camera.$(TARGET_DEVICE)
LOCAL_MODULE_TAGS := optional

include $(BUILD_SHARED_LIBRARY)
diff --git a/QCamera2/stack/mm-camera-interface/Android.mk b/QCamera2/stack/mm-camera-interface/Android.mk
index 62e7976..685bc61 100644
--- a/QCamera2/stack/mm-camera-interface/Android.mk
+++ b/QCamera2/stack/mm-camera-interface/Android.mk
@@ -35,7 +35,8 @@ LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include
LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include/media
LOCAL_ADDITIONAL_DEPENDENCIES := $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr

-LOCAL_C_INCLUDES += hardware/qcom/media/mm-core/inc
+LOCAL_C_INCLUDES += hardware/qcom/media/mm-core/inc \
+ hardware/qcom/media-caf/apq8084/mm-core/inc

ifneq (1,$(filter 1,$(shell echo "$$(( $(PLATFORM_SDK_VERSION) >= 17 ))" )))
LOCAL_CFLAGS += -include bionic/libc/kernel/common/linux/socket.h
(END)

I have to take a break for a couple days.