Added android developer utils

This commit is contained in:
Torsten Kurbad 2012-11-29 13:31:41 +01:00
parent 5a9956011c
commit eedcee323a
4 changed files with 167 additions and 0 deletions

View File

@ -0,0 +1,31 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI=4
inherit toolchain-funcs git-2
DESCRIPTION="android debug bridge"
HOMEPAGE="android.googlesource.com"
EGIT_REPO_URI="http://android.googlesource.com/platform/system/core.git"
EGIT_BRANCH="tools_r21"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64 ~x86"
DEPEND="sys-libs/zlib"
RDEPEND="${DEPEND}"
src_compile(){
cd adb
cp ${FILESDIR}/Makefile Makefile
emake
}
src_install(){
cd adb
einstall DESTDIR=${D}
}

View File

@ -0,0 +1,46 @@
SRCS+= adb.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+= list.c
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+= -I.
CPPFLAGS+= -I../include
LIBS+= -lpthread -lz
OBJS= $(SRCS:.c=.o)
all: adb
adb: $(OBJS)
cc -o $@ $(LDFLAGS) $(OBJS) $(LIBS)
install:
test -d '$(DESTDIR)/usr/bin' || mkdir -p '$(DESTDIR)/usr/bin'
cp adb '$(DESTDIR)/usr/bin'

View File

@ -0,0 +1,33 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI=4
inherit toolchain-funcs git-2
DESCRIPTION="fastboot is a util to control android bootloader"
HOMEPAGE="android.googlesource.com"
EGIT_ANDROID="http://android.googlesource.com/platform"
EGIT_REPO_URI=""$EGIT_ANDROID"/system/core"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64 ~x86"
DEPEND="sys-libs/zlib"
RDEPEND="${DEPEND}"
src_compile(){
cd fastboot
git clone "$EGIT_ANDROID"/system/extras
git clone "$EGIT_ANDROID"/external/libselinux
cp ${FILESDIR}/Makefile Makefile
emake
}
src_install(){
cd fastboot
einstall DESTDIR=${D}
}

View File

@ -0,0 +1,57 @@
SRCS+=bootimg.c
SRCS+=engine.c
SRCS+=fastboot.c
SRCS+=protocol.c
SRCS+=usb_linux.c
SRCS+=util_linux.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+= ext4_utils.c
SRCS+= extent.c
SRCS+= indirect.c
SRCS+= make_ext4fs.c
SRCS+= sha1.c
SRCS+= uuid.c
SRCS+= wipe.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+= -Ilibselinux/include
CPPFLAGS+= -Iextras/ext4_utils
LIBS+= -lz
OBJS= $(SRCS:.c=.o)
all: fastboot
fastboot: $(OBJS)
cc -o $@ $(OBJS) $(LIBS)
install:
test -d '$(DESTDIR)/usr/bin' || mkdir -p '$(DESTDIR)/usr/bin'
cp fastboot '$(DESTDIR)/usr/bin'