Skip to content

Commit

Permalink
Update Fire-Tools.sh
Browse files Browse the repository at this point in the history
Added better documentation and switched from uninstalling apps to disabling apps so you can eventually revert the debloat. Decreased gapps file size from 200 mb to 79 mb and added support for 32-bit devices.
  • Loading branch information
mrhaydendp authored Jul 27, 2021
1 parent 469caac commit 5ff9a6e
Showing 1 changed file with 84 additions and 85 deletions.
169 changes: 84 additions & 85 deletions Fire-Tools.sh
Original file line number Diff line number Diff line change
@@ -1,116 +1,115 @@
#!/bin/bash

# Check if there's an ADB connection
adb devices

# User Interface
opt=$(zenity --list --title=Fire-Tools --width=800 --height=500 --column=Option --column=Tool Debloat 'Removes Amazon Apps' \
'Google-Services' 'Installs Google services and Play Store' 'Change-Launcher' 'Disables fire launcher and replaces it with Nova Launcher' \
Foss 'Installs free and open source alternatives such as F-Droid, Brave, Lawnchair, and Newpipe' 'Disable-OTA' 'Disables OTA updates' 'Custom-Apps' 'Put .apk files in Custom folder for batch install')
'Disable-OTA' 'Disables OTA updates' 'Custom-Apps' 'Put .apk files in Custom folder for batch install')


# Options
# Comment out any packages you don't want disabled
if [ $opt = 'Debloat' ]
if [ "$opt" = 'Debloat' ]
then
(
adb uninstall -k --user 0 amazon.alexa.tablet
adb uninstall -k --user 0 com.amazon.device.backup
adb uninstall -k --user 0 com.amazon.device.backup.sdk.internal.library
adb uninstall -k --user 0 com.amazon.device.crashmanager
adb uninstall -k --user 0 com.amazon.device.logmanager
adb uninstall -k --user 0 com.amazon.device.sync
adb uninstall -k --user 0 com.amazon.device.sync.sdk.internal
adb uninstall -k --user 0 com.amazon.dp.contacts
adb uninstall -k --user 0 com.amazon.dp.fbcontacts
adb uninstall -k --user 0 com.amazon.dp.logger
adb uninstall -k --user 0 com.amazon.geo.client.maps
adb uninstall -k --user 0 com.amazon.geo.mapsv2
adb uninstall -k --user 0 com.amazon.geo.mapsv2.services
adb uninstall -k --user 0 com.amazon.goodreads.kindle
adb uninstall -k --user 0 com.amazon.h2settingsfortablet
adb uninstall -k --user 0 com.amazon.kcp.tutorial
adb uninstall -k --user 0 com.amazon.kindle
adb uninstall -k --user 0 com.amazon.kindle.cms
adb uninstall -k --user 0 com.amazon.kindle.devicecontrols
adb uninstall -k --user 0 com.amazon.kindle.kso
adb uninstall -k --user 0 com.amazon.kindle.otter.settings
adb uninstall -k --user 0 com.amazon.kindle.personal_video
adb uninstall -k --user 0 com.amazon.kindle.unifiedSearch
adb uninstall -k --user 0 com.amazon.legalsettings
adb uninstall -k --user 0 com.amazon.logan
adb uninstall -k --user 0 com.amazon.mp3
adb uninstall -k --user 0 com.amazon.ods.kindleconnect
adb uninstall -k --user 0 com.amazon.parentalcontrols
adb uninstall -k --user 0 com.amazon.photos
adb uninstall -k --user 0 com.amazon.photos.importer
adb uninstall -k --user 0 com.amazon.platform
adb uninstall -k --user 0 com.amazon.pm
adb uninstall -k --user 0 com.amazon.precog
adb uninstall -k --user 0 com.amazon.readynowcore
adb uninstall -k --user 0 com.amazon.recess
adb uninstall -k --user 0 com.amazon.socialplatform
adb uninstall -k --user 0 com.amazon.tahoe
adb uninstall -k --user 0 com.amazon.unifiedsharefacebook
adb uninstall -k --user 0 com.amazon.unifiedsharegoodreads
adb uninstall -k --user 0 com.amazon.unifiedsharesinaweibo
adb uninstall -k --user 0 com.amazon.unifiedsharetwitter
adb uninstall -k --user 0 com.amazon.vans.alexatabletshopping.app
adb uninstall -k --user 0 com.amazon.venezia
adb uninstall -k --user 0 com.amazon.webapp
adb uninstall -k --user 0 com.amazon.whisperlink.activityview.android
adb uninstall -k --user 0 com.amazon.whisperlink.core.android
adb uninstall -k --user 0 com.android.email
adb uninstall -k --user 0 com.amazon.whisperplay.contracts
adb uninstall -k --user 0 com.amazon.windowshop
adb uninstall -k --user 0 com.amazon.zico
adb uninstall -k --user 0 com.audible.application.kindle
adb uninstall -k --user 0 com.goodreads.kindle
adb uninstall -k --user 0 com.here.odnp.service
adb uninstall -k --user 0 com.kingsoft.office.amz
adb uninstall -k --user 0 org.mopria.printplugin
adb shell pm disable-user -k amazon.alexa.tablet
adb shell pm disable-user -k com.amazon.device.backup
adb shell pm disable-user -k com.amazon.device.backup.sdk.internal.library
adb shell pm disable-user -k com.amazon.device.crashmanager
adb shell pm disable-user -k com.amazon.device.logmanager
adb shell pm disable-user -k com.amazon.device.sync
adb shell pm disable-user -k com.amazon.device.sync.sdk.internal
adb shell pm disable-user -k com.amazon.dp.contacts
adb shell pm disable-user -k com.amazon.dp.fbcontacts
adb shell pm disable-user -k com.amazon.dp.logger
adb shell pm disable-user -k com.amazon.geo.client.maps
adb shell pm disable-user -k com.amazon.geo.mapsv2
adb shell pm disable-user -k com.amazon.geo.mapsv2.services
adb shell pm disable-user -k com.amazon.goodreads.kindle
adb shell pm disable-user -k com.amazon.h2settingsfortablet
adb shell pm disable-user -k com.amazon.kcp.tutorial
adb shell pm disable-user -k com.amazon.kindle
adb shell pm disable-user -k com.amazon.kindle.cms
adb shell pm disable-user -k com.amazon.kindle.devicecontrols
adb shell pm disable-user -k com.amazon.kindle.kso
adb shell pm disable-user -k com.amazon.kindle.otter.settings
adb shell pm disable-user -k com.amazon.kindle.personal_video
adb shell pm disable-user -k com.amazon.kindle.unifiedSearch
adb shell pm disable-user -k com.amazon.legalsettings
adb shell pm disable-user -k com.amazon.logan
adb shell pm disable-user -k com.amazon.mp3
adb shell pm disable-user -k com.amazon.ods.kindleconnect
adb shell pm disable-user -k com.amazon.parentalcontrols
adb shell pm disable-user -k com.amazon.photos
adb shell pm disable-user -k com.amazon.photos.importer
adb shell pm disable-user -k com.amazon.platform
adb shell pm disable-user -k com.amazon.pm
adb shell pm disable-user -k com.amazon.precog
adb shell pm disable-user -k com.amazon.readynowcore
adb shell pm disable-user -k com.amazon.recess
adb shell pm disable-user -k com.amazon.socialplatform
adb shell pm disable-user -k com.amazon.tahoe
adb shell pm disable-user -k com.amazon.unifiedsharefacebook
adb shell pm disable-user -k com.amazon.unifiedsharegoodreads
adb shell pm disable-user -k com.amazon.unifiedsharesinaweibo
adb shell pm disable-user -k com.amazon.unifiedsharetwitter
adb shell pm disable-user -k com.amazon.vans.alexatabletshopping.app
adb shell pm disable-user -k com.amazon.venezia
adb shell pm disable-user -k com.amazon.webapp
adb shell pm disable-user -k com.amazon.whisperlink.activityview.android
adb shell pm disable-user -k com.amazon.whisperlink.core.android
adb shell pm disable-user -k com.android.email
adb shell pm disable-user -k com.amazon.whisperplay.contracts
adb shell pm disable-user -k com.amazon.windowshop
adb shell pm disable-user -k com.amazon.zico
adb shell pm disable-user -k com.audible.application.kindle
adb shell pm disable-user -k com.goodreads.kindle
adb shell pm disable-user -k com.here.odnp.service
adb shell pm disable-user -k com.kingsoft.office.amz
adb shell pm disable-user -k org.mopria.printplugin
) | zenity --progress --title='Debloating Fire OS'
exec ./Fire-Tools.sh

