Commit graph

22032 commits

Author SHA1 Message Date
Josh Gao
fb9747c411 DO NOT MERGE: adb: use asocket\\\\'s close function when closing. am: 5218ad36ad am: d7e24ec999 am: a3d96cfec9 -s ours
am: 45a4bca09d  -s ours

Change-Id: I2124ed25893de9910be435ba68619dfc00e66239
2016-06-22 18:11:44 +00:00
Josh Gao
f5592e174e DO NOT MERGE: adb: use asocket\\\\'s close function when closing. am: 83cb3032d2 -s ours am: 420aa30c9f am: 05d5db2534
am: 8ec6f5b46f  -s ours

Change-Id: If7256035b8844a6567080b5caf769a0a4f567d2f
2016-06-22 18:11:17 +00:00
Josh Gao
45a4bca09d DO NOT MERGE: adb: use asocket\\\'s close function when closing. am: 5218ad36ad am: d7e24ec999
am: a3d96cfec9  -s ours

Change-Id: I4ca0f2890519c3450a15edab989ca424b6bb10ae
2016-06-22 18:07:24 +00:00
Josh Gao
8ec6f5b46f DO NOT MERGE: adb: use asocket\\\'s close function when closing. am: 83cb3032d2 -s ours am: 420aa30c9f
am: 05d5db2534

Change-Id: I433e885416a6cbf93bc701cfebc046f78a7af7dd
2016-06-22 18:07:06 +00:00
Josh Gao
a3d96cfec9 DO NOT MERGE: adb: use asocket\\'s close function when closing. am: 5218ad36ad
am: d7e24ec999

Change-Id: I9ca9e7e857de9e9679169cd7239f9e54a3d98dd2
2016-06-22 18:02:25 +00:00
Josh Gao
05d5db2534 DO NOT MERGE: adb: use asocket\\'s close function when closing. am: 83cb3032d2 -s ours
am: 420aa30c9f

Change-Id: I779b0b79ce268561f4a686d6e98c131707464ecf
2016-06-22 18:01:40 +00:00
Josh Gao
d7e24ec999 DO NOT MERGE: adb: use asocket\'s close function when closing.
am: 5218ad36ad

Change-Id: Ibc9ee3b566d34847f4e1e02413890449750ba2f5
2016-06-22 17:59:18 +00:00
Josh Gao
420aa30c9f DO NOT MERGE: adb: use asocket\'s close function when closing.
am: 83cb3032d2  -s ours

Change-Id: I357c754fe2bc3fdf4f050c26aace2bea4c6569c2
2016-06-22 17:58:51 +00:00
Christopher Ferris
3394cd7c3c Merge "Add support to indicate bitness of public library." into nyc-mr1-dev 2016-06-22 17:56:50 +00:00
Josh Gao
83cb3032d2 DO NOT MERGE: 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.

Backport of 53eb31d8 and 9b587de.

Bug: http://b/28347842
Change-Id: I05e071b3d5c7e55c7a59400c5c9bb0635eeef29f
2016-06-21 16:28:29 -07:00
Josh Gao
5218ad36ad DO NOT MERGE: 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.

Backport of 53eb31d8 and 9b587de.

Bug: http://b/28347842
Change-Id: I13ec6fd87a0691c72608baf6038adcc0f03dca9f
2016-06-21 16:28:21 -07:00
Christopher Ferris
6664a805ca Add support to indicate bitness of public library.
For public vendor libraries, a vendor might have only a 32 bit
or only a 64 bit version of the library. Add a way to indicate this
in the public.libraries.txt files. The new format is:

  library.so 32

This indicates that this is a 32 bit only public library.

  library.so 64

This indicates that this is a 64 bit only public library.

Bug: 29370721
Bug: 29512261
Change-Id: I26b14893d104a9e1f62914663d8c972cd4d55e1e
2016-06-21 16:11:23 -07:00
Courtney Goeltzenleuchter
bf8132a7c1 Add color mode enums
The android_color_mode_t defines the color modes supported
by a display. A display can support multiple different
color modes.

sRGB mode and AdobeRGB are deliberately placed at 7 and 8
so that they match mode ID's used on prior devices.

