aboutsummaryrefslogtreecommitdiff
path: root/development/android-tools
diff options
context:
space:
mode:
authorPhilip van der Hoeven <philip@vd-hoeven.nl>2014-12-24 16:11:05 -0600
committerRobby Workman <rworkman@slackbuilds.org>2014-12-25 02:10:30 -0600
commit3333829f85ee16246caad37af044107dd7ef09d9 (patch)
treeaaa905876608abd278e1e374209a4a52ed33ffed /development/android-tools
parent05553742dd0e7bc60317b88a4998db85a725a6d0 (diff)
development/android-tools: Added (adb and fastboot tools)
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
Diffstat (limited to 'development/android-tools')
-rw-r--r--development/android-tools/README2
-rw-r--r--development/android-tools/adbMakefile44
-rw-r--r--development/android-tools/android-tools.SlackBuild111
-rw-r--r--development/android-tools/android-tools.info16
-rw-r--r--development/android-tools/fastbootMakefile67
-rw-r--r--development/android-tools/slack-desc19
6 files changed, 259 insertions, 0 deletions
diff --git a/development/android-tools/README b/development/android-tools/README
new file mode 100644
index 0000000000000..076973b9b0e2c
--- /dev/null
+++ b/development/android-tools/README
@@ -0,0 +1,2 @@
+These are adb and fastboot tools from android sdk.
+
diff --git a/development/android-tools/adbMakefile b/development/android-tools/adbMakefile
new file mode 100644
index 0000000000000..fd54ba0192242
--- /dev/null
+++ b/development/android-tools/adbMakefile
@@ -0,0 +1,44 @@
+SRCS+= adb.c
+SRCS+= adb_auth_host.c
+SRCS+= adb_client.c
+SRCS+= commandline.c
+SRCS+= console.c
+SRCS+= fdevent.c
+SRCS+= file_sync_client.c
+SRCS+= get_my_path_linux.c
+SRCS+= services.c
+SRCS+= sockets.c
+SRCS+= transport.c
+SRCS+= transport_local.c
+SRCS+= transport_usb.c
+SRCS+= usb_linux.c
+SRCS+= usb_vendors.c
+
+VPATH+= ../libcutils
+SRCS+= load_file.c
+SRCS+= socket_inaddr_any_server.c
+SRCS+= socket_local_client.c
+SRCS+= socket_local_server.c
+SRCS+= socket_loopback_client.c
+SRCS+= socket_loopback_server.c
+SRCS+= socket_network_client.c
+
+VPATH+= ../libzipfile
+SRCS+= centraldir.c
+SRCS+= zipfile.c
+
+CPPFLAGS+= -DADB_HOST=1
+CPPFLAGS+= -DHAVE_FORKEXEC=1
+CPPFLAGS+= -DHAVE_OFF64_T=1
+CPPFLAGS+= -I.
+CPPFLAGS+= -I../include
+
+LIBS+= -lcrypto -lpthread -lz
+
+OBJS= $(SRCS:.c=.o)
+
+all: adb
+
+adb: $(OBJS)
+ cc -o $@ $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $(OBJS) $(LIBS)
+
diff --git a/development/android-tools/android-tools.SlackBuild b/development/android-tools/android-tools.SlackBuild
new file mode 100644
index 0000000000000..3e3551f8d0543
--- /dev/null
+++ b/development/android-tools/android-tools.SlackBuild
@@ -0,0 +1,111 @@
+#!/bin/sh
+
+# Slackware build script for android-tools
+# Thanks to the Arch linux maintainers for the makefiles
+
+# Copyright 2014 Philip van der Hoeven, Almere, NL
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+PRGNAM=android-tools
+VERSION=${VERSION:-5.0.2_r1}
+
+SRCVERSION1=8032f3b5a501dabc1e28925cca834d2a39efbdee
+SRCVERSION2=ba2a23604727e5b333dd16a9287556d799d6d39e
+SRCVERSION3=3946f9119bf4eadfcfb17bd15661515328cbbc86
+SRCVERSION4=fc24ac8347630a14d62ffafa93a27ec3b81cc44b
+
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i486 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+set -e
+
+rm -rf $TMP/$PRGNAM $PKG
+mkdir -p $TMP/$PRGNAM $PKG $OUTPUT
+
+cd $TMP/$PRGNAM
+
+mkdir core extras libselinux f2fs-tools
+tar xvf $CWD/$SRCVERSION1.tar.gz -C core
+tar xvf $CWD/$SRCVERSION2.tar.gz -C extras
+tar xvf $CWD/$SRCVERSION3.tar.gz -C libselinux
+tar xvf $CWD/$SRCVERSION4.tar.gz -C f2fs-tools
+
+#git clone --branch android-$VERSION --depth 1 https://android.googlesource.com/platform/system/core
+#git clone --branch android-$VERSION --depth 1 https://android.googlesource.com/platform/system/extras
+#git clone --branch android-$VERSION --depth 1 https://android.googlesource.com/platform/external/libselinux
+#git clone --branch android-$VERSION --depth 1 https://android.googlesource.com/platform/external/f2fs-tools
+
+cp -p $CWD/adbMakefile $CWD/fastbootMakefile .
+
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
+ -o -perm 511 \) -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+
+sed -e 's/f2fs_sparse_file = NULL/f2fs_sparse_file = 0/g' -i extras/f2fs_utils/f2fs_utils.c
+
+make -C core/adb -f $TMP/android-tools/adbMakefile
+make -C core/fastboot -f $TMP/android-tools/fastbootMakefile
+
+mkdir -p $PKG/usr/bin
+install -Dm 0755 core/adb/adb $PKG/usr/bin/adb
+install -Dm 0755 core/fastboot/fastboot $PKG/usr/bin/fastboot
+
+find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/development/android-tools/android-tools.info b/development/android-tools/android-tools.info
new file mode 100644
index 0000000000000..ff86277739dbf
--- /dev/null
+++ b/development/android-tools/android-tools.info
@@ -0,0 +1,16 @@
+PRGNAM="android-tools"
+VERSION="5.0.2_r1"
+HOMEPAGE="http://developer.android.com/sdk/"
+DOWNLOAD="https://android.googlesource.com/platform/system/core/+archive/8032f3b5a501dabc1e28925cca834d2a39efbdee.tar.gz \
+ https://android.googlesource.com/platform/system/extras/+archive/ba2a23604727e5b333dd16a9287556d799d6d39e.tar.gz \
+ https://android.googlesource.com/platform/external/libselinux/+archive/3946f9119bf4eadfcfb17bd15661515328cbbc86.tar.gz \
+ https://android.googlesource.com/platform/external/f2fs-tools/+archive/fc24ac8347630a14d62ffafa93a27ec3b81cc44b.tar.gz"
+MD5SUM="ebde02fa28a51e2c875be43b3494083a \
+ 39aab0dbf446b90dfbacb02d26766b61 \
+ bb47cfc12988d5085d475aa10e7f0226 \
+ b409492b91203f56ca5c97fe4de35ba0"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES=""
+MAINTAINER="Philip van der Hoeven"
+EMAIL="philip@vd-hoeven.nl"
diff --git a/development/android-tools/fastbootMakefile b/development/android-tools/fastbootMakefile
new file mode 100644
index 0000000000000..62e42f8bc4ce1
--- /dev/null
+++ b/development/android-tools/fastbootMakefile
@@ -0,0 +1,67 @@
+SRCS+=bootimg.c
+SRCS+=engine.c
+SRCS+=fastboot.c
+SRCS+=protocol.c
+SRCS+=usb_linux.c
+SRCS+=util_linux.c
+SRCS+=util.c
+SRCS+=fs.c
+
+VPATH+= ../libsparse
+SRCS+= backed_block.c
+SRCS+= output_file.c
+SRCS+= sparse.c
+SRCS+= sparse_crc32.c
+SRCS+= sparse_err.c
+SRCS+= sparse_read.c
+
+VPATH+= ../libzipfile
+SRCS+= centraldir.c
+SRCS+= zipfile.c
+
+VPATH+= ../../extras/ext4_utils
+SRCS+= allocate.c
+SRCS+= contents.c
+SRCS+= crc16.c
+SRCS+= ext4_utils.c
+SRCS+= ext4_sb.c
+SRCS+= extent.c
+SRCS+= indirect.c
+SRCS+= make_ext4fs.c
+SRCS+= sha1.c
+SRCS+= uuid.c
+SRCS+= wipe.c
+
+VPATH+= ../../extras/f2fs_utils
+SRCS+= f2fs_utils.c
+SRCS+= f2fs_dlutils.c
+SRCS+= f2fs_ioutils.c
+
+VPATH+= ../../libselinux/src
+SRCS+= callbacks.c
+SRCS+= check_context.c
+SRCS+= freecon.c
+SRCS+= init.c
+SRCS+= label.c
+SRCS+= label_android_property.c
+SRCS+= label_file.c
+
+CPPFLAGS+= -I../include
+CPPFLAGS+= -I../libsparse/include
+CPPFLAGS+= -I../mkbootimg
+CPPFLAGS+= -I../../extras/ext4_utils
+CPPFLAGS+= -I../../extras/f2fs_utils/
+CPPFLAGS+= -I../../libselinux/include
+CPPFLAGS+= -I../../f2fs-tools/include
+CPPFLAGS+= -I../../f2fs-tools/mkfs
+CPPFLAGS+= -DHAVE_OFF64_T=1
+CPPFLAGS+= -std=gnu99
+
+LIBS+= -lz -ldl
+
+OBJS= $(SRCS:.c=.o)
+
+all: fastboot
+
+fastboot: $(OBJS)
+ cc -o $@ $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $(OBJS) $(LIBS)
diff --git a/development/android-tools/slack-desc b/development/android-tools/slack-desc
new file mode 100644
index 0000000000000..92aa917191483
--- /dev/null
+++ b/development/android-tools/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+android-tools: Android tools (adb and fastboot tools)
+android-tools:
+android-tools: These are adb and fastboot tools from the android sdk.
+android-tools:
+android-tools:
+android-tools:
+android-tools:
+android-tools:
+android-tools:
+android-tools:
+android-tools: