First Stable Version ?

This commit is contained in:
w1nst0n 2019-03-31 14:33:44 +02:00
parent c151847f0b
commit 857125109b
2 changed files with 121 additions and 61 deletions

View file

@ -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** - **Backup before debloating**
- Sytem apps apk included - Backup all .apk apps (system ones included)
- Only internal memory - Only those stored in internal memory
- Stored in current directory under "phone-DDMMYY-HHMMSS.adb" - Backup is stored in current directory under "phone-DDMMYY-HHMMSS.adb"
- Adding
### Changed : ### Changed :
- Minor UI changes - **Minor UI changes**
- Debloat lists now in their own file
# 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 : ### Features :
- **Brand's specific debloat lists** : - **Debloat list for Samsung (Galaxy S)**
- Samsung - **Quick search among all the packages of the phone**
- Xiaomi - **Debloat specific package**
- Huawei - **Restore specific package**
- **Debloat lists** :
- Facebook related
- T-Mobile related
- Microsoft related
- Google related
- Android related (generic list)
- Miscellaneous

View file

@ -10,7 +10,7 @@ normal=$(tput sgr0)
function debloat { function debloat {
name=$1[@] name=$1[@]
bloat=("${!name}") bloat=("${!name}")
printf "${RED}${bold}=== $brand debloat list ===${normal}${NC}\n"
for i in "${bloat[@]}"; do for i in "${bloat[@]}"; do
adb shell " adb shell "
printf '${RED}$i${NC} --> ' printf '${RED}$i${NC} --> '
@ -45,82 +45,94 @@ function install {
} }
function restore { function restore {
printf"Réstauration d'une sauvegarde\n" printf "${RED}${bold}Restaurer une sauvegarde${normal}${NC}\n"
adb shell "restore backup.ab" read -p "Nom ${bold}exact${normal} de la sauvegarde : "
adb restore $REPLY
} }
function check_backup { function check_backup_integrity {
set -o pipefail set -o pipefail
for a in *.adb; do for a in *.adb; do
echo "Vérification de la sauvegarde ($a)"; echo "Vérification de la sauvegarde ($a)";
dd if="$a" bs=24 skip=1 | zlib-flate -uncompress | tar tf - >/dev/null; dd if="$a" bs=24 skip=1 | zlib-flate -uncompress | tar tf - >/dev/null;
if [ $? = 0 ]; then if [ $? = 0 ]; then
printf "${RED}${bold}La sauvegarde généré est intègre${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é est corrompue ! ${normal}${NC}\n" else printf "${RED}${bold}La sauvegarde générée est corrompue ! ${normal}${NC}\n"
fi fi
done 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 clear
printf "\n ================================================\n" printf "\n ================================================\n"
printf " # #\n" printf " # #\n"
printf " # SCRIPT ----- DEBLOAT #\n" printf " # SCRIPT ----- DEBLOAT #\n"
printf " # ALL DEVICES COMPATIBLE (WIP) #\n" printf " # ALL DEVICES COMPATIBLE (WIP) #\n"
printf " # #\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"
printf " ================================================\n" printf " ================================================\n"
sleep 1
echo echo
adb devices adb devices
printf "${RED}${bold}Voulez vous faire une sauvegarde du téléphone ? (recommandé) ${normal}${NC}\n" printf "${RED}${bold}Voulez vous faire une sauvegarde du téléphone [Yes/No] ? (recommandé) ${normal}${NC}"
read -p "YES / NO : " read
if [[ $REPLY =~ [Yy]+[Ee]*[Ss]* ]]; then if [[ $REPLY =~ [Yy]+[Ee]*[Ss]* ]]; then
echo echo
adb backup -apk -all -system -f "${PHONE:-phone}-`date +%Y%m%d-%H%M%S`.adb" # -noshare option is default 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" else printf "${RED}${bold}Pas de sauvegarde${normal}${NC}\n"
fi fi
# marque=$(adb shell getprop | grep manufacturer)
while true; do while true; do
printf "\n${bold}======= MENU PRINCIPAL ======= ${normal}\n" printf "\n${bold}======= MENU PRINCIPAL ======= ${normal}\n\n"
printf "\n1 - Lister des paquets\n" printf "1 - Lister des paquets\n"
printf "2 - Désinstaller un paquet\n" printf "2 - Désinstaller un paquet\n"
printf "3 - Réinstaller un paquet\n" printf "3 - Réinstaller un paquet\n"
printf "4 - Debloat Google\n" printf "4 - Auto-Debloat\n"
printf "5 - Debloat Samsung\n" printf "5 - Restaurer une sauvegarde\n"
printf "6 - Debloat T-Mobile\n" printf "6 - Debloat Google\n"
printf "7 - Debloat Amazon\n" printf "7 - Debloat T-Mobile\n"
printf "8 - Debloat Facebook\n" printf "8 - Debloat Amazon\n"
printf "9 - Debloat Microsoft\n" printf "9 - Debloat Facebook\n"
printf "10 - Debloat Autres\n" printf "10 - Debloat Microsoft\n"
printf "11 - Debloat Huawei\n" printf "11 - Debloat Divers\n"
printf "12 - Debloat Android\n" printf "12 - Debloat Android\n"
printf "13 - Debloat Xiaomi\n"
printf "exit - Quitter\n\n" printf "exit - Quitter\n\n"
read -p "${bold}Choisissez une action : ${normal}" action read -p "${bold}Choisissez une action : ${normal}" action
echo echo
brand=$(brand_detection)
case $action in case $action in
1) list ;; 1) list ;;
2) remove ;; 2) remove ;;
3) install ;; 3) install ;;
4) debloat google_bloat ;; 4) debloat $brand ;;
5) debloat samsung_bloat ;; 5) restore ;;
6) debloat T_Mobile_bloat ;; 6) debloat google_bloat ;;
7) debloat amazon_bloat ;; 7) debloat T_Mobile_bloat ;;
8) debloat facebook_bloat ;; 8) debloat amazon_bloat ;;
9) debloat microsoft_bloat ;; 9) debloat facebook_bloat ;;
10) debloat misc_bloat ;; 10) debloat microsoft_bloat ;;
11) debloat huawei_bloat;; 11) debloat misc_bloat ;;
12) debloat generic_bloat ;; 12) debloat generic_bloat ;;
13) debloat xiaomi_bloat ;;
"exit") break ;; "exit") break ;;
esac esac
done done