Skip to content
This repository has been archived by the owner on Oct 16, 2024. It is now read-only.

Commit

Permalink
Added AAPT-bin (only in aapt-branch)
Browse files Browse the repository at this point in the history
closes #3
  • Loading branch information
simmac committed Mar 1, 2016
1 parent fc1ad77 commit 1b424b0
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 11 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Quick ADB / Fastboot installer for OS X and Linux (minimal_adb_fastboot)
Quick ADB / Fastboot / AAPT installer for OS X and Linux (minimal_adb_fastboot)
====================

Last updated: 1.3.2016 | adb version: 1.0.32 Revision eac51f2bb6a8-android
------------------------
Installs the adb and fastboot binaries for OS X and Linux.
Installs the adb, fastboot and aapt binaries for OS X and Linux.

Do the following steps:
- Download the zip
Expand All @@ -12,10 +12,11 @@ Do the following steps:
- Finished

There are a few arguments you can use with the script:
- uninstall : Deletes the adb and fastboot binaries from /usr/local/bin
- uninstall : Deletes the adb, fastboot and aapt binaries from /usr/local/bin
- uninstall-old: For OS X users who installed adb from this script with version <3.0. If you used my script version <3.0 on your mac, you should run this command once to remove the binaries from /usr/bin (they are now installed in /usr/local/bin).
- adb : Installs the adb binary only
- fastboot : Installs the fastboot binary only
- fastboot : Installs the aapt binary only
The arguments can be used like this: ./install.sh [argument] eg *./install.sh uninstall*
An empty argument does the full installation of both binaries.

Expand All @@ -31,6 +32,7 @@ Changelog:
- 3.0.0 | 31.05.2015 Improved code quality and readability a lot by rewriting the whole script and using functions. Added the arguments *uninstall*, *adb* and *fastboot*. **Changed the installation path on OS X to /usr/local/bin !**
- 3.1.0 | 05.10.2015 Updated to newest v23 binaries. Required for Android Marshmallow on flounder.
- **3.2.0** | 01.03.2016 Checks if installation directory exists before running the script
- **3.2.0-AAPT** | 01.03.2016 Added AAPT-bin

Support Thread:
----------------
Expand Down
21 changes: 13 additions & 8 deletions install.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
clear
echo -e "\n\nQuick adb/fastboot installer 3.2.0\n"
echo -e "\n\nQuick adb/fastboot installer WITH AAPT 3.2.0\n"

#Gets location of the script
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
Expand Down Expand Up @@ -36,7 +36,7 @@ function versioncheck () {
# CHECKS IF BINARY VERSIONS MATCH
# 0 = match, 1 = no match, 2 = no installation
# function is called "versioncheck $1"
# while $1 is either adb or fastboot
# while $1 is either adb, fastboot or aapt

if [ -f $INSTALLPATH/$1 ]; then

Expand All @@ -58,7 +58,7 @@ function versioncheck () {
function install () {
# INSTALLATION ROUTINE
# function is called "install $1"
# while $1 is either adb or fastboot
# while $1 is either adb, fastboot or aapt

sudo cp $BINPATH/$1 $INSTALLPATH/$1

Expand All @@ -75,7 +75,7 @@ function fullinstall () {
# including the versionchecks

# function is called "install $1"
# while $1 is either adb or fastboot
# while $1 is either adb, fastboot or aapt
versioncheck $1
if [ "$?" == "0" ]; then
echo -e "$1 binaries are up to date. No need for installation.\n"
Expand Down Expand Up @@ -106,8 +106,10 @@ function uninstall () {

sudo rm -f $INSTALLPATH/adb
sudo rm -f $INSTALLPATH/fastboot
sudo rm -f $INSTALLPATH/aapt


if [ -f "$INSTALLPATH/adb" ] || [ -f "$INSTALLPATH/fastboot" ]; then
if [ -f "$INSTALLPATH/adb" ] || [ -f "$INSTALLPATH/fastboot" ] || [ -f "$INSTALLPATH/aapt" ]; then
return 1;
else
return 0;
Expand All @@ -129,8 +131,11 @@ case $1 in #reads first argument
A="$?" #stores return of "fullinstall adb" in $A

fullinstall fastboot
B="$?"

fullinstall aapt

if [ "$A" == 0 ] && [ "$?" == 0 ]; then
if [ "$A" == 0 ] && [ "$B" == 0 ] && [ "$?" == 0 ]; then
echo -e "\n\n\n\nComplete installation completed successfully!\n"
echo -e "Thanks for using Quick adb/fastboot!\n Quitting now...\n"
exit 0;
Expand Down Expand Up @@ -158,7 +163,7 @@ case $1 in #reads first argument
fi
;;

adb|fastboot)
adb|fastboot|aapt)
echo -e "super user rights are needed."
echo -e "You may be prompted for your admin password now.\n"
fullinstall $1
Expand All @@ -179,7 +184,7 @@ case $1 in #reads first argument
exit 0;
else
echo -e "Sorry, something went wrong :(\n"
echo -e "adb or fastboot are still installed in /usr/bin.\n Quitting now..."
echo -e "adb, fastboot or aapt are still installed in /usr/bin.\n Quitting now..."
exit 1;
fi
;;
Expand Down
Binary file added linux/aapt
Binary file not shown.
Binary file added osx/aapt
Binary file not shown.

0 comments on commit 1b424b0

Please sign in to comment.