bug: http://b/27926012
Change-Id: I9ab41b56ec0b495c02539665da5be158ffddf843
2016-06-21 14:47:23 -06:00
Josh Gao
9150b1288e adb: fix fd double close, Subprocess lifetime issue.
am: 69d2f98197

Change-Id: I7797d5dee022bfdd6f165221340095f7836eea99
2016-06-20 23:48:01 +00:00
Josh Gao
69d2f98197 adb: fix fd double close, Subprocess lifetime issue.
This commit fixes two somewhat related issues in shell_service.

  - The fd returned by StartSubprocess is owned by a unique_fd
    contained in the Subprocess object, but also gets closed by the
    caller. Resolve this by duping the returned file descriptor.

  - A Subprocess object can be destroyed immediately after its initial
    construction in StartSubprocess if we're sufficiently unlucky.
    Split up the fork/exec and "start management thread" steps, so that
    we can safely do everything we need to do on the Subprocess before
    handing it over to the thread that'll eventually destroy it.

Also includes squashed patches from AOSP master that allow for use of
unique_fd inside adb.

Bug: http://b/29254462
Change-Id: Id9cf0b7e7a7293bee7176919edc758597691c636
(cherry picked from commit c0e6e40cc9)
(cherry picked from commit 54c72aaccc)
(cherry picked from commit 2c5d1d7cd9)
(cherry picked from commit 2a7b86337f)
(cherry picked from commit 13ea01db45)
(cherry picked from commit 344778da41)
2016-06-20 14:51:05 -07:00
Sami Tolvanen
9af867e7bd fs_mgr_verity: fix verity_update_state for A/B devices
Use the correct device name when system is mounted as root, and
validate dm-verity status to avoid confusing it with dm-linear.

Bug: 29277442
Change-Id: I36e115189f9a9430bad4bf89f26a376bcb8e8168
2016-06-17 17:17:04 -07:00
Alex Light
d9ff210e63 Fix issue where non-AB-ota devices will cause flashall to fail.
We now check that a device has slots before trying to get the name of
any of them.

Bug: 29278988

Change-Id: I50f3596e467afae20177ce4e458e697435223c51
2016-06-16 15:22:22 -07:00
Ruchi Kandoi
13cf49d8eb Merge \"logd: logcat -L takes longer causing vold to timeout.\" into nyc-dev
am: b02819e2af

Change-Id: I0c0fe46e74bfa4e3461454d62b14f98a4f71be96
2016-06-16 17:57:48 +00:00
Ruchi Kandoi
b02819e2af Merge "logd: logcat -L takes longer causing vold to timeout." into nyc-dev 2016-06-16 17:44:30 +00:00
TreeHugger Robot
a3ffde1402 Merge "Make fastboot flash 'B' partitions automatically." into nyc-mr1-dev 2016-06-15 23:09:26 +00:00
Alex Light
6c60ea8c45 Make fastboot flash 'B' partitions automatically.
Also add ability to specify --slot active to suppress this behavior.

Bug: 29278988

Change-Id: I3ff184be74f9e2d1cb3abc80bd206b4b9faf8a35
2016-06-15 14:42:22 -07:00
Sami Tolvanen
998f50749e Revert \"logd: enforce policy integrity\"
am: a742d10277

Change-Id: Idb721b2ff7a57643b671b3d87cb09bb96f1ad465
2016-06-14 22:28:26 +00:00
Ruchi Kandoi
c1b26acae2 logd: logcat -L takes longer causing vold to timeout.
Temporary fix to prevent device from getting stuck at boot.

Bug: 28788401
Change-Id: Ie4246fc3c9eb7a3af2cb909546811c85997515da
Signed-off-by: Ruchi Kandoi <kandoiruchi@google.com>
2016-06-14 15:26:30 -07:00
Dan Stoza
c873d44942 Merge "add android_flex_layout for describing all flexible formats." into nyc-mr1-dev 2016-06-14 19:59:38 +00:00
Sami Tolvanen
a742d10277 Revert "logd: enforce policy integrity"
This reverts commit 0bdad0f231.

