2024-01-05 20:24:02 +01:00
|
|
|
%define _boringssl_commit %(curl https://android.googlesource.com/platform/external/boringssl/+/refs/tags/platform-tools-%{version}/BORINGSSL_REVISION?format=TEXT | base64 -d)
|
2024-01-05 20:24:01 +01:00
|
|
|
Name: android-tools
|
2024-01-05 20:24:02 +01:00
|
|
|
Version: 29.0.5
|
2024-01-05 20:24:01 +01:00
|
|
|
Release: 1mamba
|
2024-01-05 20:24:01 +01:00
|
|
|
Summary: Android platform tools
|
|
|
|
Group: System/Tools
|
|
|
|
Vendor: openmamba
|
|
|
|
Distribution: openmamba
|
|
|
|
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
|
|
|
|
URL: http://source.android.com
|
2024-01-05 20:24:02 +01:00
|
|
|
Source0: https://android.googlesource.com/platform/system/core.git/platform-tools-%{version}/core-%{version}.tar.bz2
|
|
|
|
Source1: https://android.googlesource.com/platform/system/extras.git/platform-tools-%{version}/extras-%{version}.tar.bz2
|
|
|
|
Source2: https://android.googlesource.com/platform/system/tools/mkbootimg.git/platform-tools-%{version}/mkbootimg-%{version}.tar.bz2
|
|
|
|
Source3: https://android.googlesource.com/platform/external/selinux.git/platform-tools-%{version}/selinux-%{version}.tar.bz2
|
|
|
|
Source4: https://android.googlesource.com/platform/external/f2fs-tools.git/platform-tools-%{version}/f2fs-tools-%{version}.tar.bz2
|
|
|
|
Source5: https://android.googlesource.com/platform/external/e2fsprogs.git/platform-tools-%{version}/e2fsprogs-%{version}.tar.bz2
|
|
|
|
Source6: https://android.googlesource.com/platform/external/avb.git/platform-tools-%{version}/avb-%{version}.tar.bz2
|
2024-01-05 20:24:02 +01:00
|
|
|
Source7: https://boringssl.googlesource.com/boringssl.git/master@%{_boringssl_commit}/boringssl-%{version}.tar.bz2
|
|
|
|
Source8: deployagent-29.0.5.jar
|
|
|
|
Source9: https://android.googlesource.com/platform/frameworks/base.git/platform-tools-%{version}/base-%{version}.tar.bz2
|
|
|
|
Source10: https://android.googlesource.com/platform/frameworks/native.git/platform-tools-%{version}/native-%{version}.tar.bz2
|
2024-01-05 20:24:02 +01:00
|
|
|
# From arch linux
|
2024-01-05 20:24:02 +01:00
|
|
|
Source20: android-tools-29.0.5-generate_build.rb
|
2024-01-05 20:24:02 +01:00
|
|
|
Source21: android-tools-bash_completion.fastboot
|
2024-01-05 20:24:01 +01:00
|
|
|
Patch0: android-tools-5.0.2_r1-remove-selinux-header.patch
|
2024-01-05 20:24:02 +01:00
|
|
|
Patch1: android-tools-7.1.1_r13-fix-build.patch
|
2024-01-05 20:24:02 +01:00
|
|
|
Patch2: android-tools-29.0.5-build-core.patch
|
2024-01-05 20:24:01 +01:00
|
|
|
License: Apache License 2.0, BSD
|
|
|
|
## AUTOBUILDREQ-BEGIN
|
|
|
|
BuildRequires: glibc-devel
|
2024-01-05 20:24:02 +01:00
|
|
|
BuildRequires: libgcc
|
|
|
|
BuildRequires: libpcre2-devel
|
|
|
|
BuildRequires: libstdc++6-devel
|
|
|
|
BuildRequires: libusb-devel
|
2024-01-05 20:24:01 +01:00
|
|
|
BuildRequires: libz-devel
|
|
|
|
## AUTOBUILDREQ-END
|
2024-01-05 20:24:01 +01:00
|
|
|
BuildRequires: libf2fs-devel
|
2024-01-05 20:24:01 +01:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
|
|
|
|
|
|
|
%description
|
|
|
|
Android platform tools ported to GNU/Linux for Android based devices management.
|
|
|
|
|
|
|
|
The Android Debug Bridge (ADB) is used to:
|
|
|
|
* keep track of all Android devices and emulators instances connected to or running on a given host developer machine
|
|
|
|
* implement various control commands (e.g. "adb shell", "adb pull", etc.) for the benefit of clients (command-line users, or helper programs like DDMS). These commands are what is called a 'service' in ADB.
|
|
|
|
|
|
|
|
Fastboot is used to manipulate the flash partitions of the Android phone.
|
|
|
|
It can also boot the phone using a kernel image or root filesystem image which reside on the host machine rather than in the phone flash.
|
|
|
|
In order to use it, it is important to understand the flash partition layout for the phone.
|
|
|
|
The fastboot program works in conjunction with firmware on the phone to read and write the flash partitions.
|
|
|
|
It needs the same USB device setup between the host and the target phone as adb.
|
|
|
|
|
|
|
|
%package -n mkbootimg
|
|
|
|
Summary: A tool for creating kernel bootable images for the Android boot loader
|
|
|
|
Group: System/Kernel and Hardware
|
|
|
|
|
|
|
|
%description -n mkbootimg
|
|
|
|
mkbootims is a command line tool useful for creating kernel bootable images for the Android boot loader.
|
|
|
|
This package also includes mkbootfs.
|
|
|
|
|
2024-01-05 20:24:02 +01:00
|
|
|
%debug_package
|
|
|
|
|
2024-01-05 20:24:01 +01:00
|
|
|
%prep
|
2024-01-05 20:24:02 +01:00
|
|
|
%setup -q -c -a1 -a2 -a3 -a4 -a5 -a6 -a7 -a9 -a10
|
2024-01-05 20:24:02 +01:00
|
|
|
#% setup -q -c -D -T
|
|
|
|
#:<< _EOF
|
|
|
|
|
2024-01-05 20:24:01 +01:00
|
|
|
mv core-%{version} core
|
2024-01-05 20:24:02 +01:00
|
|
|
mv base-%{version} base
|
|
|
|
mv native-%{version} native
|
2024-01-05 20:24:01 +01:00
|
|
|
mv extras-%{version} extras
|
2024-01-05 20:24:02 +01:00
|
|
|
mv mkbootimg-%{version} mkbootimg
|
|
|
|
mv selinux-%{version} selinux
|
|
|
|
mv f2fs-tools-%{version} f2fs-tools
|
|
|
|
mv e2fsprogs-%{version} e2fsprogs
|
|
|
|
mv avb-%{version} avb
|
|
|
|
mv boringssl-%{version} boringssl
|
2024-01-05 20:24:01 +01:00
|
|
|
|
2024-01-05 20:24:02 +01:00
|
|
|
cd core
|
|
|
|
%patch2 -p1
|
|
|
|
cd ..
|
|
|
|
#_EOF
|
2024-01-05 20:24:01 +01:00
|
|
|
|
2024-01-05 20:24:02 +01:00
|
|
|
cp -p %{S:20} generate_build.rb
|
2024-01-05 20:24:01 +01:00
|
|
|
|
2024-01-05 20:24:02 +01:00
|
|
|
%ifnarch x86_64
|
|
|
|
# Does not build on 32 bit
|
|
|
|
sed -i "s|libfastboot = |#libfastboot =|" generate_build.rb
|
|
|
|
sed -i "s|libfsmgr = |#libfsmgr =|" generate_build.rb
|
|
|
|
sed -i "s|link(\"fastboot|#link\(\"fastboot|" generate_build.rb
|
|
|
|
%endif
|
2024-01-05 20:24:01 +01:00
|
|
|
|
2024-01-05 20:24:02 +01:00
|
|
|
chmod +x generate_build.rb
|
|
|
|
PLATFORM_TOOLS_VERSION="%{version}-%{release}" LDFLAGS='-Wl,-z,relro,-z,now' ./generate_build.rb > build.ninja
|
2024-01-05 20:24:01 +01:00
|
|
|
|
2024-01-05 20:24:02 +01:00
|
|
|
cp %{SOURCE8} deployagent.jar
|
|
|
|
|
2024-01-05 20:24:02 +01:00
|
|
|
%build
|
|
|
|
cd boringssl
|
|
|
|
%cmake -dbuild \
|
|
|
|
-DBUILD_SHARED_LIBS:BOOL=OFF \
|
|
|
|
-GNinja
|
|
|
|
|
|
|
|
ninja crypto/libcrypto.a
|
|
|
|
cd ../..
|
2024-01-05 20:24:01 +01:00
|
|
|
|
2024-01-05 20:24:02 +01:00
|
|
|
ninja
|
2024-01-05 20:24:01 +01:00
|
|
|
|
|
|
|
%install
|
|
|
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
2024-01-05 20:24:02 +01:00
|
|
|
for f in adb mke2fs.android e2fsdroid ext2simg; do
|
|
|
|
install -D -m0755 ${f} %{buildroot}%{_bindir}/${f}
|
|
|
|
done
|
|
|
|
%ifarch x86_64
|
|
|
|
install -D -m0755 fastboot %{buildroot}%{_bindir}/fastboot
|
|
|
|
%endif
|
|
|
|
install -D -m0755 avb/avbtool %{buildroot}%{_bindir}/avbtool
|
|
|
|
install -D -m0755 mkbootimg/mkbootimg.py %{buildroot}%{_bindir}/mkbootimg
|
|
|
|
install -D -m0755 mkbootimg/unpack_bootimg.py %{buildroot}%{_bindir}/unpack_bootimg
|
|
|
|
install -Dm 644 %{SOURCE21} %{buildroot}%{_datadir}/bash-completion/completions/fastboot
|
2024-01-05 20:24:01 +01:00
|
|
|
|
2024-01-05 20:24:01 +01:00
|
|
|
%clean
|
|
|
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
2024-01-05 20:24:02 +01:00
|
|
|
%{_bindir}/avbtool
|
2024-01-05 20:24:01 +01:00
|
|
|
%{_bindir}/adb
|
2024-01-05 20:24:02 +01:00
|
|
|
%{_bindir}/e2fsdroid
|
|
|
|
%{_bindir}/ext2simg
|
|
|
|
%ifarch x86_64
|
2024-01-05 20:24:01 +01:00
|
|
|
%{_bindir}/fastboot
|
2024-01-05 20:24:02 +01:00
|
|
|
%endif
|
|
|
|
%{_bindir}/mke2fs.android
|
|
|
|
%{_bindir}/unpack_bootimg
|
|
|
|
%{_datadir}/bash-completion/completions/fastboot
|
|
|
|
%doc avb/LICENSE
|
2024-01-05 20:24:01 +01:00
|
|
|
|
|
|
|
%files -n mkbootimg
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%{_bindir}/mkbootimg
|
|
|
|
|
|
|
|
%changelog
|
2024-01-05 20:24:02 +01:00
|
|
|
* Sun Dec 01 2019 Automatic Build System <autodist@mambasoft.it> 29.0.5-1mamba
|
|
|
|
- automatic version update by autodist
|
|
|
|
|
2024-01-05 20:24:02 +01:00
|
|
|
* Sun Oct 27 2019 Silvan Calarco <silvan.calarco@mambasoft.it> 29.0.4-1mamba
|
|
|
|
- update to 29.0.4
|
|
|
|
|
|
|
|
* Sat Jun 17 2017 Automatic Build System <autodist@mambasoft.it> 7.1.2_r6-1mamba
|
|
|
|
- automatic version update by autodist
|
|
|
|
|
|
|
|
* Fri Jan 13 2017 Silvan Calarco <silvan.calarco@mambasoft.it> 7.1.1_r13-1mamba
|
|
|
|
- update to 7.1.1_r13
|
|
|
|
|
2024-01-05 20:24:02 +01:00
|
|
|
* Mon Jul 04 2016 Silvan Calarco <silvan.calarco@mambasoft.it> 5.1.1_r37-1mamba
|
|
|
|
- update to 5.1.1_r37
|
|
|
|
- add permissions 0666 in udev rules
|
|
|
|
|
2024-01-05 20:24:02 +01:00
|
|
|
* Fri Jun 26 2015 Automatic Build System <autodist@mambasoft.it> 5.1.1_r5-1mamba
|
|
|
|
- automatic version update by autodist
|
|
|
|
|
2024-01-05 20:24:02 +01:00
|
|
|
* Thu Jun 18 2015 Automatic Build System <autodist@mambasoft.it> 5.1.1_r4-1mamba
|
|
|
|
- automatic version update by autodist
|
|
|
|
|
2024-01-05 20:24:01 +01:00
|
|
|
* Thu May 14 2015 Automatic Build System <autodist@mambasoft.it> 5.1.1_r2-1mamba
|
|
|
|
- automatic version update by autodist
|
|
|
|
|
2024-01-05 20:24:01 +01:00
|
|
|
* Thu Apr 09 2015 Automatic Build System <autodist@mambasoft.it> 5.1.0_r3-1mamba
|
|
|
|
- automatic version update by autodist
|
|
|
|
|
2024-01-05 20:24:01 +01:00
|
|
|
* Tue Jan 20 2015 Automatic Build System <autodist@mambasoft.it> 5.0.2_r1-1mamba
|
|
|
|
- automatic version update by autodist
|
|
|
|
|
2024-01-05 20:24:01 +01:00
|
|
|
* Wed Aug 27 2014 Automatic Build System <autodist@mambasoft.it> 4.4.4_r2.0.1-1mamba
|
|
|
|
- automatic version update by autodist
|
|
|
|
|
2024-01-05 20:24:01 +01:00
|
|
|
* Sat Jul 12 2014 Silvan Calarco <silvan.calarco@mambasoft.it> 4.4.4_r1-1mamba
|
|
|
|
- update to 4.4.4_r1
|
|
|
|
|
2024-01-05 20:24:01 +01:00
|
|
|
* Fri Jun 01 2012 Stefano Cotta Ramusino <stefano.cotta@openmamba.org> 4.0.3_r1-3mamba
|
|
|
|
- fixed android udev rules
|
|
|
|
|
|
|
|
* Wed May 30 2012 Stefano Cotta Ramusino <stefano.cotta@openmamba.org> 4.0.3_r1-2mamba
|
|
|
|
- added main package
|
|
|
|
- fixed license
|
|
|
|
|
|
|
|
* Tue Feb 21 2012 Silvan Calarco <silvan.calarco@mambasoft.it> 4.0.3_r1-1mamba
|
|
|
|
- package created by autospec
|