How to Modify Front and Rear Camera Settings on Android 11

How to Modify Front and Rear Camera Settings on Android 11

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!

How to Modify Front and Rear Camera Settings on Android 11

How to Modify Front and Rear Camera Settings on Android 11

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";
};
Note: The “+” sign indicates modified content.
  • After modification, recompile the kernel with the following command:
# make ARCH=arm64 device_tree_file.img -j4

How to Modify Front and Rear Camera Settings on Android 11

How to Modify Front and Rear Camera Settings on Android 11

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>
Note: The “+” sign indicates modified content.
  • After modification, recompile the kernel with the following command:
# make -j4

How to Modify Front and Rear Camera Settings on Android 11

How to Modify Front and Rear Camera Settings on Android 11

Product Purchase

Haptic Intelligence EVB3568 Harmony Development Board is a Harmony development board/industrial control motherboard based on RK3568, suitable for various smart display terminals, industrial automation terminals, and edge computing gateway products. Applications can cover edge computing, artificial intelligence, industrial HMI, industrial gateways, smart medical, self-service terminals, smart retail, energy and power industries. It has the following advantages:
  • 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;
Taobao Purchase Link:https://item.taobao.com/item.htm?ft=t&id=658789039056
END
How to Modify Front and Rear Camera Settings on Android 11

Leave a Comment