Profile cover photo
Profile photo
Elliott Hughes
886 followers
886 followers
About
Elliott's posts

SDK Platform Tools 25.0.5 (April 24, 2017)

* Fixed adb sideload of large updates on Windows, manifesting as "std::bad_alloc" (bug 37139736).

* Fixed adb problems with some Windows firewalls, manifesting as "cannot open transport registration socketpair" (bug 37139725).

* Both adb --version and fastboot --version now include the install path.

* Changed adb to not resolve localhost to work around misconfigured VPN.

* Changed adb to no longer reset USB devices on Linux, which could affect other attached USB devices.

https://developer.android.com/studio/releases/platform-tools.html#download

If you go down to the woods^WAndroid issue tracker today, you'll see it's finally been migrated from code.google.com to the (new) public-facing side of the internal bug tracker. If you remember how long ago code.google.com was deprecated, you'll know this has been a long time coming!

This should be a huge improvement in terms of our ability to find the right owners for bugs, passing them around between teams internally, and being able to better track bugs and align them with specific releases. Historically only the internal bug tracker was really on the release team's radar (except for Android Studio, who worked on their own schedule and focused on the external bug tracker anyway).

b.android.com now takes you to a page about how/where to file a bug.

NDK r15-beta1 out today.

Download links here: https://github.com/android-ndk/ndk/wiki

Change log here: https://github.com/android-ndk/ndk/wiki/Changelog-r15-beta1

File bugs on the github tracker as usual...

Post has attachment
Android Platform Tools 25.0.4 released

Android Platform Tools 25.0.4 has been released. You can download it
from https://developer.android.com/studio/releases/platform-tools.html#download
now.

The release notes should be up on that page tomorrow, but in the meantime:

- Added experimental libusb support to linux/mac adb

To use the libusb backend, set the environment variable ADB_LIBUSB=1
before launching adb server. The new `adb host-features` command will
tell you whether or not you're using libusb. In this release, the old
non-libusb implementation remains the default.

- fastboot doesn't hang 2016 MacBook Pros anymore

This fixes https://code.google.com/p/android/issues/detail?id=231129.

As usual, file bugs at b.android.com.



But... the really good news for those who complained before about the lack of notifications is that there's now a android-platform-tools-announce@ group. Here's this same post there as proof: https://groups.google.com/forum/#!topic/android-platform-tools-announce/VnKYHlqQCIg

NDK r14 released!

Download: https://developer.android.com/ndk/downloads/index.html

Release notes: https://github.com/android-ndk/ndk/wiki/Changelog-r14

This is the first NDK release with unified headers (https://android.googlesource.com/platform/ndk/+/master/docs/UnifiedHeaders.md). The exact same headers we use in the platform, in the NDK. This doesn't magically give you all the current functionality on old devices (that's future work), but it does at least mean you have the latest bug fixes to all the structs and constants. They're opt-in in r14, but will be opt-out in r15, and hopefully the only option in r16.

Please try Clang and unified headers. It's what we use internally for OS builds, and GCC and the forked headers aren't being updated and will be removed at some point.

Full NDK roadmap here: https://android.googlesource.com/platform/ndk/+/master/docs/Roadmap.md

Post has attachment
We've updated instructions for booting Nexus/Pixel devices into fastboot mode and unlocking the bootloader: http://source.android.com/source/running.html

(I realized we needed to do this when our own QA folks were confused that "fastboot oem unlock" didn't work on https://code.google.com/p/android/issues/detail?id=234403 and I couldn't just point them to the docs.)

NDK r14 beta 2 now available: https://developer.android.com/ndk/downloads/index.html

Change log: https://github.com/android-ndk/ndk/wiki/Changelog-r14-beta2

Major announcements from the change log:

The platform headers have been synchronized with the Android platform. This means that the headers are now up to date, accurate, and header only bug fixes will affect all API levels. Prior to this, the M and N headers were actually the L headers, all the headers did not actually match the platform level they were supposedly for (declared functions that didn't exist, didn't declare ones that did), and many of the old API levels had missing or incorrect constants that were in newer API levels.

Since these are in some cases radically different from those we've previously shipped, these are not enabled by default. See Unified Headers for details on using the updated headers.

Note: The legacy headers will be removed in a future release. It is likely that r15 will default to using these while still being optional. If all goes well, the legacy headers will be removed in r16, so please test them now.

GCC is no longer supported. It will not be removed from the NDK just yet, but is no longer receiving backports. It cannot be removed until after libc++ has become stable enough to be the default, as some parts of gnustl are still incompatible with Clang. It will likely be removed after that point.



Post has attachment

How to build a "configure && make" project with the NDK.

If you search for things like "android configure ndk" most of the results are pretty terrible. I'm working on slightly improving the official docs in another window, but in the meantime, here's a cleaned-up version of something I posted to the strace-devel@ mailing list the other day...

Here's how to build a 32-bit ARM strace 4.15 binary with the NDK:

* Download and unpack NDK r14 beta 1 from https://github.com/android-ndk/ndk/wiki

* Generate a standalone toolchain [https://developer.android.com/ndk/guides/standalone_toolchain.html]
that uses unified headers [https://android.googlesource.com/platform/ndk/+/master/docs/UnifiedHeaders.md]:

./android-ndk-r14-beta1/build/tools/make_standalone_toolchain.py \
-unified-headers --arch arm --api 21 --install-dir /tmp/ndk-arm

* Download and unpack strace 4.15.

* Until NDK r14 beta 2, you'll need to hack a couple of things:

1. strace seems to need mtd/mtd-abi.h and mtd/ubi-user.h for mtd.c.
they're not in r14beta1 so you'll need to copy them from
bionic [https://android.googlesource.com/platform/bionic/+/master/libc/kernel/uapi/mtd/]
into /tmp/ndk-arm/sysroot/usr/include/mtd/ (which you'll have to
create).

2. strace assumes the glibc name __key for the struct ipc64_perm
field. add these lines to sys/ipc.h in /tmp/ndk-arm:

+#if defined(__USE_GNU)
+#define __key key
+#define __seq seq
+#endif

I'll add that to
bionic [https://android-review.googlesource.com/#/c/329669/] and it'll
be in a future NDK release.

* Build:

export CC=/tmp/ndk-arm/bin/arm-linux-androideabi-clang
export LDFLAGS="-pie"
./configure --host=arm-linux-androideabi
make

* Push the resulting "strace" to your device and use it.

$ adb push strace /data/local/tmp/strace
$ adb shell /data/local/tmp/strace -V
strace - version 4.15
$

(I actually tested by tracing another executable, but the output of -V was less spammy for the purposes of this email.)

If you want to build for a different architecture, just replace "arm" and "arm-linux-androideabi" above with the corresponding pair of values for your architecture.

Post has attachment
New documentation about debugging various common kinds of native crash up on source.android.com this week: https://source.android.com/devices/tech/debug/native-crash.html

I actually wrote this to help folks in QA triage app compatibility crashes better, and it seems to have been helpful. The original internal version was based on actual app crashes from bugs.
Wait while more posts are being loaded