Skip to content

Instantly share code, notes, and snippets.

@OJ7
Last active July 3, 2023 22:39
Show Gist options
  • Save OJ7/db1bd80bba4c13913150e7555ba705b8 to your computer and use it in GitHub Desktop.
Save OJ7/db1bd80bba4c13913150e7555ba705b8 to your computer and use it in GitHub Desktop.
Android/Google TV Setup (remove bloatware, install custom home launcher and apps)
#!/bin/bash
# HOWTO: Enable Developer Settings on device
# Go to Settings > About phone and tap on the "Build number" 7 times to enable Developer Options.
# Go to Settings > System > Developer Settings > 'enable' USB Debugging.
ipaddr="10.0.0.137" # Replace with IP address of Android TV device
directory="." # Replace with the directory path where the APK files are located
# Preloaded apps to remove (comment out the ones you want to keep)
package_names=(
"com.amazon.amazonvideo.livingroom" # Prime Video
"com.apple.atve.androidtv.appletv" # Apple TV
"com.cbs.ott" # Paramount+
"com.disney.disneyplus" # Disney+
"com.espn.score_center" # ESPN
"com.google.android.play.games" # Google Play Games
"com.google.android.youtube.tvmusic" # YouTube Music
"com.google.android.youtube.tv" # YouTube
"com.google.android.videos" # Google Play Movies & TV
"com.hulu.livingroomplus" # Hulu
"com.peacocktv.peacockandroid" # Peacock TV
"com.wbd.stream" # HBO Max
"com.netflix.ninja" # Netflix
)
adb connect "$ipaddr":5555
# Install custom list of apps from specified directory
for file in "$directory"/*.apk; do
if [[ -f "$file" ]]; then
adb install "$file"
fi
done
# Push wallpaper to use with [Wolf Launcher](https://troypoint.com/wolf-launcher/)
adb push wallpaper.jpg /sdcard/Download/
# Set Aerial Views as Ambient Mode/Screensaver
adb shell settings put secure screensaver_components com.neilturner.aerialviews/.ui.screensaver.DreamActivity
# Remove (disable) preloaded packages
for package_name in "${package_names[@]}"; do
adb shell pm disable-user --user 0 "$package_name"
done
# Re-enable packages using: adb shell pm enable <package-name>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment