Screen Off option disabled
Is it possible to turn off tv screen during playing sth on youtube add free? When I press settings button, the screen off option is grayed out
Not reproduceable on my LG C1. Please re-open this issue when you supply your TV model, webOS version, and firmware version.
I have the same problem, LG disabled the display off button for the normal YouTube app, even if Premium is activated. I think this is done on the basis of the AppId because the ad-free app uses the same ID, the button is also grayed here.
Webos 24, but is since 23 LG C3
I can confirm this, same issue on my device. LG C4 23.20.39 FW webOS 24 / 9.2.2-1805
Youtube Adfree v. 0.3.8
I'm not aware of the mechanism that newer webOS versions uses to disable the screen off toggle.
I tried built the current main with changed ID "google.youtube.v4" (in appinfo.json). Then installed these in parallel to version 0.3.8 on my C3.
AppID mod: Button works normal 0.3.8: Button grayed out
Is there a reason that the appid of the original YouTube app was used?
Firmware: 23.20.69 webOS: 9.2.1
The original app ID is used so you can cast to it.
I think this is done on the basis of the AppId
I can confirm this, I made my own build with own AppID and now I can turn off my screen :) Personally I don't care about Google Cast, so this solution does trick for me.
I think this is done on the basis of the AppId
I can confirm this, I made my own build with own AppID and now I can turn off my screen :) Personally I don't care about Google Cast, so this solution does trick for me.
Is there a chance then to have both Google Cast and screen off option available?
I think this is done on the basis of the AppId
I can confirm this, I made my own build with own AppID and now I can turn off my screen :) Personally I don't care about Google Cast, so this solution does trick for me.
Is there a chance then to have both Google Cast and screen off option available?
I think I have found workaround. Using LG Input Hook I mapped "Alexa" button on remote to execute this command instead:
luna-send -n 1 'luna://com.webos.settingsservice/setSystemSettings' '{"category":"option","settings":{"screenOff":"on"}}'
Here is another one if that above doesn't work:
luna-send-pub -f -n 1 luna://org.webosbrew.hbchannel.service/exec '{"command":"luna-send -n 1 luna://com.webos.service.tvpower/power/turnOffScreen {}"}'
Credits go to user purplehaze915 on Discord for these commands.
Now I can turn off screen via button even with official package name.
I think this is done on the basis of the AppId
I can confirm this, I made my own build with own AppID and now I can turn off my screen :) Personally I don't care about Google Cast, so this solution does trick for me.
Any chance on this ipk being shared?
Also what's to stop them both being installed, for example use one for casting and other for turning off screen, if you renamed them and used different appIDs
Ye it appears you could do what I suggested, having two apps installed, renamed the AppID anyway and got the screen off feature back, only issue I'm facing is I can't manage it in dev manager, built from another repo anyway, all seems to work, not sure if I can upload here but here if anyone wants it youtube.patchedscreenoff.v4_0.4.1_all.zip
I think this is done on the basis of the AppId
I can confirm this, I made my own build with own AppID and now I can turn off my screen :) Personally I don't care about Google Cast, so this solution does trick for me.
Any chance on this ipk being shared?
Also what's to stop them both being installed, for example use one for casting and other for turning off screen, if you renamed them and used different appIDs
Ye it appears you could do what I suggested, having two apps installed, renamed the AppID anyway and got the screen off feature back, only issue I'm facing is I can't manage it in dev manager, built from another repo anyway, all seems to work, not sure if I can upload here but here if anyone wants it youtube.patchedscreenoff.v4_0.4.1_all.zip
Thanks for your .ipk. May I ask where is repo from?
I think this is done on the basis of the AppId
I can confirm this, I made my own build with own AppID and now I can turn off my screen :) Personally I don't care about Google Cast, so this solution does trick for me.
Any chance on this ipk being shared? Also what's to stop them both being installed, for example use one for casting and other for turning off screen, if you renamed them and used different appIDs Ye it appears you could do what I suggested, having two apps installed, renamed the AppID anyway and got the screen off feature back, only issue I'm facing is I can't manage it in dev manager, built from another repo anyway, all seems to work, not sure if I can upload here but here if anyone wants it youtube.patchedscreenoff.v4_0.4.1_all.zip
Thanks for your .ipk. May I ask where is repo from?
It's just a fork of this repo I think, has a few more features and seems to get updated a bit more regularly, whether it's better I'm not sure
https://github.com/NicholasBly/youtube-webos
I think this is done on the basis of the AppId
I can confirm this, I made my own build with own AppID and now I can turn off my screen :) Personally I don't care about Google Cast, so this solution does trick for me.
Any chance on this ipk being shared? Also what's to stop them both being installed, for example use one for casting and other for turning off screen, if you renamed them and used different appIDs Ye it appears you could do what I suggested, having two apps installed, renamed the AppID anyway and got the screen off feature back, only issue I'm facing is I can't manage it in dev manager, built from another repo anyway, all seems to work, not sure if I can upload here but here if anyone wants it youtube.patchedscreenoff.v4_0.4.1_all.zip
Thanks for your .ipk. May I ask where is repo from?
It's just a fork of this repo I think, has a few more features and seems to get updated a bit more regularly, whether it's better I'm not sure
https://github.com/NicholasBly/youtube-webos
Thanh you for sharing
root@LGwebOSTV:~# cat /var/lib/webosbrew/init.d/99-ytdark
#!/usr/bin/python3
import os
import re
import sys
PROCESS_NAME = "SettingsService"
TARGET_STRING = b"youtube.leanback.v4"
REPLACEMENT_STRING = b"xxxxxxxxxxxxxxxxxxx"
spid = int(os.popen("pidof "+PROCESS_NAME).read())
memfile = open("/proc/%d/mem" % spid, "wb+")
for mapping in open("/proc/%d/maps" % spid, "r").readlines():
start_addr, end_addr, perms = re.match(r"([0-9a-f]+)\-([0-9a-f]+)\s(\S+)\s", mapping).groups()
if not perms.startswith("r"):
continue
start_addr = int(start_addr, 16)
end_addr = int(end_addr, 16)
map_size = end_addr - start_addr
memfile.seek(start_addr)
buf = memfile.read(map_size)
if TARGET_STRING not in buf:
continue
idx = 0
while True:
idx = buf.find(TARGET_STRING, idx)
if idx < 0:
break
addr = start_addr + idx
idx += len(TARGET_STRING)
memfile.seek(addr)
memfile.write(REPLACEMENT_STRING)
This works, but is bruteforce. SettingsService binary itself probably reads out the value from some private settings provider elsewhere, may have luna api though nothing seems public. This one looks hopeful:
root@LGwebOSTV:/usr/sbin# strings performer |grep youtube
policy_tvstatus_get_youtube_app_info
policy_tvstatus_set_youtube_app_id
youtube
POLICY_TVSTATUS {"youtube_app_id":"%s"}
POLICY_TVSTATUS {"_g_youtube_app_info":"%s"}
But no idea how to poke this thing (ie set our own youtube app id).