Skip to content

Commit

Permalink
Linux Update v0.0.2.28092020
Browse files Browse the repository at this point in the history
Linux version re-written from scratch
  • Loading branch information
msartore committed Sep 27, 2020
1 parent 0dffcba commit ad634be
Show file tree
Hide file tree
Showing 4 changed files with 262 additions and 264 deletions.
304 changes: 262 additions & 42 deletions Linux/ATA.sh
Original file line number Diff line number Diff line change
@@ -1,56 +1,276 @@
#!/bin/bash
pause(){
echo "Press [Enter] key to continue..."
read -p "$*"
echo ""
}

banner(){
echo " "
echo " "
echo " -/oyo :MMMMMMMMMMMMMM+ +o/- "
echo " -/shmMMMMMs .sssssMMMMyssss- yMMMMmhs/- "
echo " .:+shmNMMMMMMdyo/. MMMM. -oydmMMMMMMmhs+:. "
echo " hmNMMNmdhs+yMMN MMMM. NMMhshdmNMMMmdy"
echo " MMMmy+:. oMMN MMMM. NMMo .:+ymMMM"
echo " hdNMMMNmdhshMMN MMMM. NMMy+sydmNMMMNd"
echo " ./oydmMMMMMMmhs+- MMMM. .:+shMMMMMMMmdyo:. "
echo " .:+shmMMMMy MMMM. sMMMMMmhs+:. "
echo " -+s+ mmmm. ohs/- "
echo " "
echo " :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: "
echo " :: ATA Tool v0.0.2.28092020 :: "
echo " :: adb and fastboot tool :: "
echo " :: Created By Sway :: "
echo " :: Copyright 2019-2020 Sway :: "
echo " :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: "
}

mainRecovery(){
reset
banner
echo "================================================================================="
echo " RECOVERY MENU "
echo "================================================================================="
echo " 1. Sideload (ONLY .zip) "
echo "================================================================================="
echo " 0. Return to main menu"
echo "================================================================================="

echo "Please Select:"
read inputmenu

case $inputmenu in

0)
mainmenu
;;
1)
echo "Please enter zip name file with exention:"
read inputsideload
./adb sideload $inputsideload
;;
esac
echo "Press [Enter] key to continue..."
read 1 -p prompt
mainRecovery
}

mainmenu(){
reset
banner
echo "================================================================================="
echo " SYSTEM MENU "
echo "================================================================================="
echo " 1. System Commands "
echo " 2. Recovery Commands (Sideload) "
echo " 3. Fastboot/Bootloader Commands "
echo "================================================================================="
echo " 0. EXIT "
echo "================================================================================="

echo "Please Select:"
read inputmenu

case $inputmenu in
0)
exit
;;
1)
mainSystem
;;
2)
mainRecovery
;;
3)
mainFastboot
;;
esac
pause
mainmenu
}

mainFastboot()
{
reset
banner
echo "================================================================================="
echo " FASTBOOT MENU "
echo "================================================================================="
echo " 1. FLASH RECOVERY (only .img file) "
echo " 2. FLASH KERNEL (only .img file) "
echo " 3. FLASH ROM (You must know what you are doing) "
echo " 4. Check connected devices "
echo " 5. Boot into ROM "
echo " 6. Boot into recovery "
echo " 7. Hard Reset "
echo " 8. FORMAT DATA PARTITION (EXT4) "
echo " 9. FORMAT DATA PARTITION (F2FS) "
echo "================================================================================="
echo " 0. Return to main menu"
echo "================================================================================="

echo "Please Select:"
read inputmenu

case $inputmenu in

0)
mainmenu
;;
1)
echo " Write recovery name like (recoveryname.img) "
read inputfr
fastboot flash recovery $inputfr
;;
2)
echo " Write kernel name like (kernelname.img) "
read inputfk
fastboot flash boot $inputfk
;;
3)
echo " Write rom path like (/path/to/your/Rom.zip) "
read inputfrom
fastboot -w
fastboot update $inputfrom
;;
4)
fastboot devices
;;
5)
echo " Booting into rom "
fastboot reboot
;;
6)
echo " Booting into recovery "
fastboot reboot recovery
;;
7)
echo " Erasing process started "
fastboot erase userdata
fastboot erase cache
;;
8)
fastboot format:ext4 userdata
;;
9)
fastboot format:f2fs userdata
;;

esac
pause
mainFastboot
}

