[Bug]: HiLight's settings doesn't respect the Privileged access method
Bug Description
Why HiLight function need Shizuku or Porter if I've root?
Steps to Reproduce
- Go to settings
- Make sure "Privileged access" is selected to "root"
- Go to HiLight setting
- Tap to a "Try out" button on these settings page
Expected Behavior
To respect selected the Privileged access method.
Screenshots
No response
Android Version
Android 17
Device
Pixel 11 Pro
App Version
19.1-beta.2
Additional Context
No response
Thanks for the report. This is currently expected behaviour rather than a regression, but it's a fair gap.
Hilight drives the LEDs through the system lights service (ILightsManager), which needs CONTROL_DEVICE_LIGHTS. That permission is signature|privileged, so it can't be granted to the app with pm grant. Shizuku and Porter work because they hand Essentials a binder running as the shell user, which already holds it. Root mode in Essentials only runs su -c shell commands, so there's no binder to call the lights service through. That's why HilightLights.isModeSupported() only accepts Shizuku and Porter, and why "Try it" does nothing in Root mode.
Workaround for now: if you start Shizuku (it can run as root), set Privileged access to Shizuku or Auto and Hilight will work.
Possible fixes:
- In Root mode, fall back to Shizuku's binder when Shizuku is running, and make the status text clearer when it isn't.
- Proper root support via libsu's
RootService: a small service running as uid 0 that makes theILightsManagercalls (getLights, openSession, setLightStates, closeSession) over a tiny AIDL interface, withHilightLightspicking the Shizuku or root path.
@sameerasw would you be open to option 2? It adds the libsu dependency, so I wanted to check before opening a PR. Happy to do option 1 on its own if you'd rather not.
Thanks for the report. This is currently expected behaviour rather than a regression, but it's a fair gap.
Hilight drives the LEDs through the system
lightsservice (ILightsManager), which needsCONTROL_DEVICE_LIGHTS. That permission is signature|privileged, so it can't be granted to the app withpm grant. Shizuku and Porter work because they hand Essentials a binder running as the shell user, which already holds it. Root mode in Essentials only runssu -cshell commands, so there's no binder to call the lights service through. That's whyHilightLights.isModeSupported()only accepts Shizuku and Porter, and why "Try it" does nothing in Root mode.Workaround for now: if you start Shizuku (it can run as root), set Privileged access to Shizuku or Auto and Hilight will work.
Possible fixes:
- In Root mode, fall back to Shizuku's binder when Shizuku is running, and make the status text clearer when it isn't.
- Proper root support via libsu's
RootService: a small service running as uid 0 that makes theILightsManagercalls (getLights, openSession, setLightStates, closeSession) over a tiny AIDL interface, withHilightLightspicking the Shizuku or root path.@sameerasw would you be open to option 2? It adds the libsu dependency, so I wanted to check before opening a PR. Happy to do option 1 on its own if you'd rather not.
I am fine but we do need some external proper testing with this as we don't got rooted devices to test.
I totally agree. We especially need rooted Pixel 11 devices. Unless @Celestial04 you are willing to help me with the testing?
8. I totally agree. We especially need rooted Pixel 11 devices. Unless @Celestial04 you are willing to help me with the testing?
yep, ofc!