Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 25 additions & 17 deletions InstallTools.sh
Original file line number Diff line number Diff line change
@@ -1,32 +1,40 @@
#!/data/data/com.termux/files/usr/bin/bash
q=

for arg in $@; do
case "$arg" in
-q); q=-q ;;
esac;done
if [ ! $q ]; then
echo
echo -e "\e[93mThis script will install ADB & FastBoot Tools in Termux."
echo
fi
echo -e "\e[32m[*] \e[34mDownloading wrapper and binaries..."

directory="$(pwd)"downpath="$PREFIX/tmp/adbtemp"
mkdir "$downpath"
wget https://github.com/MasterDevX/Termux-ADB/raw/master/bin/adb -P $downpath/ $q
wget https://github.com/MasterDevX/Termux-ADB/raw/master/bin/adb.bin -P $downpath/ $q
wget https://github.com/MasterDevX/Termux-ADB/raw/master/bin/fastboot -P $downpath/ $q
wget https://github.com/MasterDevX/Termux-ADB/raw/master/bin/fastboot-armeabi -P $downpath/ $q

directory="$(pwd)"
echo
echo -e "\e[93mThis script will install ADB & FastBoot Tools in Termux."
echo
echo -e "\e[32m[*] \e[34mDownloading wrapper script..."
mkdir $PREFIX/tmp/adbtemp
downpath="$PREFIX/tmp/adbtemp"
wget https://github.com/MasterDevX/Termux-ADB/raw/master/bin/adb -P $downpath/ -q
echo -e "\e[32m[*] \e[34mDownloading binaries..."
wget https://github.com/MasterDevX/Termux-ADB/raw/master/bin/adb.bin -P $downpath/ -q
wget https://github.com/MasterDevX/Termux-ADB/raw/master/bin/fastboot -P $downpath/ -q
wget https://github.com/MasterDevX/Termux-ADB/raw/master/bin/fastboot-armeabi -P $downpath/ -q
echo -e "\e[32m[*] \e[34mCopying files to bin..."
cp $downpath/* $PREFIX/bin
echo -e "\e[32m[*] \e[34mSetting execution permissions..."
cp $downpath/* $PREFIX/bin
files="$(ls $downpath)"
cd $PREFIX/bin
chmod +x $files
echo -e "\e[32m[*] \e[34mCreating workspace directory..."

if [ ! $q ]; then echo -e "\e[32m[*] \e[34mCreating workspace directory...";fi
cd $HOME
if [ ! -d "adbfiles" ]; then
mkdir adbfiles
fi
echo -e "\e[32m[*] \e[34mCleaning up..."

if [ ! $q ]; then echo -e "\e[32m[*] \e[34mCleaning up...";fi
cd $directory
rm -rf $downpath
rm -rf InstallTools.sh
rm InstallTools.sh
echo
echo -e "\e[32mTools were successfully installed!\e[39m"
echo