Commit graph

35840 commits

Author SHA1 Message Date
Justin Yun
cc52f1c947 Merge "Mark libziparchive as VNDK in Android.bp"
am: 4ed58aff38

Change-Id: I3a672f2c51564d82fbde804850b9ec4d50a8f764
2017-09-15 16:31:33 +00:00
Justin Yun
8c03107614 Merge "Mark the modules as VNDK in Android.bp"
am: 5d1e740e7f

Change-Id: Ie22de4d907116cf2ba74f875679506a3d2a41feb
2017-09-15 16:31:01 +00:00
Treehugger Robot
4ed58aff38 Merge "Mark libziparchive as VNDK in Android.bp" 2017-09-15 16:23:46 +00:00
Treehugger Robot
5d1e740e7f Merge "Mark the modules as VNDK in Android.bp" 2017-09-15 16:23:30 +00:00
Jae Shin
0ed84e3e91 resolve merge conflicts of 0dd4b6aa3 to stage-aosp-master
Test: I solemnly swear I tested this conflict resolution.
Change-Id: Ia163118a25cfc2e079803c230d69e55357acd3fa
2017-09-15 16:50:34 +09:00
Jae Shin
0dd4b6aa39 Merge "gatekeeperd: use std::unique_ptr" 2017-09-15 07:00:07 +00:00
Jae Shin
3eaaa508e9 Merge changes I60f883c0,Ie5955865
am: 8c3e940324

Change-Id: I97b92d3ea89bd81798ec1ca0859197617970069b
2017-09-15 01:41:14 +00:00
Justin Yun
919cc55a7e gatekeeperd: use std::unique_ptr
std::unique_ptr is available in this scope. Substitute the UniquePtr to
std::unique_ptr.

Bug: 63686260
Test: build and boot
Merged-In: Ib8ea3fb5c49c0e92d962f65f1139b073168f8698
Change-Id: Ib8ea3fb5c49c0e92d962f65f1139b073168f8698
(cherry picked from commit 68b0ec6487)
2017-09-15 01:12:43 +00:00
Justin Yun
096114d85c Mark libziparchive as VNDK in Android.bp
As a VNDK module, Android.bp must have 'vndk' tag as well as
'vendor_available: true'.

The 'vndk' tag for VNDK module is formated as below:
vndk: {
    enabled: true,
},

VNDK modules will be installed both in system/lib(64) as normal and
in system/lib(64)/vndk as a vendor variant.

Bug: 63866913
Test: build and boot with BOARD_VNDK_VERSION=current
Merged-In: Iec5d3496e91a99f3e6b0c816c67ad279672ff36a
Change-Id: Iec5d3496e91a99f3e6b0c816c67ad279672ff36a
(cherry picked from commit 4e7e5b3ba053d013f2c4ae79d02722b874c629fb)
2017-09-15 01:07:40 +00:00
Jae Shin
8c3e940324 Merge changes I60f883c0,Ie5955865
* changes:
  Mark libsync as LL-NDK
  Fix NDK libsync to match ndk/sync.h
2017-09-15 01:02:53 +00:00
Jiyong Park
b87f884b99 Mark libsync as LL-NDK
libsync is used both by platform (e.g. libui.so) and by same-process
HALs (e.g. android.hardware.graphics.mapper@2.0-impl.so). Therefore it
is eligible for either VNDK-SP or LL-NDK. Among the two choices, LL-NDK
was selected because it is already an NDK and is just a thin wrapper
around a few kernel ioctls.

However, since libui (which is a vendor_available:true library) is using
more symbols that are not available to NDK clients, the extra symbols
are exposed as # vndk tag so that they are only available to VNDK
clients, but not to NDK clients.

Bug: 63866913
Test: BOARD_VNDK_VERSION=current m -j successful (2017 pixel)
Test: the built image is bootable
Merged-In: I60f883c049bd9b4562e6ce34d34ead47ba28af5f
Change-Id: I60f883c049bd9b4562e6ce34d34ead47ba28af5f
(cherry picked from commit 058e0919f6)
2017-09-15 00:33:52 +00:00
Jesse Hall
b5ec6a032c Fix NDK libsync to match ndk/sync.h
The header names were changed during review, but the library map file
wasn't updated.

