Fastboot protocol is a mechanism for communicating with bootloaders
over USB or Ethernet. The provided command line tool can be used
to flash filesystems on Android-powered devices.
===> The following configuration options are available for android-tools-fastboot-29.0.6_1:
BASH=off: Install programmable completions for Bash
DOCS=on: Build and/or install documentation
===> Use 'make config' to modify these settings
The port installed fastboot(1) under /usr/local/bin. However, there's
a different fastboot(8) under /sbin. To avoid accidentally invoking
the wrong command make sure either to
- adjust PATH environment variable to have fastboot(1) found first
- create a shell alias with absolute path to fastboot(1)
- create a symlink with different name in PATH e.g., under ~/bin
devel/android-tools: New port: Android debugging tools
While I'm here, remove the old devel/android-tools-adb and
devel/android-tools-fastboot ports. These ports are long out-of-date
and the adb port especially had issues with certain devices.
This port was tested from a FreeBSD 14.0 system to flash both
LineageOS and GrapheneOS on a Google Pixel 3 using both `adb` and
`fastboot`.
*/*: Remove redundant '-*' from CONFLICTS definitions
The conflict checks compare the patterns first against the package
names without version (as reported by "pkg query "%n"), then - if
there was no match - agsinst the full package names including the
version (as reported by "pkg query "%n-%v").
Approved by: portmgr (blanket)
Simplify port-specific manpages location after r523104
Not all of my ports are covered because:
- USES=cmake requires patching devel/cmake to undo BSD-specific defaults
(A good example why BSD quirks should stay in ports, not to be upstreamed)
- USES=meson and GNU_CONFIGURE require dropping --mandir argument
- ponscripter-sekai requires Templates/BSD.local.dist to NOT create PREFIX/man
devel/android-tools-fastboot: better name file for FreeBSD support
While tested mainly on FreeBSD and DragonFly it may also work on
NetBSD and OpenBSD which use reference libusb implementation.
Bump PORTREVISION for ports depending on the canonical version of GCC
as defined in Mk/bsd.default-versions.mk which has moved from GCC 8.3
to GCC 9.1 under most circumstances now after revision 507371.
This includes ports
- with USE_GCC=yes or USE_GCC=any,
- with USES=fortran,
- using Mk/bsd.octave.mk which in turn features USES=fortran, and
- with USES=compiler specifying openmp, nestedfct, c11, c++0x, c++11-lang,
c++11-lib, c++14-lang, c++17-lang, or gcc-c++11-lib
plus, everything INDEX-11 shows with a dependency on lang/gcc9 now.
PR: 238330
Bump PORTREVISION for ports depending on the canonical version of GCC
defined via Mk/bsd.default-versions.mk which has moved from GCC 7.4 t
GCC 8.2 under most circumstances.
This includes ports
- with USE_GCC=yes or USE_GCC=any,
- with USES=fortran,
- using Mk/bsd.octave.mk which in turn features USES=fortran, and
- with USES=compiler specifying openmp, nestedfct, c11, c++0x, c++11-lang,
c++11-lib, c++14-lang, c++17-lang, or gcc-c++11-lib
plus, as a double check, everything INDEX-11 showed depending on lang/gcc7.
PR: 231590
Bump PORTREVISION for ports depending on the canonical version of GCC
in the ports tree (via Mk/bsd.default-versions.mk and lang/gcc) which
has now moved from GCC 6 to GCC 7 by default.
This includes ports
- featuring USE_GCC=yes or USE_GCC=any,
- featuring USES=fortran,
- using Mk/bsd.octave.mk which in turn features USES=fortran, and those
- with USES=compiler specifying one of openmp, nestedfct, c11, c++0x,
c++11-lib, c++11-lang, c++14-lang, c++17-lang, or gcc-c++11-lib.
PR: 222542
devel/android-tools-adb: update SDK version as part of makesum
- Extract platform SDK version out of platform/build repo
- Move version logic out of sub-makefile
- Simplify GH_REVISION
devel/android-tools-{adb,fastboot}: chase SDK version in --version after r456869
Keep in mind, the output is still not identical to upstream.
$ platform-tools_r26.0.0-linux/adb version
Android Debug Bridge version 1.0.39
Revision 3db08f2c6889-android
Installed as /tmp/platform-tools_r26.0.0-linux/adb
$ platform-tools_r26.0.0-linux/fastboot --version
fastboot version 3db08f2c6889-android
Installed as /tmp/platform-tools_r26.0.0-linux/fastboot
$ platform-tools_r27.0.0-linux/adb version
Android Debug Bridge version 1.0.39
(Only the first 15 lines of the commit message are shown above )
Bump PORTREVISION for ports depending on the canonical version of GCC
(via Mk/bsd.default-versions.mk and lang/gcc) which has moved from
GCC 5.4 to GCC 6.4 under most circumstances.
This includes ports
- with USE_GCC=yes or USE_GCC=any,
- with USES=fortran,
- using Mk/bsd.octave.mk which in turn features USES=fortran, and
- with USES=compiler specifying openmp, nestedfct, c++11-lib, c++11-lang,
c++14-lang, c++0x, c11, or gcc-c++11-lib.
PR: 219275
Bump PORTREVISIONs for ports depending on the canonical version of GCC and
lang/gcc which have moved from GCC 4.9.4 to GCC 5.4 (at least under some
circumstances such as versions of FreeBSD or platforms).
This includes ports
- with USE_GCC=yes or USE_GCC=any,
- with USES=fortran,
- using using Mk/bsd.octave.mk which in turn has USES=fortran, and
- with USES=compiler specifying openmp, nestedfct, c++11-lib, c++14-lang,
c++11-lang, c++0x, c11, or gcc-c++11-lib.
PR: 216707
Add Public Domain support to ports license framework. You can now use
LICENSE= PD
Note that although Public Domain is not technically a license, it's
handled in the same way as licenses here, which is a common practice
(Arch, Gentoo, Fedora, Debian, even FOSSology do the same).
Convert all ports which redefine Public Domain LICENSE to LICENSE=PD.
Approved by: portmgr (bapt)
Differential Revision: D4149
devel/android-tools-{adb,fastboot}: force all distfiles for |make makesum|
Forgetting to pass DISABLE_CONFLICTS= is easy to notice unlike
a missing checksum. So, hook into makesum like with update-revision.
devel/android-tools-{adb,fastboot}: update BASH to 20150902 snapshot
- Switch to the actual upstream on GitHub
- Reduce overuse of :FOO make(1) variable modifiers
- Restore conditional install via target option helper
devel/android-tools-*: slightly improve standalone build
- Try to derive {ADB,FASTBOOT}_REVISION from git(1)
- Use pkg-config for libcrypto/libpcre/libusb (e.g. if they aren't in base)
- Convert PORTDOCS into FILES (bsd.port.mk vs. bsd.prog.mk)
- Partially convert to new testing framework
- Put -lpthread last as enforced by base r274849 but prevent
:= assignment from mucking $ escaping in $()
- |make clean| to clean files built by test target
- Move up bsd.prog.mk in order to use ${PROG} and ${OBJS} defined in it
devel/android-tools-fastboot-devel: move FreeBSD code to C++
Copy files in order to fix the following errors.
files/usb_freebsd.cpp:132:4: error: assigning to 'usb_handle *' from
incompatible type 'void *'
h = malloc(sizeof(*h));
^ ~~~~~~~~~~~~~~~~~~
files/usb_freebsd.cpp:162:6: error: no matching function for call to
'libusb_bulk_transfer'
if (libusb_bulk_transfer(h->handle, h->ep_out, (void *)(long)_data,
len, &actlen, 0) < 0)
^~~~~~~~~~~~~~~~~~~~
/usr/include/libusb.h:478:5: note: candidate function not viable: cannot
convert argument of incomplete type 'void *' to 'uint8_t *' (aka 'unsigned char
*')
int libusb_bulk_transfer(libusb_device_handle * devh, uint8_t endpoint,
uint8_t *data, int length, int *transferred, uint32_t timeout);
^
files/usb_freebsd.cpp:172:6: error: no matching function for call to
'libusb_bulk_transfer'
if (libusb_bulk_transfer(h->handle, h->ep_in, _data, len, &actlen, 0)
< 0)
^~~~~~~~~~~~~~~~~~~~
/usr/include/libusb.h:478:5: note: candidate function not viable: cannot
convert argument of incomplete type 'void *' to 'uint8_t *' (aka 'unsigned char
*')
int libusb_bulk_transfer(libusb_device_handle * devh, uint8_t endpoint,
uint8_t *data, int length, int *transferred, uint32_t timeout);
^
3 errors generated.
fastboot.o: In function `find_item(char const*, char const*)':
fastboot.cpp:(.text+0xea): undefined reference to `get_my_path'
devel/android-tools-fastboot: shuffle CFLAGS to unbreak DragonFly
Avoid stepping into OS X platform code with off64_t workaround.
cc ... -D__APPLE__ -D__MACH__ .../ext4_utils/ext4_utils.c
In file included from .../ext4_utils/ext4_utils.c:43:0:
/usr/include/sys/disk.h:49:2: error: #error "This file should not be included by
userland programs."
#error "This file should not be included by userland programs."
^
*** [ext4_utils.o] Error code 1
Reported by: DPorts
devel/android-tools-fastboot: unbreak against libusb-1.0.9 from sf.net
inb4 someone actually tests on NetBSD or OpenBSD...
files/usb_freebsd.c:57:2: error: must
use 'struct' tag to refer to type 'libusb_device_descriptor'
libusb_device_descriptor ddesc;
^
struct
files/usb_freebsd.c:58:2: error: must
use 'struct' tag to refer to type 'libusb_config_descriptor'
libusb_config_descriptor *pcfg;
^
struct
2 errors generated.
Tested by: md5
devel/android-tools-fastboot: update to 4.2.2.r1.2
android.googlesource.com archives have volatile timestamps which makes
them impossible to use as distfiles due to varying checksum.
android organization on GitHub doesn't have platform/system/extras mirror.
And various private and non-vanilla clones seem to lack android-* tags
that are necessary to sync modules.
For now, use my own mirror to avoid local-distfiles and keep the port simple
via multi-GitHub support.
devel/android-tools-fastboot: inflict minor style
o Escape MAKE_ENV paths for consistency with my other ports
o -I. == -I${.OBJDIR} while ${.OBJDIR} != ${.CURDIR} after |make obj|
devel/android-tools-fastboot: add new port
Fastboot is a diagnostic protocol primarily used to update the flash
filesystem of Android devices over USB.
This package provides the fastboot command-line tool.
Inspired by: devel/android-tools-adb
Obtained from: hselasky @ libusb-devel