Bug: 26902605
Change-Id: I6ce8fa7bef63c45821628265c379970eb64963a2
2016-06-14 11:14:51 -07:00
Daniel Micay
d4421f1962 add a property for controlling perf_event_paranoid
This adds a system property for controlling unprivileged access to
perf_event_paranoid. It depends on adding kernel support for
perf_event_paranoid=3 based on grsecurity's PERF_HARDEN feature to
completely disable unprivileged access to perf. A minimal port of this
feature is used in the vanilla Debian kernel by default.

It hides the non-hardened value as an implementation detail, since while
it is currently 1, it will probably become 2 in the future.

(Cherry picked from commit 2b22a66382)

Bug: 29054680

Change-Id: I6e3ae3cf18d8c76df94f879c34fb6fde519b89a9
2016-06-12 21:20:46 +00:00
Pablo Ceballos
0398ec6326 Merge "Header changes for getFrameTimestamps" into nyc-mr1-dev 2016-06-09 21:10:16 +00:00
Felipe Leme
542fc21d29 Merge \"Redirect bugreport stderr to host\'s stderr.\" into nyc-dev
am: 6d349051ce

Change-Id: I78041cfac6374eb5f2e0ec3478703f7cb03d8623
2016-06-08 23:41:23 +00:00
TreeHugger Robot
6d349051ce Merge "Redirect bugreport stderr to host's stderr." into nyc-dev 2016-06-08 23:35:12 +00:00
Felipe Leme
d1dd125bc2 Redirect bugreport stderr to host's stderr.
Change-Id: I46f474f0b0d5cacdc4b129eab1bb0a7f52ccece0
Fixes: 29161586
2016-06-08 11:09:34 -07:00
Elliott Hughes
2e579ca920 Allow multiple (sequential) adb users on Linux.
am: 75f42d7ea7

Change-Id: I5567c186e9b855ad10d678ac4e212f6948960a08
2016-06-08 17:09:06 +00:00
Elliott Hughes
75f42d7ea7 Allow multiple (sequential) adb users on Linux.
Before this, adb will fail to start for the second user who tries because
/tmp/adb.log already exists and isn't writable by the second user.

Also allow $TMPDIR to override the use of /tmp.

Bug: http://b/29201686
Bug: https://code.google.com/p/android/issues/detail?id=211420

(cherry picked from commit d89a6c2285)

Change-Id: Ibb1369e8043feb9774593e317dcd7bb93323fd89
2016-06-08 08:36:19 -07:00
Sami Tolvanen
d6f5af35d5 Merge "fs_mgr: validate corrected signatures" into nyc-dev
am: eacbb824c9

* commit 'eacbb824c9ee2ccec9e1de641d03e7370888eabc':
  fs_mgr: validate corrected signatures

Change-Id: I3986a59d498a22769611216f5ed475f31332b2c9
2016-06-07 00:05:41 +00:00
Sami Tolvanen
eacbb824c9 Merge "fs_mgr: validate corrected signatures" into nyc-dev 2016-06-07 00:01:56 +00:00
Tao Bao
f9b7f7fdba Merge "Create /data/ota_package for OTA packages." into nyc-mr1-dev 2016-06-06 23:43:29 +00:00
David Pursell
f6d0da2b69 adbd: properly close subprocess pipes on Ctrl+C.
am: a6d5661140

* commit 'a6d56611404f2e1c0c9f4ab7c8471af0e80b2026':
  adbd: properly close subprocess pipes on Ctrl+C.

Change-Id: I96c1fb2036a58702b23f606bb1e6a27f924324eb
2016-06-06 23:18:58 +00:00
Sami Tolvanen
830126637a fs_mgr: validate corrected signatures
If signature verification fails and we have an error corrected
signature available, attempt to verify that instead.

Needs changes from
  Ie913c21ba1d07d6df4c6feeb7226b2ec963f4d19

Bug: 28943429
Change-Id: I7d48701916fe430b17aa05acb120f22a1802733d
2016-06-06 13:54:00 -07:00
David Pursell
a6d5661140 adbd: properly close subprocess pipes on Ctrl+C.
When non-interactive sessions exit via Ctrl+C, adbd sends SIGHUP
to the child process to let it know to exit. However, adbd was not
closing the pipes to the child process, so if the subprocess ignored
SIGHUP and continued writing it could fill up the pipe and block
forever while adbd waits for it to exit.

