Debloat any Android or Google TV over Wi-Fi and get an Apple TV-style home.
Python adbadblockandroid-tvandroid-tv-launcherapple-tvbloatware-removalclaude-codedebloatfire-tvgoogle-tvlauncherprivacysmart-tvsony-braviatclvibe-codingxiaomi
Start Home with the HOME action and category in the install scripts (#888)
Cristian Rojasa18323b3fca5
diff --git a/docs/devices/sony-x9000h-cn.md b/docs/devices/sony-x9000h-cn.mdindex b55101ee1..84e17eff9 100644--- a/docs/devices/sony-x9000h-cn.md+++ b/docs/devices/sony-x9000h-cn.md@@ -41,7 +41,7 @@ was therefore built from main and installed with:```shadb install -r launcher/app/build/outputs/apk/release/app-release.apk-adb shell am start -W -n com.gathin.tvhome/.MainActivity # Status: ok, cold start 926 ms+adb shell am start -W -a android.intent.action.MAIN -c android.intent.category.HOME -n com.gathin.tvhome/.MainActivity # Status: ok, cold start 926 msadb shell cmd package set-home-activity --user 0 com.gathin.tvhome/.MainActivity```diff --git a/examples/tcl-43c645/build-and-install.sh b/examples/tcl-43c645/build-and-install.shindex a9756aae2..c1cd15d4c 100755--- a/examples/tcl-43c645/build-and-install.sh+++ b/examples/tcl-43c645/build-and-install.sh@@ -37,7 +37,7 @@ $A shell mkdir -p "$DIR"$A push ../examples/tcl-43c645/config.json "$DIR/config.json" >/dev/null$A shell "printf '%s' $(date +%s) > $DIR/theme_revision"-START=$($A shell am start -W -n com.gathin.tvhome/.MainActivity | tr -d '\r')+START=$($A shell am start -W -a android.intent.action.MAIN -c android.intent.category.HOME -n com.gathin.tvhome/.MainActivity | tr -d '\r')echo "$START" | grep -q 'Status: ok' || { echo "launcher did not start, Home left as it was" >&2; exit 1; }$A shell pm grant com.gathin.tvhome android.permission.ACCESS_FINE_LOCATIONdiff --git a/launcher/build-and-install.ps1 b/launcher/build-and-install.ps1index 27fb94bc0..d893da971 100644--- a/launcher/build-and-install.ps1+++ b/launcher/build-and-install.ps1@@ -71,7 +71,7 @@ Write-Host $outif ("$out" -match 'Error') { throw 'could not set the new launcher as home; the stock launcher was left untouched' }# Start the launcher on its own, before the stock Home is touched (see build-and-install.sh, #239):# in the batch a failed start only prints an Error line and the stock launcher would be disabled anyway.-$start = (& $py -I ..\tools\tv.py 'am start -W -n com.gathin.tvhome/.MainActivity') -join "`n"+$start = (& $py -I ..\tools\tv.py 'am start -W -a android.intent.action.MAIN -c android.intent.category.HOME -n com.gathin.tvhome/.MainActivity') -join "`n"Write-Host $startif ($start -notmatch 'Status: ok' -or $start -match '(?m)^Error') { throw "the new launcher did not start (see above); $StockLauncher was left enabled" }@(diff --git a/launcher/build-and-install.sh b/launcher/build-and-install.shindex 5b4e12de4..5e187a5f3 100755--- a/launcher/build-and-install.sh+++ b/launcher/build-and-install.sh@@ -107,7 +107,7 @@ esac# fails only prints an "Error:" line, and the stock launcher would be disabled anyway, leaving the TV# with no usable Home (#239). "Status: ok" from `am start -W` means the activity really came up;# the HOME resolution further down only names a component, it does not prove the activity starts.-START_OUT=$("$PY" -I ../tools/tv.py 'am start -W -n com.gathin.tvhome/.MainActivity')+START_OUT=$("$PY" -I ../tools/tv.py 'am start -W -a android.intent.action.MAIN -c android.intent.category.HOME -n com.gathin.tvhome/.MainActivity')echo "$START_OUT"# Both halves matter: some builds answer "Status: ok" for a task that was merely brought to the# front, and an activity that cannot start still prints "Error: Activity not started".