Android 13 added a standard API for controlling the flashlight brightness

Now that Android 13 added a standard API for controlling the flashlight brightness, we’d love to see the Quick Setting tile be updated to become a slider rather than just a toggle, as shown in this GIF. Would be a nice quality-of-life enhancement IMO!

For some context, Android 13 added an API that apps can call to programmatically set the brightness of the flashlight. Apps used to need root to do this on some devices (eg. writing to /sys/class/leds) or use an API only available on some OEM forks.

In the new camera HAL version introduced with Android 13, there’s a method to turn on the torch at a certain strength level. If this isn’t implemented, the corresponding Android API won’t work.

Join Us On Telegram & Add RMC to your Google News feed

Few devices have shipped an updated camera HAL when upgrading to Android 13, though, as Google Requirements Freeze (GRF) makes it so the chipset’s vendor implementation doesn’t need to be updated with each Android release. Eg. the Zenfone 9 and Nothing Phone 1 don’t support this feature.

You can check for yourself with the “Flashlight Tiramisu” app on GitHub/F-Droid. Alternatively, you can also check the VINTF manifest on your device (under /vendor/etc/vintf). The Zenfone 9 implements the legacy HIDL HAL, for example.

Google has implemented this feature, at least on the Pixel 6 and later. The camera HAL on Pixels is part of an APEX module in /vendor. (Ignore the filename of the Pixel’s camera HAL because I can assure you it’s not the legacy HIDL HAL – the manifest file says it’s named that way for compatibility purposes.)

A custom ROM called StatiXOS implemented this feature in their latest build, and an Xposed module called AOSPMods also implements it if you’re on Pixel. We’d love to see this in a future Android 13 QPR on supported Pixels!

Leave a Comment