Skip to content

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

Add-on installs on Windows: sdk.dir with forward slashes, manage.py finds gradlew.bat

ScaryFr92dbb67be98313
diff --git a/addons/ad-blocking/install.sh b/addons/ad-blocking/install.sh
index 2c5f8b15f..0fd0499dc 100755
--- a/addons/ad-blocking/install.sh
+++ b/addons/ad-blocking/install.sh
@@ -18,7 +18,7 @@ PKG=io.github.maxhayim.adblocking
# Script paths stay relative: with MSYS_NO_PATHCONV, Git Bash would hand Windows Python a /c/... path.
tv() { "$PY" -I ../../tools/tv.py "$@"; }
-[ -f local.properties ] || { [ -n "${ANDROID_HOME:-}" ] && echo "sdk.dir=$ANDROID_HOME" > local.properties; } || true
+[ -f local.properties ] || { [ -n "${ANDROID_HOME:-}" ] && echo "sdk.dir=${ANDROID_HOME//\\//}" > local.properties; } || true
if [ -n "${JAVA_HOME:-}" ]; then export PATH="$JAVA_HOME/bin:$PATH"; fi
./gradlew assembleRelease -q --console=plain
diff --git a/addons/airplay-status/install.sh b/addons/airplay-status/install.sh
index 345339fba..5beab081a 100755
--- a/addons/airplay-status/install.sh
+++ b/addons/airplay-status/install.sh
@@ -12,7 +12,7 @@ PKG=io.github.maxhayim.airplaystatus
# Script paths stay relative: with MSYS_NO_PATHCONV, Git Bash would hand Windows Python a /c/... path.
tv() { "$PY" -I ../../tools/tv.py "$@"; }
-[ -f local.properties ] || { [ -n "${ANDROID_HOME:-}" ] && echo "sdk.dir=$ANDROID_HOME" > local.properties; } || true
+[ -f local.properties ] || { [ -n "${ANDROID_HOME:-}" ] && echo "sdk.dir=${ANDROID_HOME//\\//}" > local.properties; } || true
if [ -n "${JAVA_HOME:-}" ]; then export PATH="$JAVA_HOME/bin:$PATH"; fi
./gradlew assembleRelease -q --console=plain
diff --git a/addons/brightness/install.sh b/addons/brightness/install.sh
index 81bc1e161..b4a978562 100755
--- a/addons/brightness/install.sh
+++ b/addons/brightness/install.sh
@@ -12,7 +12,7 @@ PKG=io.github.maxhayim.brightness
# Script paths stay relative: with MSYS_NO_PATHCONV, Git Bash would hand Windows Python a /c/... path.
tv() { "$PY" -I ../../tools/tv.py "$@"; }
-[ -f local.properties ] || { [ -n "${ANDROID_HOME:-}" ] && echo "sdk.dir=$ANDROID_HOME" > local.properties; } || true
+[ -f local.properties ] || { [ -n "${ANDROID_HOME:-}" ] && echo "sdk.dir=${ANDROID_HOME//\\//}" > local.properties; } || true
if [ -n "${JAVA_HOME:-}" ]; then export PATH="$JAVA_HOME/bin:$PATH"; fi
./gradlew assembleRelease -q --console=plain
diff --git a/addons/frigate-glance/install.sh b/addons/frigate-glance/install.sh
index d79568306..46dec83d4 100644
--- a/addons/frigate-glance/install.sh
+++ b/addons/frigate-glance/install.sh
@@ -36,7 +36,7 @@ if not ok: # the value holds a password: never print it
sys.exit('"mqtt" must look like mqtt://user:password@host:1883, special characters percent-encoded')
EOF
-[ -f local.properties ] || { [ -n "${ANDROID_HOME:-}" ] && echo "sdk.dir=$ANDROID_HOME" > local.properties; } || true
+[ -f local.properties ] || { [ -n "${ANDROID_HOME:-}" ] && echo "sdk.dir=${ANDROID_HOME//\\//}" > local.properties; } || true
if [ -n "${JAVA_HOME:-}" ]; then export PATH="$JAVA_HOME/bin:$PATH"; fi
./gradlew assembleRelease -q --console=plain
diff --git a/addons/headphones/install.sh b/addons/headphones/install.sh
index f7f403beb..ea19a6d4b 100755
--- a/addons/headphones/install.sh
+++ b/addons/headphones/install.sh
@@ -12,7 +12,7 @@ PKG=io.github.maxhayim.headphones
# Script paths stay relative: with MSYS_NO_PATHCONV, Git Bash would hand Windows Python a /c/... path.
tv() { "$PY" -I ../../tools/tv.py "$@"; }
-[ -f local.properties ] || { [ -n "${ANDROID_HOME:-}" ] && echo "sdk.dir=$ANDROID_HOME" > local.properties; } || true
+[ -f local.properties ] || { [ -n "${ANDROID_HOME:-}" ] && echo "sdk.dir=${ANDROID_HOME//\\//}" > local.properties; } || true
if [ -n "${JAVA_HOME:-}" ]; then export PATH="$JAVA_HOME/bin:$PATH"; fi
./gradlew assembleRelease -q --console=plain
diff --git a/addons/quiet-hours/install.sh b/addons/quiet-hours/install.sh
index 0bf9b0f88..d1647b5b1 100755
--- a/addons/quiet-hours/install.sh
+++ b/addons/quiet-hours/install.sh
@@ -12,7 +12,7 @@ PKG=io.github.maxhayim.quiethours
# Script paths stay relative: with MSYS_NO_PATHCONV, Git Bash would hand Windows Python a /c/... path.
tv() { "$PY" -I ../../tools/tv.py "$@"; }
-[ -f local.properties ] || { [ -n "${ANDROID_HOME:-}" ] && echo "sdk.dir=$ANDROID_HOME" > local.properties; } || true
+[ -f local.properties ] || { [ -n "${ANDROID_HOME:-}" ] && echo "sdk.dir=${ANDROID_HOME//\\//}" > local.properties; } || true
if [ -n "${JAVA_HOME:-}" ]; then export PATH="$JAVA_HOME/bin:$PATH"; fi
./gradlew assembleRelease -q --console=plain
diff --git a/addons/remote-access/install.sh b/addons/remote-access/install.sh
index 988032b02..1bfe52741 100755
--- a/addons/remote-access/install.sh
+++ b/addons/remote-access/install.sh
@@ -12,7 +12,7 @@ PKG=io.github.maxhayim.remoteaccess
# Script paths stay relative: with MSYS_NO_PATHCONV, Git Bash would hand Windows Python a /c/... path.
tv() { "$PY" -I ../../tools/tv.py "$@"; }
-[ -f local.properties ] || { [ -n "${ANDROID_HOME:-}" ] && echo "sdk.dir=$ANDROID_HOME" > local.properties; } || true
+[ -f local.properties ] || { [ -n "${ANDROID_HOME:-}" ] && echo "sdk.dir=${ANDROID_HOME//\\//}" > local.properties; } || true
if [ -n "${JAVA_HOME:-}" ]; then export PATH="$JAVA_HOME/bin:$PATH"; fi
./gradlew assembleRelease -q --console=plain
diff --git a/addons/smart-home/install.sh b/addons/smart-home/install.sh
index 60153ab6f..8e37cb94c 100755
--- a/addons/smart-home/install.sh
+++ b/addons/smart-home/install.sh
@@ -18,7 +18,7 @@ PKG=io.github.maxhayim.smarthome
# Script paths stay relative: with MSYS_NO_PATHCONV, Git Bash would hand Windows Python a /c/... path.
tv() { "$PY" -I ../../tools/tv.py "$@"; }
-[ -f local.properties ] || { [ -n "${ANDROID_HOME:-}" ] && echo "sdk.dir=$ANDROID_HOME" > local.properties; } || true
+[ -f local.properties ] || { [ -n "${ANDROID_HOME:-}" ] && echo "sdk.dir=${ANDROID_HOME//\\//}" > local.properties; } || true
if [ -n "${JAVA_HOME:-}" ]; then export PATH="$JAVA_HOME/bin:$PATH"; fi
./gradlew assembleRelease -q --console=plain
diff --git a/addons/sources/install.sh b/addons/sources/install.sh
index 1a6960944..a1bdd3d63 100755
--- a/addons/sources/install.sh
+++ b/addons/sources/install.sh
@@ -12,7 +12,7 @@ PKG=io.github.maxhayim.sources
# Script paths stay relative: with MSYS_NO_PATHCONV, Git Bash would hand Windows Python a /c/... path.
tv() { "$PY" -I ../../tools/tv.py "$@"; }
-[ -f local.properties ] || { [ -n "${ANDROID_HOME:-}" ] && echo "sdk.dir=$ANDROID_HOME" > local.properties; } || true
+[ -f local.properties ] || { [ -n "${ANDROID_HOME:-}" ] && echo "sdk.dir=${ANDROID_HOME//\\//}" > local.properties; } || true
if [ -n "${JAVA_HOME:-}" ]; then export PATH="$JAVA_HOME/bin:$PATH"; fi
./gradlew assembleRelease -q --console=plain
diff --git a/tools/manage.py b/tools/manage.py
index 0e9c00c89..fe8e372ac 100644
--- a/tools/manage.py
+++ b/tools/manage.py
@@ -168,7 +168,8 @@ def install_addon(item, extra):
# The creator's own script, as their README says to run it.
return run(["bash", str(folder / item["script"])] + extra, ROOT)
# No script: the steps addons/README.md gives for every add-on.
- gradlew = "gradlew.bat" if os.name == "nt" else "./gradlew"
+ # Windows resolves a relative program against this process's directory, not cwd, so give the full path.
+ gradlew = str(folder / "gradlew.bat") if os.name == "nt" else "./gradlew"
code = run([gradlew, "assembleRelease"], folder)
if code:
return code