Update to Lollipop 5.0.2 release

Signed-off-by: Jonathan Dieter <jdieter@lesbg.com>
Signed-off-by: Ivan Afonichev <iafonichev@griddynamics.com>
This commit is contained in:
Jonathan Dieter 2014-12-26 20:34:54 +02:00 committed by Ivan Afonichev
commit 52daab3d3d
5 changed files with 96 additions and 13 deletions

View file

@ -0,0 +1,38 @@
From 239a63ace3d94c44561580f7e4d0db3e95cd557f Mon Sep 17 00:00:00 2001
From: Jonathan Dieter <jdieter@lesbg.com>
Date: Fri, 26 Dec 2014 17:04:54 +0200
Subject: [PATCH 1/2] Remove android selinux header
Signed-off-by: Jonathan Dieter <jdieter@lesbg.com>
---
ext4_utils/make_ext4fs.c | 1 -
f2fs_utils/f2fs_ioutils.c | 1 -
2 files changed, 2 deletions(-)
diff --git a/ext4_utils/make_ext4fs.c b/ext4_utils/make_ext4fs.c
index 2f89ae8..732afbe 100644
--- a/ext4_utils/make_ext4fs.c
+++ b/ext4_utils/make_ext4fs.c
@@ -62,7 +62,6 @@
#include <selinux/selinux.h>
#include <selinux/label.h>
-#include <selinux/android.h>
#define O_BINARY 0
diff --git a/f2fs_utils/f2fs_ioutils.c b/f2fs_utils/f2fs_ioutils.c
index 53b7b4b..2706d04 100644
--- a/f2fs_utils/f2fs_ioutils.c
+++ b/f2fs_utils/f2fs_ioutils.c
@@ -78,7 +78,6 @@ struct selabel_handle;
#include <selinux/selinux.h>
#include <selinux/label.h>
-#include <selinux/android.h>
#define O_BINARY 0
--
2.1.0

View file

@ -0,0 +1,25 @@
From ee818ba3cb26b65eb93eb5f85eca18546e9a9c2e Mon Sep 17 00:00:00 2001
From: Jonathan Dieter <jdieter@lesbg.com>
Date: Fri, 26 Dec 2014 19:50:06 +0200
Subject: [PATCH 2/2] Add missing headers
Signed-off-by: Jonathan Dieter <jdieter@lesbg.com>
---
f2fs_utils/f2fs_ioutils.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/f2fs_utils/f2fs_ioutils.c b/f2fs_utils/f2fs_ioutils.c
index 2706d04..e4c6c83 100644
--- a/f2fs_utils/f2fs_ioutils.c
+++ b/f2fs_utils/f2fs_ioutils.c
@@ -39,6 +39,7 @@
#include <sys/types.h>
#include <fcntl.h>
#include <dlfcn.h>
+#include <unistd.h>
#include <assert.h>
--
2.1.0

View file

@ -13,10 +13,8 @@ SRCS+= transport_local.c
SRCS+= transport_usb.c
SRCS+= usb_linux.c
SRCS+= usb_vendors.c
SRCS+= utils.c
VPATH+= ../libcutils
SRCS+= abort_socket.c
SRCS+= socket_inaddr_any_server.c
SRCS+= socket_local_client.c
SRCS+= socket_local_server.c
@ -24,7 +22,6 @@ SRCS+= socket_loopback_client.c
SRCS+= socket_loopback_server.c
SRCS+= socket_network_client.c
SRCS+= load_file.c
SRCS+= list.c
VPATH+= ../libzipfile
SRCS+= centraldir.c
@ -32,9 +29,11 @@ SRCS+= zipfile.c
VPATH+= ../libmincrypt
SRCS+= rsa.c
SRCS+= rsa_e_3.c
SRCS+= rsa_e_f4.c
SRCS+= sha256.c
SRCS+= sha.c
SRCS+= p256.c
SRCS+= p256_ec.c
SRCS+= p256_ecdsa.c
CPPFLAGS+= -DADB_HOST=1
CPPFLAGS+= -DHAVE_FORKEXEC=1
@ -42,6 +41,8 @@ CPPFLAGS+= -DHAVE_SYMLINKS
CPPFLAGS+= -DHAVE_TERMIO_H
CPPFLAGS+= -D_GNU_SOURCE
CPPFLAGS+= -D_XOPEN_SOURCE
CPPFLAGS+= -D_FILE_OFFSET_BITS=64
CPPFLAGS+= -DHAVE_OFF64_T
CPPFLAGS+= -I.
CPPFLAGS+= -I../include

View file

