
This article introduces how to modify the front and rear camera attributes in the Android 11 system. Demonstration usingHaptic Intelligence EVB3568 Harmony Development Board, equipped with Rockchip RK3568, quad-core A55 processor, 2.0GHz main frequency, 1T computing power NPU; supports OpenHarmony 5.0 and operating systems such as Linux and Android, with rich interfaces, making development evaluation faster!

Kernel Configuration Modification
-
Modify the following configurations in the related kernel device tree file:
ov5648: ov5648@36 {
status = "okay";
compatible = "ovti,ov5648";
reg = <0x36>;
clocks = <&cru CLK_CIF_OUT>;
clock-names = "xvclk";
power-domains = <&power RK3568_PD_VI>;
pinctrl-names = "default";
pinctrl-0 = <&cif_clk>;
reset-gpios = <&gpio3 RK_PA3 GPIO_ACTIVE_HIGH>;
pwdn-gpios = <&gpio2 RK_PC1 GPIO_ACTIVE_HIGH>;
rockchip,camera-module-index = <0>;
+ rockchip,camera-module-facing = "back";//back: rear front: front
rockchip,camera-module-name = "LMM248";
rockchip,camera-module-lens-name = "YXC-M804A2";
};
-
After modification, recompile the kernel with the following command:
# make ARCH=arm64 device_tree_file.img -j4
Android Source Code Configuration Modification
-
Modify the configuration of the following directory files:
<profiles>
<profiles cameraid="0" moduleid="m00" name="ov5648">
<supported_hardware>
<hwtype value="SUPPORTED_HW_RKISP1"></hwtype>
<supported_hardware>
<android_metadata> <!-- Android static metadata only -->
<!-- Color Correction -->
<colorcorrection.availableaberrationmodes value="OFF"></colorcorrection.availableaberrationmodes>
<!-- Control -->
<control.availablemodes value="AUTO"></control.availablemodes>
<control.aeavailableantibandingmodes value="OFF,50HZ,60Hz,AUTO"></control.aeavailableantibandingmodes>
......
+<lens.facing value="BACK"></lens.facing> <!-- BACK: rear FRONT: front-->
</android_metadata></supported_hardware></supported_hardware></profiles></profiles>
-
After modification, recompile the kernel with the following command:
# make -j4

Product Purchase
-
Supports open-source Harmony OpenHarmony/Android/ Linux multi-operating system; -
Quad-core A55 processor, with a maximum frequency of 2.0GHz, Mali G52-2EE GPU supports 2D acceleration; -
8M ISP performance, supports HDR; -
1T computing power NPU, supports TensorFlow/Caffe/ MXNet/PyTorch and other deep learning frameworks; -
Equipped with 2 x Gigabit Ethernet, 9 x USB expansion, Industrial interconnection interfaces (2 CAN and 5 serial ports); -
Supports 4K video decoding and multi-screen display, supports HDMI/MIPI/eDP/LVDS video interfaces; -
Supports 5G/4G/WiFi Bluetooth wireless communication functions;
