1
0
Эх сурвалжийг харах

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 жил өмнө
parent
commit
5b5fb0f56a

+ 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