elif [ $opt = 'Google-Services' ]
then
(
for gapps in Gapps/*
do
adb install $gapps
done
) | zenity --progress --title='Install Google Services'
exec ./Fire-Tools.sh

elif [ $opt = 'Change-Launcher' ]
# Google Services Installer
elif [ "$opt" = 'Google-Services' ]
then
(
adb install Nova.apk
adb shell pm disable-user --user 0 com.amazon.firelauncher
) | zenity --progress --title='Setting Nova Launcher As Default'
for gapps in Gapps/*.apk
do
adb install "$gapps"
done
adb push Gapps/*.apkm /sdcard
adb shell monkey -p com.aefyr.sai.fdroid 1
zenity --list --column=Instructions --width=400 --height=250 'When SAI opens tap on Install Apks then choose' 'Internal file picker and check the 2 .apkm files'
exec ./Fire-Tools.sh

elif [ $opt = 'Foss' ]
# Custom Launcher (Disables Fire Launcher and replaces it with Launcher.apk)
elif [ "$opt" = 'Change-Launcher' ]
then
(
for foss in Foss/*
do
adb install $foss
done
) | zenity --progress --title='Installing FOSS Apps'
adb shell pm disable-user -k com.amazon.firelauncher
adb install Launcher.apk
) | zenity --progress --title='Setting Nova as default launcher'
exec ./Fire-Tools.sh

elif [ $opt = 'Disable-OTA' ]
# Disable OTA Updates
elif [ "$opt" = 'Disable-OTA' ]
then
(
adb uninstall -k --user 0 com.amazon.device.software.ota
adb uninstall -k --user 0 com.amazon.settings.systemupdates
adb uninstall -k --user 0 com.amazon.kindle.otter.oobe.forced.ota
adb shell pm disable-user -k com.amazon.device.software.ota
adb shell pm disable-user -k com.amazon.settings.systemupdates
adb shell pm disable-user -k com.amazon.kindle.otter.oobe.forced.ota
) | zenity --progress --title='Disabling OTA Updates'
exec ./Fire-Tools.sh

elif [ $opt = 'Custom-Apps' ]

# Batch Install (Install all .apk files in /Custom folder)
elif [ "$opt" = 'Custom-Apps' ]
then
(
for custom in Custom/*
do
adb install $custom
adb install "$custom"
done
) | zenity --progress --title='Installing Custom Apps'
exec ./Fire-Tools.sh
Expand Down

0 comments on commit 5ff9a6e

Please sign in to comment.