Commit graph

22134 commits

Author SHA1 Message Date
David Sehr
0eb24e1bc7 add /data/misc/profman for output
Bug: 28748264
Change-Id: Ib57ccc570de446e03ea8c27ce8e404929138b213
2016-05-31 17:36:41 -07:00
Erik Kline
b927c6c39d Merge "Add /vendor/xbin to the list of directories of executables" into nyc-dev
am: 088f0e7c40

* commit '088f0e7c40a1cc66505f2bd73c54f3bab9908986':
  Add /vendor/xbin to the list of directories of executables

Change-Id: Ia48ba1bdab767ddd146aeb090c2c1a9bbc304e3d
2016-05-30 02:36:41 +00:00
Erik Kline
088f0e7c40 Merge "Add /vendor/xbin to the list of directories of executables" into nyc-dev 2016-05-30 02:31:46 +00:00
TreeHugger Robot
8024f8f9ea Merge "fs_mgr: update block device reference in verity metadata" into nyc-mr1-dev 2016-05-27 23:14:16 +00:00
Yurii Zubrytskyi
998496bc66 [adb] Followup CL to clean up adb_auth_host.cpp
am: 049ebb810f

* commit '049ebb810f466d916ec9e73cdf28624b57a8c25d':
  [adb] Followup CL to clean up adb_auth_host.cpp

Change-Id: Iaf8d2957478529a21edd6d4a502fc7354db40ba4
2016-05-27 19:36:41 +00:00
Yurii Zubrytskyi
204e3fa786 [adb] Issue the "auth" emulator command before any other one
am: a9e2b99a7f

* commit 'a9e2b99a7fdd31bcd6d852c6db26fe592236a24f':
  [adb] Issue the "auth" emulator command before any other one

Change-Id: I27e52100bd933e671adea1e8d03664fce855daaa
2016-05-27 17:38:35 +00:00
Paul Lawrence
4e898a01fd Make file encryption type available
Bug: 28905864
Change-Id: I5f59f824fd92c32ff87aa730dc5c0f250564c0a9
2016-05-27 09:38:29 -07:00
Erik Kline
a5a9c74f20 Add /vendor/xbin to the list of directories of executables
Bug: 28850734
Change-Id: Iaa14a463294d1f8a9c69328a273ce7f12a558bab
2016-05-27 17:37:53 +09:00
Yurii Zubrytskyi
049ebb810f [adb] Followup CL to clean up adb_auth_host.cpp
Get rid of unused includes + replace a fixed-size buffer with an
std::string

Change-Id: I4f9927b900a79a012b5d52908b9d22ac3d2a401c
2016-05-26 18:12:15 -07:00
Yurii Zubrytskyi
a9e2b99a7f [adb] Issue the "auth" emulator command before any other one
Emulator console now requires authentication; this means
'adb emu ...' commands silently fail because of it.
This CL adds an 'auth <token>' command to each user command,
making sure it won't be silently ignored.

Bug: https://code.google.com/p/android/issues/detail?id=211233
Change-Id: Id9ca4999fd2e6393cc88278eaf444243e13c0ec0
2016-05-26 18:11:59 -07:00
Siqi Lin
57de0514f0 Revert "adb: close ep0 on disconnection."
This reverts commit 69e97e4bee.

Bug: 28932120
Change-Id: I5e2569abed316c089886556c432bfe59bca08549
2016-05-26 17:25:32 -07:00
Jeremy Compostella
32cabf25aa fs_mgr: update block device reference in verity metadata
The dm-verity metadata contains the block device path that is given to
the dm-android-verity driver.  If the device is using slot A/B, this
path is missing the slot suffix.

This patch makes fs_mgr replace all the block device path reference
with the one including the active slot suffix.

Change-Id: Ib624d0d18b12a8a287cac7f15605a2e0fb7c97c6
Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>

Bug: 28845874
2016-05-26 15:37:37 -07:00
Elliott Hughes
b598abf175 resolve merge conflicts of f0d4f38 to nyc-dev
am: 1265fd4934

