-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFireTheTV.sh
146 lines (134 loc) · 4.75 KB
/
FireTheTV.sh
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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
#!/bin/sh
Debloat() {
# Check if Fire TV is reachable via ADB
clear
if adb get-state 1>/dev/null 2>&1; then
# Notify user about packages being disabled
clear
printf "[2] Disabling the following packages:\n\n"
# List of packages to be disabled
packages=(
com.amazon.recess
com.amazon.ssmsys
com.amazon.whisperplay.contracts
com.ivona.orchestrator
com.amazon.dpcclient
com.amazon.ceviche
com.amazon.alta.h2clientservice
com.amazon.ftv.screensaver
com.amazon.ods.kindleconnect
com.android.providers.downloads.ui
com.amazon.sharingservice.android.client.proxy
com.amazon.android.marketplace
com.amazon.tifobserver
com.amazon.aca
com.amazon.ale
com.amazon.dcp
com.amazon.ssm
com.amazon.tahoe
com.amazon.naatyam
com.amazon.tv.fw.metrics
com.amazon.device.sale.service
com.amazon.cardinal
com.amazon.tv.forcedotaupdater.v2
amazon.jackson19
com.android.managedprovisioning
com.amazon.imdb.tv.android.app
com.amazon.tmm.tutorial
com.amazon.dcp.contracts.framework.library
com.amazon.tv.support
com.amazon.sync.provider.ipc
com.amazon.tv.legal.notices
android.amazon.perm
com.amazon.kso.blackbird
com.amazon.providers.contentsupport
com.amazon.whisperjoin.middleware.np
com.amazon.application.compatibility.enforcer
com.amazon.whisperplay.service.install
com.ivona.tts.oem
com.amazon.shoptv.client
com.amazon.communication.discovery
com.amazon.tv.releasenotes
com.amazon.hedwig
com.amazon.application.compatibility.enforcer.sdk.library
com.android.bluetoothmidiservice
com.android.dreams.basic
com.android.wallpaperbackup
com.amazon.bueller.photos
com.amazon.vizzini
com.svox.pico
com.amazon.bueller.music
com.amazon.connectivitydiag
com.amazon.awvflingreceiver
com.amazon.logan
com.android.documentsui
com.amazon.tahoe
com.amazon.hedwig
com.amazon.wifilocker
com.amazon.franktvinput
com.amazon.alexa.externalmediaplayer.fireos
com.amazon.tv.alexaalerts
com.amazon.tv.alexanotifications
com.amazon.katoch
)
# Loop through the package list and disable each one
for package in "${packages[@]}"
do
adb shell pm disable-user "$package"
done
# Disable window and transition animations
adb shell settings put global window_animation_scale 0.0
adb shell settings put global transition_animation_scale 0.0
# Notify user about packages being disabled
printf "\n[3] FireTheTV has completed.\n\n"
else
# Fire TV is not reachable, prompt the user for a retry
printf "[Error] Fire TV is not reachable, please confirm:\n\n"
printf " - ADB debugging is enabled on the Fire TV\n"
printf " - This is the correct IP address of the Fire TV\n\n"
read -p "Press any key to try again: " -n 1 -s key
Main
fi
}
Main() {
# Check if Homebrew is installed, if not prompt user to install it
which -s /opt/homebrew/bin/brew
if [[ $? != 0 ]]; then
clear
printf "[Error] Homebrew is not installed, please continue with its installation:\n\n"
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Main
else
# Check if Android platform tools are installed, if not install them
if /opt/homebrew/bin/brew list | grep "android-platform-tools" >/dev/null 2>&1; then
# Disconnect any existing ADB connections
adb disconnect
clear
# Prompt user for Fire TV IP address
printf "╔═════════════════════════╗\n"
printf "║ Debloat Fire TV ║\n"
printf "╚═════════════════════════╝\n\n"
printf "[1] Enter your Fire TV's IP Address: "
read tv
# Check if the provided IP address is online, if so, try to connect
if ping -c 1 "$tv" >/dev/null 2>&1
then
adb connect $tv:5555
Debloat
else
# Error: IP address is unreachable, prompt user for retry
clear
printf "[Error] This IP address is not reachable, please confirm that:\n\n"
printf " - Both devices are on the same network\n"
printf " - The IP address is typed correctly\n\n"
read -p "Press any key to try again: " -n 1 -s key
Main
fi
else
# Install Android platform tools and restart the script
/opt/homebrew/bin/brew install --cask android-platform-tools
Main
fi
fi
}
Main