mainSystem()
{
reset
tput setaf 2; echo " "
tput setaf 2; echo " "
tput setaf 2; echo " :shdddhy+..yyyyo oyyyy. :yyyy:./shdddhyo- -yyyy+ yyyyo "
tput setaf 2; echo " hMMMNNNMMMN+yMMMM- :MMMMMy dMMMm+NMMNNNNMMMMy yMMMM/ hMMMN. "
tput setaf 2; echo " -MMMM+. :s/- NMMMy mMMMMMM: :MMMM/ -oo-. /NMMM+ hMMMN- oMMMM: "
tput setaf 2; echo " oNMMMMNdho- +MMMM.oMMMhMMMm dMMMh +hNMMMNmNMMMs mMMMm.:MMMM+ "
tput setaf 2; echo " /oshmMMMMh dMMMdNMMm yMMMhMMMN. dMMMmswayNMMMs .NMMMmNMMMs "
tput setaf 2; echo " :ohNh:..oMMMM- -MMMMMMM: NMMMMMMo .MMMM: :NMMMs -NMMMMMMy "
tput setaf 2; echo " -mMMMMMMMMMMs sMMMMMy +MMMMMd yMMMMmdNMMMMMs :MMMMMd "
tput setaf 2; echo " ohdmmdyo. yyyyy. syyyy- :sdmmds-oyyy+ dMMMm. "
tput setaf 2; echo " sMMMN- "
tput setaf 2; echo " oMMMM: "
tput setaf 2; echo " -dddd+ "
tput setaf 2; echo " "
tput setaf 2; echo " :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: "
tput setaf 2; echo " :: ATA Tool v0.0.1.17032020 :: "
tput setaf 2; echo " :: adb and fastboot tool :: "
tput setaf 2; echo " :: Created By Sway :: "
tput setaf 2; echo " :: Copyright 2019-2020 Sway :: "
tput setaf 2; echo " :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: "


tput setaf 2; echo "================================================================================="
tput setaf 2; echo " SYSTEM MENU "
tput setaf 2; echo "================================================================================="
tput setaf 2; echo " 1. System Commands "
tput setaf 2; echo " 2. Recovery Commands (Sideload) "
tput setaf 2; echo " 3. Fastboot/Bootloader Commands "
tput setaf 2; echo " 4. Stream your SMARTPHONE "
tput setaf 2; echo "================================================================================="
tput setaf 2; echo " EXIT Press CTRL + C at the same time"
tput setaf 2; echo "================================================================================="

tput setaf 2; echo "Please Select:"
banner
echo "================================================================================="
echo " SYSTEM MENU "
echo "================================================================================="
echo " 1. Check connected devices "
echo " 2. REBOOT SMARTPHONE "
echo " 3. REBOOT INTO THE RECOVERY "
echo " 4. REBOOT INTO THE Fastboot/Bootloader "
echo " 5. Device version "
echo " 6. Device serial number "
echo " 7. Enable Dark Mode "
echo " 8. Disable Dark Mode "
echo " 9. APK MENU "
echo "================================================================================="
echo " 0. Return to mainSystem menu"
echo "================================================================================="


echo "Please Select:"
read inputmenu

case $inputmenu in

0)
mainmenu
;;
1)
./adb devices
;;
2)
./adb reboot
;;
3)
./adb reboot recovery
;;
4)
./adb reboot-bootloader
;;
5)
./adb shell getprop ro.build.version.release
;;
6)
./adb get-serialno
;;
7)
./adb shell settings put secure ui_night_mode 2
./adb reboot
;;
8)
./adb shell settings put secure ui_night_mode 1
./adb reboot
;;
9)
APKmenu
;;
esac
pause
mainSystem
}

APKmenu()
{
reset
banner
echo "================================================================================="
echo " APK MENU "
echo "================================================================================="
echo "1) List of non system app"
echo "2) List of system app"
echo "3) Install an app"
echo "4) Unistall an app (No System App)"
echo "5) Unistall System App/Bloat "
echo "================================================================================="
echo " 0. Return to mainSystem menu"
echo "================================================================================="
echo "Please Select:"
read inputmenuapk

case $inputmenuapk in

0)
mainSystem
;;
1)
sh system.sh
./adb shell pm list packages -3
;;
2)
sh recovery.sh
./adb shell pm list packages -s
;;
3)
sh fastboot.sh
echo "Write the app name like (com.myAppPackage)"
read inputapkname
./adb install -r $inputapkname
;;
4)
scrcpy
echo "Write the app name like (com.myAppPackage)"
read inputapkname
./adb uninstall $inputapkname
;;
5)
echo "Write the app name like (com.myAppPackage)"
read inputapkname
./adb shell pm uninstall -k --user 0 $inputapkname
;;

esac
tput setaf 2; echo "Press [Enter] key to continue..."
read 1 -p prompt
sh ATA.sh
pause
APKmenu
}
mainmenu
Loading

0 comments on commit ad634be

Please sign in to comment.