On LineageOS 23.2 (Android 16-based) there's no dedicated cmd torch/get binary, so you read the state from one of these sources:
1. Camera service dump (no root)
The camera service tracks torch mode per camera ID, and the torch status appears in its dump (HTC device PR notes confirm "dumpsys media.camera shows torch status"):
Look for the flashlight status / torch status line for the back camera ("0" on the FP4): On = torch lit, Off/Available = off.
The dump also keeps a history of flash events (newest first), so the most recent FLASH_* event tells you the last on/off transition. (AOSP camera debugging docs)
2. LineageOS torch notification (no root)
While the torch is on, LineageOS SystemUI posts a "Torch" notification:
Easy to script, e.g. adb shell dumpsys notification --noredact | grep -qi torch && echo ON || echo OFF.
3. Kernel LED sysfs (root)
With root (FP4 LineageOS builds ship su if rooted via Magisk), read the flash LED node directly — non-zero brightness = torch on:
bash
adb shell su -c 'grep -H . /sys/class/leds/*torch*/brightness /sys/class/leds/*flash*/brightness 2>/dev/null'
(Match the glob to your node: ls /sys/class/leds/ to find it — typically something like led:torch_0 on Qualcomm devices.)
Notes
You can't just call the binder yourself from the shell: ICameraService.setTorchMode requires the android.permission.CAMERA permission, which the plain adb shell context doesn't hold (AndroidGoLab binder example).
Method 1 is the most direct and reliable on a stock-locked setup; method 3 is the most bulletproof if you have root.
Oct 3, 3:20pm
This is a shared conversation and may include unverified content that doesn't reflect Mistral AI's views. Login to resume chatting.