* commit '1265fd493471b6e94cc4e9853d9307d7fde2fe98':
  Fix scanf %s in lsof.

Change-Id: I2e581b2dae519f77399a149d3de3c710cf629d29
2016-05-25 05:01:17 +00:00
Elliott Hughes
1265fd4934 resolve merge conflicts of f0d4f38 to nyc-dev
Change-Id: Ibce10a3c66560c10c67bd51f5b568552f43825f2
2016-05-24 17:22:51 -07:00
Elliott Hughes
f0d4f38773 resolve merge conflicts of 7f5da85 to lmp-dev am: de529e72b6 am: 1a98776aee am: ad0c2bf5f3 am: a17f2802b1 am: 20b1e79563 am: c443a447b2
am: 5538f8bb63

* commit '5538f8bb63c79d1b9de6e809e085bd78b1027f9c':
  Fix scanf %s in lsof.

Change-Id: I09d37fb2798e6038bb00fb8e210b9d3c5348a4e4
2016-05-24 23:11:36 +00:00
Elliott Hughes
5538f8bb63 resolve merge conflicts of 7f5da85 to lmp-dev am: de529e72b6 am: 1a98776aee am: ad0c2bf5f3 am: a17f2802b1 am: 20b1e79563
am: c443a447b2

* commit 'c443a447b2f6e950b03fe472c5f7cb6c54e9ba61':
  Fix scanf %s in lsof.

Change-Id: Ia66e81641532cf7bca669fb52095aeca90158807
2016-05-24 23:08:36 +00:00
Elliott Hughes
c443a447b2 resolve merge conflicts of 7f5da85 to lmp-dev am: de529e72b6 am: 1a98776aee am: ad0c2bf5f3 am: a17f2802b1
am: 20b1e79563

* commit '20b1e795637686d3a18c79413cccbba16881e295':
  Fix scanf %s in lsof.

Change-Id: Ic63528dee82e3045020b527c093b9b4fffaf5530
2016-05-24 23:05:55 +00:00
Elliott Hughes
20b1e79563 resolve merge conflicts of 7f5da85 to lmp-dev am: de529e72b6 am: 1a98776aee am: ad0c2bf5f3
am: a17f2802b1

* commit 'a17f2802b153b2ee361fea9a6cc37da0613a2e55':
  Fix scanf %s in lsof.

Change-Id: I088944d9c376de58705698bfe7d417a10c708909
2016-05-24 23:02:26 +00:00
Elliott Hughes
a17f2802b1 resolve merge conflicts of 7f5da85 to lmp-dev am: de529e72b6 am: 1a98776aee
am: ad0c2bf5f3

* commit 'ad0c2bf5f345a4cdb53a3e4f690db842e8df1685':
  Fix scanf %s in lsof.

Change-Id: I51f630de4cb5ce667ac856a1848206c368816aea
2016-05-24 22:59:18 +00:00
Elliott Hughes
ad0c2bf5f3 resolve merge conflicts of 7f5da85 to lmp-dev am: de529e72b6
am: 1a98776aee

* commit '1a98776aee4d02c33d922bbbe3ffdd54099840a9':
  Fix scanf %s in lsof.

Change-Id: I1af0d93d03631f257b1372a08aad158508f652ea
2016-05-24 22:56:38 +00:00
Elliott Hughes
1a98776aee resolve merge conflicts of 7f5da85 to lmp-dev
am: de529e72b6

* commit 'de529e72b63c135053711ceb27a043f8d80e308c':
  Fix scanf %s in lsof.

Change-Id: I4dc617bbe052059b04296e4213fb778fbf3cf8eb
2016-05-24 22:53:55 +00:00
Elliott Hughes
de529e72b6 resolve merge conflicts of 7f5da85 to lmp-dev
Change-Id: I7a7547426a229ac99d187ec8bfabd49c4da51907
2016-05-24 15:23:48 -07:00
Elliott Hughes
7f5da85015 Fix scanf %s in lsof. am: 008efb756f
am: 491dfb11b7