This CL adds the necessary calls to close the subprocess pipe after
sending SIGHUP.

Bug: 28981563
Change-Id: I318e322e563241052648361172f4859c297837fb
(cherry picked from commit f2aa186c7b)
2016-06-06 12:56:52 -07:00
Pablo Ceballos
c2efc32a0f Header changes for getFrameTimestamps
Change-Id: Iee9e0485544fac435e800ea869a8e4c2ed90bba9
2016-06-04 03:36:40 +00:00
Tao Bao
380d6b1b4d Create /data/ota_package for OTA packages.
We will store OTA packages there for both A/B and non-A/B OTAs. The
directory will be accessed by GMSCore (for both), uncrypt (non-A/B),
update_engine (A/B), update_verifier (A/B) and possibly system server
(for non-A/B OTAs to clean up half-way uncrypt'd packages).

Bug: 28944800
Change-Id: I5aa8156ec5052bd15dfadd4d8c28925d464e4401
2016-06-03 13:11:29 -07:00
Siqi Lin
e780adf0fe Revert "adb: close ep0 on disconnection."
am: 8c4076295e

* commit '8c4076295ebd867d276636d673b9f8e6a8df01a6':
  Revert "adb: close ep0 on disconnection."

Change-Id: I5b2e4b0aca3547a8cb69e8792e6599f2c79c631b
2016-06-03 04:46:23 +00:00
Lajos Molnar
276f382722 add android_flex_layout for describing all flexible formats.
Bug: 22767098
Bug: 24759202
Change-Id: I61e4ca9bd71e8da88a9571ec4effc7165026715b
2016-06-03 00:59:30 +00:00
Siqi Lin
8c4076295e Revert "adb: close ep0 on disconnection."
This reverts commit 69e97e4bee.

Bug: 28932120
Change-Id: I5e2569abed316c089886556c432bfe59bca08549
(cherry picked from commit 57de0514f0)
2016-06-02 17:30:43 -07:00
Calin Juravle
3a8434bf73 Merge "Add utility to prepare files in a similar way to directories" into nyc-dev
am: 6a29fe931d

* commit '6a29fe931d9fd3bf7f2aad3713dc70c080970763':
  Add utility to prepare files in a similar way to directories

Change-Id: I7516ecd90c2ba9025e58af184e83b61b5cad9341
2016-06-02 10:24:40 +00:00
Calin Juravle
6a29fe931d Merge "Add utility to prepare files in a similar way to directories" into nyc-dev 2016-06-02 10:10:37 +00:00
Daniel Micay
52ebee9865 add a property for controlling perf_event_paranoid
am: fe01f56c0d

* commit 'fe01f56c0d5c42508e1e82f5976e4c10bb00f632':
  add a property for controlling perf_event_paranoid

Change-Id: I1059ecb2c1d1aba95cd3c93f208ae7ca904cf95e
2016-06-02 02:05:20 +00:00
Daniel Micay
fe01f56c0d add a property for controlling perf_event_paranoid
(Cherry picked from commit 2b22a66382)

This adds a system property for controlling unprivileged access to
perf_event_paranoid. It depends on adding kernel support for
perf_event_paranoid=3 based on grsecurity's PERF_HARDEN feature to
completely disable unprivileged access to perf. A minimal port of this
feature is used in the vanilla Debian kernel by default.

It hides the non-hardened value as an implementation detail, since while
it is currently 1, it will probably become 2 in the future.

Bug: 29054680

Change-Id: I6e3ae3cf18d8c76df94f879c34fb6fde519b89a9
2016-06-01 16:58:48 -07:00
David Sehr
cdc503c13b add /data/misc/profman for output
am: 0eb24e1bc7

* commit '0eb24e1bc7317eb5764567223cdd9405d16aefa7':
  add /data/misc/profman for output

Change-Id: I8d8ebc0dc37aee1ac54f8e50e374cad77a6fe77a
2016-06-01 14:01:10 +00:00
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