Skip to content

Debloat any Android or Google TV over Wi-Fi and get an Apple TV-style home.

build-and-install.ps1: key helpers are enabled again on Windows PowerShell

Jose Berumenf2cab486754d
diff --git a/launcher/build-and-install.ps1 b/launcher/build-and-install.ps1
index 639946de2..989b76acd 100644
--- a/launcher/build-and-install.ps1
+++ b/launcher/build-and-install.ps1
@@ -92,7 +92,10 @@ Write-Host "Home now resolves to $homeNow"
# Optional accessibility services, appended to enabled_accessibility_services without dropping others.
function Enable-Service([string]$Name) {
$svc = "com.gathin.tvhome/.$Name"
- & $py -I ..\tools\tv.py ('s=$(settings get secure enabled_accessibility_services); case "$s" in *' + $Name + '*) ;; null|"") settings put secure enabled_accessibility_services ' + $svc + ' ;; *) settings put secure enabled_accessibility_services "$s:' + $svc + '" ;; esac; settings put secure accessibility_enabled 1; echo ' + $Name + ' enabled')
+ # Through stdin: Windows PowerShell 5.1 drops the inner double quotes from a native argument, and the
+ # TV's shell then fails with "no closing quote" while the service stays off.
+ ('s=$(settings get secure enabled_accessibility_services); case "$s" in *' + $Name + '*) ;; null|"") settings put secure enabled_accessibility_services ' + $svc + ' ;; *) settings put secure enabled_accessibility_services "$s:' + $svc + '" ;; esac; settings put secure accessibility_enabled 1; echo ' + $Name + ' enabled') |
+ & $py -I ..\tools\tv.py --batch
}
if ($InputKeyService) { Enable-Service 'InputKeyService' }
if ($HomeKeyService) { Enable-Service 'HomeKeyService' }