* commit '491dfb11b762f44dc9848496d5d30514082aab64':
  Fix scanf %s in lsof.

Change-Id: Ife17fa56f125dfec08d0d4b0c5c368bdae51106e
2016-05-24 22:13:03 +00:00
Elliott Hughes
491dfb11b7 Fix scanf %s in lsof.
am: 008efb756f

* commit '008efb756fea8a9e66a1825b546e9dc392c72bec':
  Fix scanf %s in lsof.

Change-Id: I608ae2094649617308b45571df1b649724ec8ac3
2016-05-24 22:10:19 +00:00
Dimitry Ivanov
10743a9db6 Merge "Remove target_sdk_version parameter" into nyc-dev
am: 07f46c84e6

* commit '07f46c84e614e2635e8072403dce8f17cc9285ba':
  Remove target_sdk_version parameter

Change-Id: I45ac4ab30053c03e40195dd2f768321b3c1145c1
2016-05-24 17:24:20 +00:00
Calin Juravle
9812105b20 Add utility to prepare files in a similar way to directories
Bug: 28785119
Bug: 28625993
Change-Id: I505eb4deca0a89f64fe4505dd6729fe6a48bc1aa
2016-05-24 18:19:12 +01:00
TreeHugger Robot
07f46c84e6 Merge "Remove target_sdk_version parameter" into nyc-dev 2016-05-24 16:59:12 +00:00
Dimitry Ivanov
94ee4e690d Remove target_sdk_version parameter
Since linker-namespaces are enabled for all target_sdk_versions
and there is no longer need in workarounds in libnativeloader -
remove unused target_sdk_version parameter for internal calls.

This also brings libnativeloader closer to aosp/master

Bug: http://b/26040253
Change-Id: I7d6f6ac31be0dca5f3c3f6ea20e6cc87ce3a3c7f
2016-05-24 08:40:38 -07:00
Hans Boehm
4541e93d32 Merge "Fix SharedBuffer. Remove aref." into nyc-dev
am: 5668b84f99

* commit '5668b84f99e3fc467721b45184aedca70f8e6da4':
  Fix SharedBuffer. Remove aref.

Change-Id: Ia97d225bf3ff5ee2f0a430f00f03b442ff67562e
2016-05-24 04:14:31 +00:00
Hans Boehm
5668b84f99 Merge "Fix SharedBuffer. Remove aref." into nyc-dev 2016-05-24 04:10:29 +00:00
Yabin Cui
11b07091c6 Merge "adb: close ep0 on disconnection." into nyc-dev
am: fcab9a8507

* commit 'fcab9a85076c83e5b6808935db0f89e4f10dda87':
  adb: close ep0 on disconnection.

Change-Id: I1aa7606356efa5c927c242dcd9325d89a11388e0
2016-05-24 00:24:25 +00:00
Yabin Cui
fcab9a8507 Merge "adb: close ep0 on disconnection." into nyc-dev 2016-05-24 00:15:27 +00:00
Srinath Sridharan
87a4f046f0 Merge "Only apply schedTune boost to top-app tasks" into nyc-mr1-dev 2016-05-24 00:00:06 +00:00
Srinath Sridharan
1339871138 Only apply schedTune boost to top-app tasks
When using EAS, the foreground tasks were all getting boosted
during touchboosts. Limit it to top-app tasks.


BUG: 28378389
Change-Id: I72b7158a614bfd9b6c61024774e408ceba61fc9c
2016-05-23 23:59:38 +00:00
Hans Boehm
54828dc739 Fix SharedBuffer. Remove aref.
Add comment that SharedBuffer is deprecated.

Both aref and SharedBuffer had memory ordering bugs.  Aref has no
clients.

SharedBuffer had several bugs, which are fixed here:

mRefs was declared neither volatile, not atomic, allowing the
compiler to, for example, reuse a stale previously loaded value.

