Commit graph

35899 commits

Author SHA1 Message Date
Josh Gao
da20ef4684 Merge changes I0ed00441,I12d46493,Ib484f701 am: 0a01830612
am: 1425641300

Change-Id: I6fbd5287542ee758c6a15fff544b12bac8205eb4
2017-09-14 20:37:14 +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
07f2b44588 Merge "Update shell and utilities docs for O." am: 1ca9852366
am: 80c5a9bb77

Change-Id: I5126dfd3de3c636f67eb003d47b6fc7b5021a8c9
2017-09-14 19:31:37 +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
ad458ebcd6 Merge "tombstoned: Fix calls to evconnlistener_new." am: e997ba9d22
am: 17785d2030

Change-Id: I6193a241c5ed48064e1d22f84c4c47457e0e1c5c
2017-09-14 08:39:34 +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
Narayan Kamath
e997ba9d22 Merge "tombstoned: Fix calls to evconnlistener_new." 2017-09-14 08:33:49 +00:00
Josh Gao
1987fb6f7c Merge "debuggerd_fallback: print maps." am: 26123d7ec0
am: 4abd463d20

Change-Id: Ic0ee23fcaa51aa1ceeef0da9df013033ff2acd37
2017-09-14 05:59:13 +00:00
Josh Gao
4abd463d20 Merge "debuggerd_fallback: print maps."
am: 26123d7ec0

Change-Id: I122af30e6f3e205308a44ebf9bdbc7128ce3f246
2017-09-14 05:56:46 +00:00
Justin Yun
347685b77d Merge "Mark libmemtrack as VNDK in Android.bp" am: 0978f02468
am: 5dd33fe086

Change-Id: Id5f5553d9f94d0d3ae446fb888bd65085dd1d623
2017-09-14 05:54:15 +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
a915e99e04 Merge "Add "operator bool" overload to android::sp." am: 28ebfe18fb
am: 56c22732c6

Change-Id: I0068bb0fee78b62abe97175b2594b579b6fc8f81
2017-09-13 23:14:06 +00:00
Mark Salyzyn
7a5c52f78f Merge changes from topic "b/63736262" am: 1f666a6be9
am: 6818f80dbb

Change-Id: Ibd9aaaab96fa60ee6f9d00baea0483a2cd328048
2017-09-13 23:13:12 +00:00
George Burgess IV
7f7d002bb1 Merge "Fix static analyzer warnings" am: 7176951b9b
am: 34abe0cf5c

Change-Id: I1472b8624576dd8790b3d975b338c6597b4dd553
2017-09-13 23:12:20 +00:00
Dimitry Ivanov
3d3ede7249 Merge "Recommend using pid instead of tid for gdbclient.py" am: 0d2105bf0b
am: d56fee7686

Change-Id: Ic38ecf92432566bebc4a4b6f1901a5cf06de768a
2017-09-13 23:11:54 +00: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
5e539a977b Merge "Add the Release function for TemporaryFiles" am: e9b3a75e6f
am: e670852a5f

Change-Id: Ia12cdc7b8a1abfa77c41b92907dc41619e06153e
2017-09-12 19:50:24 +00: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
7954cc1324 Merge "init: fix variable scope issue with ExpandArgs()" am: 1973110355
am: 698981df84

Change-Id: I02cad02e47b87e7560596545b597d3cbb93dc390
2017-09-12 16:40:24 +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
Steven Moreland
67525dde9c Merge changes from topic "fix-omx-dependencies" am: 2dac833ea8 -s ours
am: 359358789a  -s ours

Change-Id: I776dc849262326097cd031d95470981619164916
2017-09-11 21:21:27 +00:00
Steven Moreland
633f008499 Add vendor_available to liblog_headers. am: 25db8dc21b -s ours
am: 9fbdd4c63c  -s ours

Change-Id: Ibc3609c95d76dbd35aca521aa333e8260eda54c9
2017-09-11 21:13:51 +00:00
Yifan Hong
5929a589f3 Add sys/cdefs.h to log/log_main.h. am: e2c51809f7
am: 25a9baa280

Change-Id: I3a90fb0cbbbcd637e9700fd3f825bf693c27561e
2017-09-11 21:13:36 +00:00
Jin Qian
6fcabd14ca Merge "fs_mgr: replace make_ext4 api with e2fsprogs" am: ff9c7c5e3e
am: 76fd6f6cf1

Change-Id: Ie068ba3db08b8b3ecc3a2f6ea8c14f17ec2a4390
2017-09-11 21:11:21 +00:00