I havent heard of that and touch sensitivity is really good but I think you can increase it b enabling glove mode.
Does anyone know how to increase the torch power? Like z1-z2-z3 years ago?
#!/system/bin/sh
toggle=$(cat /sys/class/leds/led:switch/brightness)
if [ "$toggle" = "0" ];then
echo 90 > /sys/class/leds/led:torch_0/brightness
echo 90 > /sys/class/leds/led:torch_1/brightness
echo 1 > /sys/class/leds/led:switch/brightness
echo "on"
else
echo 0 > /sys/class/leds/led:torch_0/brightness
echo 0 > /sys/class/leds/led:torch_1/brightness
echo 0 > /sys/class/leds/led:switch/brightness
echo "off"
fi
I tried to do the widget, but when I start it , Permission denied appears.
I have rooted device, and I gave SM manager root permissions...
I wrote a script (attached) which toggles the torch on and off with a "90" brightness. It has to be run with su (root).
Code:#!/system/bin/sh toggle=$(cat /sys/class/leds/led:switch/brightness) if [ "$toggle" = "0" ];then echo 90 > /sys/class/leds/led:torch_0/brightness echo 90 > /sys/class/leds/led:torch_1/brightness echo 1 > /sys/class/leds/led:switch/brightness echo "on" else echo 0 > /sys/class/leds/led:torch_0/brightness echo 0 > /sys/class/leds/led:torch_1/brightness echo 0 > /sys/class/leds/led:switch/brightness echo "off" fi
Also I used Script Manager to set up a home screen widget to run this script, so I have a "bright torch" toggle on my home screen. Maybe someone could make this into an app so this solution wouldn't be quite as clunky.
Thank you - your script works well!
A minor issue is that when you run the script thru the widget shortcut, it pulls open the Script Manager app. Do you know any way to avoid this? Maybe an additional line in the script that kills the current app?
Thanks again.
killall os.tools.scriptmanager
Good idea. Add this line to end of the script and it will close Script Manager.
Code:killall os.tools.scriptmanager
Thanks for the guide, now I successfully edited my config, and I can use godly torch app to control light intensity.I haven't figured out how to increase the stock torch brightness the same way I could on the Z3c, but I found an okay workaround to override it temporarily. On the stock MM ROM I'm running, the brightness is controlled by two files: "/sys/class/leds/led:torch_0/brightness" and "/sys/class/leds/led:torch_1/brightness". You can edit these to any number (don't burn out your led....I haven't tried anything above 1000), then toggle on the torch by changing "/sys/class/leds/led:switch/brightness" to "1". The torch can then be turned off by changing "/sys/class/leds/led:switch/brightness" to "0". The stock flashlight brightness is "12", which is really dim, but "90" has been a good brightness for me so far.
I wrote a script (attached) which toggles the torch on and off with a "90" brightness. It has to be run with su (root).
Code:#!/system/bin/sh toggle=$(cat /sys/class/leds/led:switch/brightness) if [ "$toggle" = "0" ];then echo 90 > /sys/class/leds/led:torch_0/brightness echo 90 > /sys/class/leds/led:torch_1/brightness echo 1 > /sys/class/leds/led:switch/brightness echo "on" else echo 0 > /sys/class/leds/led:torch_0/brightness echo 0 > /sys/class/leds/led:torch_1/brightness echo 0 > /sys/class/leds/led:switch/brightness echo "off" fi
Also I used Script Manager to set up a home screen widget to run this script, so I have a "bright torch" toggle on my home screen. Maybe someone could make this into an app so this solution wouldn't be quite as clunky.
i edit name folder switch to worck for xz3 i tested for me is worck good and plzz i need mehtod before edit in rom like defaut#!/system/bin/sh
toggle=$(cat /sys/class/leds/led:switch_0/brightness)
if [ "$toggle" = "0" ];then
echo 90 > /sys/class/leds/led:torch_0/brightness
echo 90 > /sys/class/leds/led:torch_1/brightness
echo 1 > /sys/class/leds/led:switch_0/brightness
echo "on"
else
echo 0 > /sys/class/leds/led:torch_0/brightness
echo 0 > /sys/class/leds/led:torch_1/brightness
echo 0 > /sys/class/leds/led:switch_0/brightness
echo "off"
fi
Does anyone know how to increase the torch power? Like z1-z2-z3 years ago?
#!/system/bin/sh
toggle=$(cat /sys/class/leds/led:switch/brightness)
if [ "$toggle" = "0" ];then
echo 90 > /sys/class/leds/led:torch_0/brightness
echo 90 > /sys/class/leds/led:torch_1/brightness
echo 1 > /sys/class/leds/led:switch/brightness
echo "on"
else
echo 0 > /sys/class/leds/led:torch_0/brightness
echo 0 > /sys/class/leds/led:torch_1/brightness
echo 0 > /sys/class/leds/led:switch/brightness
echo "off"
fi
I havent heard of that and touch sensitivity is really good but I think you can increase it b enabling glove mode.
I tried to do the widget, but when I start it , Permission denied appears.
I have rooted device, and I gave SM manager root permissions...
I wrote a script (attached) which toggles the torch on and off with a "90" brightness. It has to be run with su (root).
Code:#!/system/bin/sh toggle=$(cat /sys/class/leds/led:switch/brightness) if [ "$toggle" = "0" ];then echo 90 > /sys/class/leds/led:torch_0/brightness echo 90 > /sys/class/leds/led:torch_1/brightness echo 1 > /sys/class/leds/led:switch/brightness echo "on" else echo 0 > /sys/class/leds/led:torch_0/brightness echo 0 > /sys/class/leds/led:torch_1/brightness echo 0 > /sys/class/leds/led:switch/brightness echo "off" fi
Also I used Script Manager to set up a home screen widget to run this script, so I have a "bright torch" toggle on my home screen. Maybe someone could make this into an app so this solution wouldn't be quite as clunky.