-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgeneric-googletv.sh
More file actions
executable file
·112 lines (88 loc) · 3.8 KB
/
Copy pathgeneric-googletv.sh
File metadata and controls
executable file
·112 lines (88 loc) · 3.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
#!/bin/bash
# ==============================
# System Optimization Script by Coll147
# Android TV 14 / Google TV
# ==============================
# Checks
if ! command -v adb &> /dev/null; then
echo "[ERROR] adb is not installed or not in PATH."
exit 1
fi
echo "[INFO] Checking connected device..."
if ! adb get-state 1>/dev/null 2>&1; then
echo "[ERROR] No device connected or not authorized."
exit 1
fi
# Packages to remove/disable
PACKAGES=(
# Android services
"com.google.android.feedback"
"com.google.android.syncadapters.calendar"
"com.android.adservices.api"
# Random preinstalled apps
"com.disney.disneyplus"
"com.movistarplus.androidtv"
"com.wbd.stream"
"com.netflix.ninja"
"com.google.android.play.games"
"com.amazon.amazonvideo.livingroom"
# TD Systems
"com.electronic.manual"
"com.mediatek.wwtv.mediaplayer"
)
echo "=== PRO ANDROID TV SCRIPT - Google TV 14 ==="
echo ">>> Removing / Disabling unnecessary packages"
for pkg in "${PACKAGES[@]}"; do
echo "----------------------------------------"
echo "[INFO] Processing package: $pkg"
if adb shell pm uninstall --user 0 "$pkg"; then
echo "[OK] Successfully uninstalled: $pkg"
else
echo "[WARN] Uninstall failed. Trying to disable..."
if adb shell pm disable-user --user 0 "$pkg"; then
echo "[OK] Successfully disabled: $pkg"
else
echo "[ERROR] Could not uninstall or disable: $pkg"
fi
fi
done
echo ">>> Performance & Animation tweaks"
adb shell settings put global animator_duration_scale 1
adb shell settings put global window_animation_scale 1
adb shell settings put global transition_animation_scale 1
adb shell settings put global background_process_limit 1
adb shell settings put global activity_manager_constants max_cached_processes=8,background_settle_time=0
adb shell setprop persist.logd.size 1M
# Developer options / debug tweaks
adb shell settings put global device_config_sync_disabled_for_tests persistent
echo ">>> Installing custom launcher"
wget -O ProjectivyLauncher.apk https://github.com/spocky/miproja1/releases/download/4.68/ProjectivyLauncher-4.68-c82-xda-release.apk
adb install -r ProjectivyLauncher.apk
# Grant only TV-relevant permissions
adb shell pm grant com.spocky.projengmenu com.android.providers.tv.permission.READ_EPG_DATA
adb shell pm grant com.spocky.projengmenu com.android.providers.tv.permission.WRITE_EPG_DATA
# Accessibility & Notification access
adb shell settings put secure enabled_notification_listeners com.spocky.projengmenu/com.spocky.projengmenu.services.notification.NotificationListener
adb shell settings put secure accessibility_enabled 1
adb shell settings put secure enabled_accessibility_services com.spocky.projengmenu/com.spocky.projengmenu.services.ProjectivyAccessibilityService
# Set custom launcher as home
adb shell cmd package set-home-activity com.spocky.projengmenu/.ui.home.MainActivity
echo "=== All Done ==="
# I have to do this shit because Google
echo
echo "=============================================="
echo "[ATTENTION] Before proceeding, you MUST enable"
echo "the option to replace the current launcher with Projectivy."
echo "Projectivity settings > General > Replace actual launcher"
echo "In case you love Google TV launcher just close the script"
echo "Type 'yes' to continue:"
read -r user_confirm
if [[ "$user_confirm" != "yes" ]]; then
echo "[INFO] Launcher replacement not confirmed. Exiting script."
exit 0
fi
echo "[INFO] Proceeding to disable original launcher..."
adb shell pm disable-user --user 0 com.google.android.apps.tv.launcherx && echo "[OK] com.google.android.apps.tv.launcherx disabled."
adb reboot
echo "If your tv screen remains black, use this command to renable the launcher"
echo "adb shell pm enable com.google.android.apps.tv.launcherx"