Bug: 62229958
Test: CtsGraphicsTestCases:android.graphics.cts.SyncTest
Merged-In: Ie5955865667b35067f1ee209933f159f170419cd
Change-Id: Ie5955865667b35067f1ee209933f159f170419cd
(cherry picked from commit 59d9ee5d02)
2017-09-15 00:32:27 +00:00
Josh Gao
1425641300 Merge changes I0ed00441,I12d46493,Ib484f701
am: 0a01830612

Change-Id: I8b4566f0daea2181227facea12d82ffd566889b5
2017-09-14 20:35:31 +00:00
Josh Gao
0a01830612 Merge changes I0ed00441,I12d46493,Ib484f701
* changes:
  Revert "adb: fix deadlock between transport_unref and usb_close."
  adb: add lock to remove_socket.
  adb: reformat comments.
2017-09-14 20:04:42 +00:00
Elliott Hughes
80c5a9bb77 Merge "Update shell and utilities docs for O."
am: 1ca9852366

Change-Id: Ibc7add73df85e6d8fec29a0531e3ac41df07938e
2017-09-14 19:29:08 +00:00
Treehugger Robot
1ca9852366 Merge "Update shell and utilities docs for O." 2017-09-14 19:22:06 +00:00
Narayan Kamath
17785d2030 Merge "tombstoned: Fix calls to evconnlistener_new."
am: e997ba9d22

Change-Id: I039af85caf1a81a753caa0c069b3e97253198c59
2017-09-14 08:36:25 +00:00
Justin Yun
6a7e882316 Mark the modules as VNDK in Android.bp
As a VNDK module, Android.bp must have 'vndk' tag as well as
'vendor_available: true'.

The 'vndk' tag for VNDK module is formated as below:
vndk: {
        enabled: true,
},

VNDK modules will be installed both in system/lib(64) as normal and
in system/lib(64)/vndk as a vendor variant.

Bug: 63866913
Test: build and boot with BOARD_VNDK_VERSION=current
Merged-In: Icecb22ed2ed0f58c3168605d4cf64815e2dda750
Change-Id: Icecb22ed2ed0f58c3168605d4cf64815e2dda750
(cherry picked from commit 9b0ed72942)
2017-09-14 08:35:16 +00:00
Narayan Kamath
e997ba9d22 Merge "tombstoned: Fix calls to evconnlistener_new." 2017-09-14 08:33:49 +00:00
Josh Gao
4abd463d20 Merge "debuggerd_fallback: print maps."
am: 26123d7ec0

Change-Id: I122af30e6f3e205308a44ebf9bdbc7128ce3f246
2017-09-14 05:56:46 +00:00
Treehugger Robot
26123d7ec0 Merge "debuggerd_fallback: print maps." 2017-09-14 05:49:24 +00:00
Justin Yun
5dd33fe086 Merge "Mark libmemtrack as VNDK in Android.bp"
am: 0978f02468

Change-Id: Ia0e454b24dece7ef2ca4d5367df104953fe41c95
2017-09-14 05:36:44 +00:00
Treehugger Robot
0978f02468 Merge "Mark libmemtrack as VNDK in Android.bp" 2017-09-14 05:26:14 +00:00
Elliott Hughes
d7ddf39a5a Update shell and utilities docs for O.
Bug: N/A
Test: N/A
Change-Id: I9e5acdcdd124e9d7907fe6fa51a3be290262be69
2017-09-13 20:59:25 -07:00
Justin Yun
ef59c16450 Mark libmemtrack as VNDK in Android.bp
As a VNDK module, Android.bp must have 'vndk' tag as well as
'vendor_available: true'.

The 'vndk' tag for VNDK module is formated as below:
vndk: {
    enabled: true,
},

VNDK modules will be installed both in system/lib(64) as normal and
in system/lib(64)/vndk as a vendor variant.

Bug: 63866913
Test: build and boot with BOARD_VNDK_VERSION=current
Merged-In: I4b9e560ca6d4751889a7b14f205e678b68c20008
Change-Id: I4b9e560ca6d4751889a7b14f205e678b68c20008
(cherry picked from commit 7aeb5bb86c)
2017-09-14 02:46:36 +00:00
Josh Gao
fdc95c9670 debuggerd_fallback: print maps.
Bug: http://b/63400743
Bug: http://b/65590288
Test: killall -ABRT media.codec
Change-Id: I58e47dcd8e99ad7a5945604c27876dd01259e501
2017-09-13 18:30:11 -07:00
Jeff Sharkey
56c22732c6 Merge "Add "operator bool" overload to android::sp."
am: 28ebfe18fb

