浏览代码

Attempt to fix flashlight by using a symbolic link

OrangeFox tries to enable flashlight by echoing the value of OF_FL_PATH(1/2)/max_brightness to OF_FL_PATH(1/2)/brightness.
A simple way to fix this issue without creating a new node named brighntess for flashlight is to create a symbolic link to the file for enabling flashlight ( /sys/devices/virtual/camera/flash/rear_flash in this case ), name that symbolic link brightness and create a normal file named max_brightness with the value that enables flashlight.
Yilliee 5 年之前
父节点
当前提交
5b5fb0f56a
共有 3 个文件被更改,包括 5 次插入0 次删除
  1. 1 0
      recovery/root/system/flashlight/brightness
  2. 1 0
      recovery/root/system/flashlight/max_brightness
  3. 3 0
      vendorsetup.sh

+ 1 - 0
recovery/root/system/flashlight/brightness

@@ -0,0 +1 @@
+/sys/devices/virtual/camera/flash/rear_flash

+ 1 - 0
recovery/root/system/flashlight/max_brightness

@@ -0,0 +1 @@
+1

+ 3 - 0
vendorsetup.sh

@@ -49,6 +49,9 @@ if [ "$1" = "$FDEVICE" -o "$FOX_BUILD_DEVICE" = "$FDEVICE" ]; then
 		export FOX_USE_TWRP_RECOVERY_IMAGE_BUILDER=1
 		export OF_USE_MAGISKBOOT=1
 		export OF_USE_MAGISKBOOT_FOR_ALL_PATCHES=1
+		export OF_FL_PATH1="/system/flashlight"
+		export OF_FL_PATH2=""
+		export OF_FLASHLIGHT_ENABLE=1
 		export OF_USE_TWRP_SAR_DETECT=1
 		export OF_DISABLE_KEYMASTER2=1
 		export OF_LEGACY_SHAR512=1