It used the default android_atomic release memory ordering, which
is insufficient for reference count decrements.

It used an ordinary memory read in onlyOwner() to check whether
an object is safe to deallocate, without any attempt to ensure
memory ordering.

Comments claimed that SharedBuffer was exactly 16 bytes, but
this was neither checked, nor correct on 64-bit platforms.

This turns mRef into a std::atomic and removes the android_atomic
dependency.

Bug: 28826227
Change-Id: I39fa0b4f70ac0471b14ad274806fc4e0c0802e78
(cherry picked from commit 3e4c076ef2)
2016-05-23 15:19:53 -07:00
Hans Boehm
bc2a2284e4 Fix memory order and race bugs in Refbase.h & RefBase.cpp
am: 70a46d674a

* commit '70a46d674a04e95da633a5914abd7a55a46e2b3e':
  Fix memory order and race bugs in Refbase.h & RefBase.cpp

Change-Id: I3562b8b9d12d2f26d80a389292eef760ad0919f3
2016-05-20 00:54:27 +00:00
Hans Boehm
70a46d674a Fix memory order and race bugs in Refbase.h & RefBase.cpp
Convert to use std::atomic directly.

Consistently use relaxed ordering for increments, release ordering
for decrements, and an added acquire fence when the count goes to
zero.

Fix what looks like another race in attemptIncStrong:
It seems entirely possible that the final adjustment for
INITIAL_STRONG_VALUE would see e.g. INITIAL_STRONG_VALUE + 1,
since we could be running in the middle of another initial
increment.

Attempt to somewhat document what this actually does, and
what's expected from the client. Hide the documentation in
the .cpp file for now.

Remove a confusing redundant test in decWeak. OBJECT_LIFETIME_STRONG
and OBJECT_LIFETIME_WEAK are the only options, in spite of some
of the original comments.

It's conceivable that either of these issues has resulted in
actual crashes, though I would guess the probability is small.
It's hard enough to reason about this code without the bugs.

Bug: 28705989
Change-Id: I4107a56c3fc0fdb7ee17fc8a8f0dd7fb128af9d8
(cherry picked from commit e263e6c633)
2016-05-19 16:18:26 -07:00
Josh Gao
dc3d0b7175 Merge changes I40a11748,I5e56f17f,Ie3748b6c,I4e1d56a8 into nyc-dev
am: d4af0d64de

* commit 'd4af0d64de042b0425bbae1f91d1720eebcf95a3':
  adb: use asocket's close function when closing.
  adb: switch the socket list mutex to a recursive_mutex.
  adb: clang-format sockets.cpp.
  adb: add implementations of mutex, recursive_mutex.

Change-Id: Ibb251966874a73e7ad745531ebad7b56c9c82e0d
2016-05-19 19:50:30 +00:00
Josh Gao
d4af0d64de Merge changes I40a11748,I5e56f17f,Ie3748b6c,I4e1d56a8 into nyc-dev
* changes:
  adb: use asocket's close function when closing.
  adb: switch the socket list mutex to a recursive_mutex.
  adb: clang-format sockets.cpp.
  adb: add implementations of mutex, recursive_mutex.
2016-05-19 19:36:36 +00:00
Elliott Hughes
3e2f31f1e6 Remove a dead header (<netutils/dhcp.h>).
am: 847d963598

* commit '847d9635980d2343a47bf31519055fb2bbdddc32':
  Remove a dead header (<netutils/dhcp.h>).

Change-Id: I3f452861c4e379b7a7f750d4e2b8107ee0abdcb1
2016-05-19 04:23:29 +00:00
Josh Gao
014b01706c adb: use asocket's close function when closing.
close_all_sockets was assuming that all registered local sockets used
local_socket_close as their close function. However, this is not true
for JDWP sockets.