Change-Id: Idc8a68835c6a13ab92ffce44507360c2d8e6d9e5
2017-09-13 22:47:21 +00:00
Mark Salyzyn
6818f80dbb Merge changes from topic "b/63736262"
am: 1f666a6be9

Change-Id: I2586aac3d6fe8252ee6728de64fb37102accf0da
2017-09-13 22:45:52 +00:00
George Burgess IV
34abe0cf5c Merge "Fix static analyzer warnings"
am: 7176951b9b

Change-Id: Ie0e915a07644d0537b3e29a3b756705d45703e7f
2017-09-13 22:45:18 +00:00
Dimitry Ivanov
d56fee7686 Merge "Recommend using pid instead of tid for gdbclient.py"
am: 0d2105bf0b

Change-Id: I2eb30ad447f41b5d9ec77058e7bbbd51a3e2adf7
2017-09-13 22:44:46 +00:00
Josh Gao
e48ecce671 Revert "adb: fix deadlock between transport_unref and usb_close."
This reverts commit 7e197ef833.

The mutex lock in transport_unref hides a race that seems otherwise
hard to fix. Specifically, there's no synchronization between acquiring
a transport and attaching it to an asocket*, leading to badness if the
transport is closed in between the two operations.

Fix the original problem the reverted patch addressed by manually
unlocking before calling unregister_usb_transport.

Bug: http://b/65419665
Test: python test_device.py
Change-Id: I0ed0044129b1671b2c5dd1b9fa2e70a9b4475dc5
2017-09-13 14:31:14 -07:00
Josh Gao
62c92f0c05 adb: add lock to remove_socket.
The comment that was previously here says that local_socket_list_lock
must be taken, but this function is exposed to external callers that
can't possibly take the lock.

Bug: http://b/65419665
Test: python test_device.py
Change-Id: I12d464933936b2a210a827ccf19ea201020d8d78
2017-09-13 14:05:39 -07:00
Josh Gao
55c8b34f14 adb: reformat comments.
Test: none
Change-Id: Ib484f701f66cdb57f303dbd6d5eb2e5a15abdc0e
2017-09-13 14:05:21 -07:00
Treehugger Robot
28ebfe18fb Merge "Add "operator bool" overload to android::sp." 2017-09-13 20:35:38 +00:00
Treehugger Robot
1f666a6be9 Merge changes from topic "b/63736262"
* changes:
  adb: reboot: last boot command default
  bootstat: introduce sys.boot.reason
2017-09-13 20:25:33 +00:00
Jeff Sharkey
147b881ca9 Add "operator bool" overload to android::sp.
This matches the overload on std::unique_ptr and friends.

Test: builds, boots
Bug: 13758960
Change-Id: Ieed9faa6b162c2a10fa7cf2b135c9b17564f6c88
2017-09-13 11:06:07 -06:00
Narayan Kamath
c2e98f6340 tombstoned: Fix calls to evconnlistener_new.
The order of arguments is wrong - we're passing flags=static_cast<unsigned>(-1)
and backlog=LEV_OPT_CLOSE_ON_FREE (which is 2).

On versions of libevent prior to 2.1.8, this ends up accidentally setting
OPT_LEAVE_SOCKETS_BLOCKING, OPT_CLOSE_ON_EXEC, OPT_REUSABLE and OPT_THREADSAFE
and limiting our backlog to two. These unintentional changes are relatively
benign; we never make our sockets block, we never exec, we never reuse
sockets and the additional locking overhead should be negligible. The
backlog of two might be a problem in theory, but there haven't been any
reports of issues caused by it.

Things get worse on 2.1.8 - that version introduces several new flags,
one of which is OPT_DISABLED. This disables the new listener by default,
which means that our event loop returns early because it has no active listeners
for any of its events.

Bug: 64543673
Test: Manual.

Change-Id: I9954bc7fe1af761de1a950d935dd2e6ce7e2c5f5
2017-09-13 14:15:57 +01:00
Treehugger Robot
7176951b9b Merge "Fix static analyzer warnings" 2017-09-13 08:34:19 +00:00
Dimitry Ivanov
0d2105bf0b Merge "Recommend using pid instead of tid for gdbclient.py" 2017-09-13 07:41:10 +00:00
George Burgess IV
180e5e7021 Fix static analyzer warnings
The static analyzer was complaining that we were potentially leaking
memory here (in `ASSERT_NE(ptr, nullptr)` after `new (char)`). This
wasn't correct, but it's also not possible for `new` to return nullptr
without std::nothrow.

