diff --git a/CHANGELOG.md b/CHANGELOG.md index 4e4ba50..51e6d78 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,30 +1,78 @@ -# Beta Version (0.9.1) +# Here we go (v1.0) -### New Features added : +### New features : +- **Restore a backup** +- **Brand auto-detect** + - new option "Auto debloat" added which use the debloat list adapted to your phone. + +### Changed : +- **UI/UX adjustments** +- **Some improvement in the code** + + +# Beta Version (v0.9) + +### New features : - **Backup before debloating** - - Sytem apps apk included - - Only internal memory - - Stored in current directory under "phone-DDMMYY-HHMMSS.adb" + - Backup all .apk apps (system ones included) + - Only those stored in internal memory + - Backup is stored in current directory under "phone-DDMMYY-HHMMSS.adb" + - Adding ### Changed : -- Minor UI changes -- Debloat lists now in their own file +- **Minor UI changes** + +# Beta Version (v0.8) + +### New features : +- **New debloat list** : + - Miscellaneous + +### Changed : +- **Most of android bloat (independant from brand device) is now moved into its own list (Android bloat) in order to avoid duplicate in the others lists +- **UI/UX improvement :** + - Colors added + - New banner +- **Moved the debloat lists into a another file (debloat_lists.sh)** +- **Removing 2 packages from the "Android debloat list" causing issue when importing contacts from a file** +- **Minor performances improvement** -# Beta Version (0.9) +# Beta Version (v0.7) + +### New features : +- **New drand's specific debloat list** : + - Huawei +- **New debloat list** : + - T-Mobile related + - Microsoft related + - Google related + - "Android in general" related + +### Changed : +- **Most of android bloat (independant from brand device) is now moved into its own list (Android bloat) in order to avoid duplicate in the others lists +- **UI/UX improvement :** + - Adding Colors + - New banner + + +# Beta Version (v0.6) + +### New features added : +- **New drand's specific debloat list** : + - Xiaomi (not complete) +- **New debloat list** : + - Facebook related + +### Changed : +- **Improving Samsung debloat list +- **UI/UX improvements** + + +# Initial Beta Version (v0.5) ### Features : -- **Brand's specific debloat lists** : -- Samsung -- Xiaomi -- Huawei - -- **Debloat lists** : -- Facebook related -- T-Mobile related -- Microsoft related -- Google related -- Android related (generic list) -- Miscellaneous - - +- **Debloat list for Samsung (Galaxy S)** +- **Quick search among all the packages of the phone** +- **Debloat specific package** +- **Restore specific package** \ No newline at end of file diff --git a/debloat_script.sh b/debloat_script.sh index e3e87e2..44c19e4 100755 --- a/debloat_script.sh +++ b/debloat_script.sh @@ -10,7 +10,7 @@ normal=$(tput sgr0) function debloat { name=$1[@] bloat=("${!name}") - + printf "${RED}${bold}=== $brand debloat list ===${normal}${NC}\n" for i in "${bloat[@]}"; do adb shell " printf '${RED}$i${NC} --> ' @@ -45,82 +45,94 @@ function install { } function restore { - printf"Réstauration d'une sauvegarde\n" - adb shell "restore backup.ab" + printf "${RED}${bold}Restaurer une sauvegarde${normal}${NC}\n" + read -p "Nom ${bold}exact${normal} de la sauvegarde : " + adb restore $REPLY } -function check_backup { +function check_backup_integrity { set -o pipefail for a in *.adb; do echo "Vérification de la sauvegarde ($a)"; dd if="$a" bs=24 skip=1 | zlib-flate -uncompress | tar tf - >/dev/null; if [ $? = 0 ]; then - printf "${RED}${bold}La sauvegarde généré est intègre${normal}${NC}\n" - else printf "${RED}${bold}La sauvegarde généré est corrompue ! ${normal}${NC}\n" + printf "${RED}${bold}La sauvegarde générée est intègre${normal}${NC}\n" + else printf "${RED}${bold}La sauvegarde générée est corrompue ! ${normal}${NC}\n" fi done } +function brand_detection { + for brand in ${brands[@]}; do + check=$(adb shell getprop | grep -c $brand) + if [[ $check>0 ]]; then + case $brand in + "Asus") echo "Asus -- Debloat list à faire" ;; #Penser à ajouter un break + "Huawei") echo "huawei_bloat" ;; + "LG") echo "LG -- Debloat list à faire" ;; + "Nokia") echo "Nokia -- Debloat list à faire" ;; + "Samsung") echo "samsung_bloat" ;; + "Xiaomi") echo "xiaomi_bloat" ;; + esac + fi + #echo "Marque non supportée" + done +} + clear printf "\n ================================================\n" printf " # #\n" printf " # SCRIPT ----- DEBLOAT #\n" printf " # ALL DEVICES COMPATIBLE (WIP) #\n" printf " # #\n" -printf " # ${RED}${bold}VERSION DE TEST : V 0.9${normal}${NC} #\n" +printf " # %14s${RED}${bold}v1.0 (31-03-2019)${normal}${NC}%14s#\n" printf " # #\n" printf " ================================================\n" - -sleep 1 echo + adb devices -printf "${RED}${bold}Voulez vous faire une sauvegarde du téléphone ? (recommandé) ${normal}${NC}\n" -read -p "YES / NO : " +printf "${RED}${bold}Voulez vous faire une sauvegarde du téléphone [Yes/No] ? (recommandé) ${normal}${NC}" +read if [[ $REPLY =~ [Yy]+[Ee]*[Ss]* ]]; then echo adb backup -apk -all -system -f "${PHONE:-phone}-`date +%Y%m%d-%H%M%S`.adb" # -noshare option is default - check_backup; + check_backup_integrity; else printf "${RED}${bold}Pas de sauvegarde${normal}${NC}\n" fi - -# marque=$(adb shell getprop | grep manufacturer) - - while true; do - printf "\n${bold}======= MENU PRINCIPAL ======= ${normal}\n" - printf "\n1 - Lister des paquets\n" - printf "2 - Désinstaller un paquet\n" - printf "3 - Réinstaller un paquet\n" - printf "4 - Debloat Google\n" - printf "5 - Debloat Samsung\n" - printf "6 - Debloat T-Mobile\n" - printf "7 - Debloat Amazon\n" - printf "8 - Debloat Facebook\n" - printf "9 - Debloat Microsoft\n" - printf "10 - Debloat Autres\n" - printf "11 - Debloat Huawei\n" - printf "12 - Debloat Android\n" - printf "13 - Debloat Xiaomi\n" + printf "\n${bold}======= MENU PRINCIPAL ======= ${normal}\n\n" + printf "1 - Lister des paquets\n" + printf "2 - Désinstaller un paquet\n" + printf "3 - Réinstaller un paquet\n" + printf "4 - Auto-Debloat\n" + printf "5 - Restaurer une sauvegarde\n" + printf "6 - Debloat Google\n" + printf "7 - Debloat T-Mobile\n" + printf "8 - Debloat Amazon\n" + printf "9 - Debloat Facebook\n" + printf "10 - Debloat Microsoft\n" + printf "11 - Debloat Divers\n" + printf "12 - Debloat Android\n" printf "exit - Quitter\n\n" read -p "${bold}Choisissez une action : ${normal}" action echo + brand=$(brand_detection) case $action in 1) list ;; 2) remove ;; 3) install ;; - 4) debloat google_bloat ;; - 5) debloat samsung_bloat ;; - 6) debloat T_Mobile_bloat ;; - 7) debloat amazon_bloat ;; - 8) debloat facebook_bloat ;; - 9) debloat microsoft_bloat ;; - 10) debloat misc_bloat ;; - 11) debloat huawei_bloat;; + 4) debloat $brand ;; + 5) restore ;; + 6) debloat google_bloat ;; + 7) debloat T_Mobile_bloat ;; + 8) debloat amazon_bloat ;; + 9) debloat facebook_bloat ;; + 10) debloat microsoft_bloat ;; + 11) debloat misc_bloat ;; 12) debloat generic_bloat ;; - 13) debloat xiaomi_bloat ;; "exit") break ;; esac done