@ -1,15 +1,15 @@
%global date 20130123
%global git_commit 98d0789
%global date 20141219
%global git_commit 8393e50
%global packdname core-%{git_commit}
#last extras ext4_utils commit without custom libselinux requirement
%global extras_git_commit 4ff85ad
%global extras_git_commit 1e7d4f3
%global extras_packdname extras-%{extras_git_commit}
Name: android-tools
Version: %{date}git%{git_commit}
Release: 5%{?dist}
Release: 1%{?dist}
Summary: Android platform tools(adb, fastboot)
Group: Applications/System
@ -18,9 +18,9 @@ License: ASL 2.0 and (ASL 2.0 and BSD)
URL: http://developer.android.com/guide/developing/tools/
# using git archive since upstream hasn't created tarballs.
# git archive --format=tar --prefix=%%{packdname}/ %%{git_commit} adb fastboot libzipfile libcutils libmincrypt libsparse mkbootimg include/cutils include/zipfile include/mincrypt | xz > %%{packdname}.tar.xz
# git archive --format=tar --prefix=%%{packdname}/ %%{git_commit} adb fastboot libzipfile libcutils libmincrypt libsparse mkbootimg include/cutils include/zipfile include/mincrypt include/utils include/private | xz > %%{packdname}.tar.xz
# https://android.googlesource.com/platform/system/core.git
# git archive --format=tar --prefix=extras/ %%{extras_git_commit} ext4_utils | xz > %%{extras_packdname}.tar.xz
# git archive --format=tar --prefix=extras/ %%{extras_git_commit} ext4_utils f2fs_utils | xz > %%{extras_packdname}.tar.xz
# https://android.googlesource.com/platform/system/extras.git
Source0: %{packdname}.tar.xz
@ -30,7 +30,10 @@ Source3: adb-Makefile
Source4: fastboot-Makefile
Source5: 51-android.rules
Source6: adb.service
# None of the code *we* compile uses anything from selinux/android.h, but
# other code may, so not upstreaming these patches
Patch1: 0001-Remove-android-selinux-header.patch
Patch2: 0002-Add-missing-headers.patch
Requires(post): systemd
Requires(preun): systemd
Requires(postun): systemd
@ -64,6 +67,8 @@ setup between the host and the target phone as adb.
%prep
%setup -q -b 1 -n extras
%patch1 -p1
%patch2 -p1
%setup -q -b 0 -n %{packdname}
cp -p %{SOURCE2} Makefile
cp -p %{SOURCE3} adb/Makefile
@ -100,6 +105,9 @@ install -p -D -m 0644 %{SOURCE6} \
%changelog
* Wed Dec 24 2014 Jonathan Dieter <jdieter@lesbg.com> - 20141224git8393e50-1
- Update to 5.0.2 release
* Fri Sep 19 2014 Ivan Afonichev <ivan.afonichev@gmail.com> - 20130123git98d0789-5
- Added more udev devices
- Resolves: rhbz 967216 Adb service now stores keys in /var/lib/adb

View file

@ -4,6 +4,8 @@ SRCS+= bootimg.c
SRCS+= fastboot.c
SRCS+= usb_linux.c
SRCS+= util_linux.c
SRCS+= util.c
SRCS+= fs.c
VPATH+= ../libzipfile
SRCS+= centraldir.c
@ -27,6 +29,11 @@ SRCS+= make_ext4fs.c
SRCS+= sha1.c
SRCS+= uuid.c
SRCS+= wipe.c
SRCS+= crc16.c
SRCS+= ext4_sb.c
VPATH+= ../../extras/f2fs_utils
SRCS+= f2fs_ioutils.c
CPPFLAGS+= -DADB_HOST=1
CPPFLAGS+= -DHAVE_FORKEXEC=1
@ -34,13 +41,17 @@ CPPFLAGS+= -DHAVE_SYMLINKS
CPPFLAGS+= -DHAVE_TERMIO_H
CPPFLAGS+= -D_GNU_SOURCE
CPPFLAGS+= -D_XOPEN_SOURCE
CPPFLAGS+= -D_FILE_OFFSET_BITS=64
CPPFLAGS+= -DHAVE_OFF64_T
CPPFLAGS+= -DHAVE_SYS_UIO_H
CPPFLAGS+= -I.
CPPFLAGS+= -I../include
CPPFLAGS+= -I../libsparse/include
CPPFLAGS+= -I../mkbootimg
CPPFLAGS+= -I../../extras/ext4_utils
CPPFLAGS+= -I../../extras/f2fs_utils
CFLAGS+= $(RPM_OPT_FLAGS)
CFLAGS+= $(RPM_OPT_FLAGS) -std=gnu99
LIBS= -lrt -lpthread -lz -lselinux
CC= $(TOOLCHAIN)gcc