Bug: http://b/28347842
Change-Id: I40a1174845cd33f15f30ce70828a7081cd5a087e
(cherry picked from commit 53eb31d87c)
2016-05-18 17:20:30 -07:00
Josh Gao
268068f256 adb: switch the socket list mutex to a recursive_mutex.
sockets.cpp was branching on whether a socket close function was
local_socket_close in order to avoid a potential deadlock if the socket
list lock was held while closing a peer socket.

Bug: http://b/28347842
Change-Id: I5e56f17fa54275284787f0f1dc150d1960256ab3
(cherry picked from commit 9b587dec6d)
2016-05-18 17:20:30 -07:00
Josh Gao
63760409ad adb: clang-format sockets.cpp.
Bug: http://b/28347842
Change-Id: Ie3748b6c803d4e8056e9d7abd065a8b99d945a5b
(cherry picked from commit 52bd8526aa)
2016-05-18 17:20:30 -07:00
Josh Gao
6e106990cf adb: add implementations of mutex, recursive_mutex.
Our version of mingw doesn't support std::mutex or
std::recursive_mutex, so implement our own using the Windows primitives.

Bug: http://b/28347842
Change-Id: I4e1d56a89bc5fcb5f859bf5014343697a4a85b77
(cherry picked from commit 903b749f78)
2016-05-18 17:20:30 -07:00
Elliott Hughes
847d963598 Remove a dead header (<netutils/dhcp.h>).
9c07eb9dd8 removed the implementation, but
missed the header file.

Bug: http://b/27192644
Change-Id: I809a3eb0081b05783b70dbca0274cdde6b1b31a6
2016-05-18 14:22:15 -07:00
Dimitry Ivanov
b4029f1936 Set parent namespace for linker-namespaces
am: ade364b456

* commit 'ade364b4566212a0c16920443a84aa85ac31f781':
  Set parent namespace for linker-namespaces

Change-Id: I07b56584398c43d949bfaa8931074da140a0e071
2016-05-18 07:40:06 +00:00
Dimitry Ivanov
ade364b456 Set parent namespace for linker-namespaces
This change allows applications to share RTLD_GLOBAL
native libraries between namespaces associated with
different classloaders.

The rule is - if a library is GLOBAL within namespace
associated with parent classloader, it is shared
with namespace associated with this classloader

Note that the sharing happens on create_namespace
event, which is tied to createClassloader in case of
application classloaders created by the framework, for
custom application classloaders it is tied to first
loadLibrary() event.

Bug: http://b/28560538
Bug: https://code.google.com/p/android/issues/detail?id=208458
Change-Id: I7ee701166f8ec5eff033b7acc0f80c7aa4ec5bda
(cherry picked from commit 24db75c1ce)
2016-05-17 15:58:56 -07:00
Ruchi Kandoi
8b38bcc915 healthd: Check if battery device exists instead of charger drivers before setting fake properties. am: 9cb3d3ccf4 am: f2ca669e80
am: 6e394f0f6c

* commit '6e394f0f6c693e6f05def66d0427abd385b3f798':
  healthd: Check if battery device exists instead of charger drivers before setting fake properties.

Change-Id: Iea48fb20a7f07c7b9cb212cafd00147f07021ae2
2016-05-17 18:42:29 +00:00
Ruchi Kandoi
6e394f0f6c healthd: Check if battery device exists instead of charger drivers before setting fake properties. am: 9cb3d3ccf4
am: f2ca669e80

* commit 'f2ca669e80078254ad3aceac800161b3266d3195':
  healthd: Check if battery device exists instead of charger drivers before setting fake properties.

Change-Id: I8115836dbd81264634dd7ab84bc360ac610a030b
2016-05-17 18:23:04 +00:00
Ruchi Kandoi
f2ca669e80 healthd: Check if battery device exists instead of charger drivers before setting fake properties.
am: 9cb3d3ccf4

* commit '9cb3d3ccf49bf0fd484563fbf611c68789d5b8a9':
  healthd: Check if battery device exists instead of charger drivers before setting fake properties.

Change-Id: I521f7a7d097da915e40a273d73a655aa01ea397e
2016-05-17 18:20:14 +00:00