In any case, swap to direct calls to `::operator new`, since it looks
like this test explicitly wants calls to `::operator new` to be emitted
(which the C++ standard doesn't guarantee for all `new` expressions).

Bug: 27101951
Test: mma; static analyzer warnings are gone. Also ran
memunreachable_test on marlin; no failures.
Change-Id: Ia740e41079f263040da978ba1ccc71c9c39f53fd
2017-09-12 17:01:20 -07:00
Tianjie Xu
e670852a5f Merge "Add the Release function for TemporaryFiles"
am: e9b3a75e6f

Change-Id: Ia655253f41d4f1ea737e9e968c373a214d38f26f
2017-09-12 19:47:21 +00:00
Mark Salyzyn
277eca138b adb: reboot: last boot command default
For reboot [reboot_arg] requests via either reboot or adb reboot,
if reboot_arg is empty then report "shell" or "adb" respectively.

Test: boot_reason_test.sh shell_reboot adb_reboot
Bug: 63736262
Change-Id: Ie613d9e62db6a705885e4e7520aede27af3aa1b9
2017-09-12 12:24:02 -07:00
Tianjie Xu
e9b3a75e6f Merge "Add the Release function for TemporaryFiles" 2017-09-12 19:14:38 +00:00
Tom Cherry
698981df84 Merge "init: fix variable scope issue with ExpandArgs()"
am: 1973110355

Change-Id: I6a257ae81ee2b4a3c128f5d4f4724cf1534670c7
2017-09-12 16:37:34 +00:00
Tom Cherry
1973110355 Merge "init: fix variable scope issue with ExpandArgs()" 2017-09-12 16:31:13 +00:00
Mark Salyzyn
b304f6d4e7 bootstat: introduce sys.boot.reason
Adding functionality to bootstat --record_boot_complete and
--record_boot_reason to initialize sys.boot.reason, the canonical
system boot reason.

Filter out ro.boot.bootreason oem noise into sys.boot.reason.  Add
heuristics to determine what the boot reason is, when otherwise would
be defaulting to the blunt and relatively devoid of detail catch-all
reboot reasons ("reboot", "shutdown", "cold", "warm", "hard").

boot_reason_test.sh is also a compliance test.

Test: boot_reason_test.sh all
Bug: 63736262
Change-Id: Ic9a42cccbcfc89a5c0e081ba66d577a97c8c8c76
2017-09-12 09:28:25 -07:00
dimitry
6429e20494 Recommend using pid instead of tid for gdbclient.py
Using pid allows to examine other threads after gdb
is attached to a crashing process.

Test: make
Change-Id: Ie4bab0925d7abde7f114791848fa5563db245c8e
2017-09-12 10:47:50 +02:00
Tom Cherry
5e405cacb1 init: fix variable scope issue with ExpandArgs()
ExpandArgs() was factored out of Service::Start() to clean up init,
however this introduced a bug: the scope of expanded_args ends when
ExpandArgs() returns, yet pointers to the c strings contained within
those std::strings are returned from the function.  These pointers are
invalid and have been seen to cause failures on real devices.

This change moves the execv() into ExpandArgs() and renames it
ExpandArgsAndExecv() to keep the clean separation of Service::Start()
but fix the variable scope issue.

Bug: 65303004
Test: boot fugu
Change-Id: I612128631f5b58d040bffcbc2220593ad16cd450
2017-09-11 16:08:54 -07:00
Tianjie Xu
f9bc1b0571 Add the Release function for TemporaryFiles
Some tests may create a File* by calling fdopen() on the temp file's
fd. We should release the ownership of fd in this case to avoid the
double close.

Bug: 65430057
Test: libbase unit tests pass
Change-Id: I54fcce2029f9a574f53afdbdda737ee58620c73a
2017-09-11 14:08:32 -07:00
Steven Moreland
359358789a Merge changes from topic "fix-omx-dependencies"
am: 2dac833ea8  -s ours

Change-Id: I65d5872e936362b26984bd8944dcfe8523098deb
2017-09-11 21:03:42 +00:00