我一直在努力强迫Android将后置摄像头用作后置摄像头和前置摄像头。这种调整应影响整个系统,因此,当任何应用程序都试图启动前置摄像头时,它将接收后置摄像头的输入。
搜索后,我发现,这是为了交换设备摄像机。
- 重新安装系统分区为可写:
$ su -c -ont -o rw,remount/system
- edit/system/vendor/etc/camera/camera_config.xml和交换全部
<位置> back</position>
到
<位置> front</position>
,反之亦然。
- 重新启动。
我对此进行了操作,它只是以我的相机为导向搞砸了。我尝试启动WhatsApp相机,它只识别我的前置摄像头(无法切换到后方)。
我找不到有关Android如何管理设备摄像机的任何正式文档。
如果可以对此进行调整,我需要一些见解,如何完成以及为什么上述方法无法按预期工作。
I've been trying to force Android to use rear camera both as rear and front camera. This tweak should affect the whole system, so when any app tries to launch front camera, it will receive input from rear camera instead.
After some search I found the following method in XDA Forum, it's meant to swap device cameras.
- Remount the system partition as writable:
$ su -c mount -o rw,remount /system
- Edit /system/vendor/etc/camera/camera_config.xml and swap all
<Position>BACK</Position>
to
<Position>FRONT</Position>
and vice versa.
- Reboot.
I managed do to it and it only messed up with my cameras orientation. I tried launching WhatsApp camera and it only recognized my front camera (couldn't switch to rear).
I can't find any official documentation on how Android manages device cameras.
I need some insights if it's possible do to this tweak, how could it be done and why the above method didn't work as intended.
发布评论