-
-
Save det-peralta/eab8c1ffbc0263c9dcd9359ccbdedd45 to your computer and use it in GitHub Desktop.
entity_id: media_player.tcl_tv | |
command: "am start -n com.tcl.tv/.TVActivity" |
Did you find a solution yet?
I found that com.tcl.settings.model.PictureBaseManager has a method setGraphicBacklight. But could not figure out how to call it.
Hello, I found a way to set the brightness:
adb shell am startservice -n com.tcl.settings/.ShowWindowService \
-a com.tcl.settings.SHOW_WINDOW \
--es Type Settings \
--es ITEM brightness \
--es MOTION SET \
--es MOTION_VALUE <0-100>
adb shell input keyevent 4
It launches the settings application but only displays the brightness slider.
The problem is that, as this is UI based, it's not possible to do this silently and get the current value.
My TV :
Model name: Smart TV Pro
Model number: 43C645
If it doesn't work for you, here are some files I used for reverse engineering that may help:
/product/framework/com.tcl.tvmanager.jar
/product/app/SystemSettings/SystemSettings.apk
├── resources/AndroidManifest.xml -> Look for services and exported stuff
└── sources/com/tcl/settings/ShowWindowService.java -> My main source of information
adb shell service call tcl_tv_display 100 i32 0 i32 <0-100> i32 0
@sashoism this works perfectly for me but how would I get the current brightness value?
adb shell service call tcl_tv_display 100 i32 0 i32 <0-100> i32 0
@sashoism this works perfectly for me but how would I get the current brightness value?
% adb shell service call tcl_tv_display 101
Result: Parcel(00000000 00000032 '....2...')
32 is 50% in hexadecimal
service : type=1400 audit(0.0:72): avc: denied { call } for scontext=u:r:shell:s0 tcontext=u:r:tcl_display_service:s0 tclass=binder permissive=0
It seems SELinux is preventing me from interacting with this service :(
If anyone knows another way to change the brightness, I'd greatly appreciate it.