Commit Graph

26312 Commits

Author SHA1 Message Date
Steven Moreland b394786624 Merge "Update for hidlized hwservicemanager." am: 480af3f633
am: 82c67f5662

Change-Id: If478e3fc58a44e69f731bc82f173bf9bd10a5f91
2016-11-02 22:27:34 +00:00
Steven Moreland 82c67f5662 Merge "Update for hidlized hwservicemanager."
am: 480af3f633

Change-Id: I2c11b0249ab77e9dc22a76f6aa66026ebf3ed00d
2016-11-02 22:23:56 +00:00
Treehugger Robot 480af3f633 Merge "Update for hidlized hwservicemanager." 2016-11-02 22:17:25 +00:00
Nick Kralevich c21169c59f give zygote AID_READPROC
In zygote wrapping mode, ZygoteConnection does a check to see if the pid
reported by the wrapped process is either child process that was
forked, or a decendent of it. This requires read access to other
processes /proc files. Grant zygote AID_READPROC to allow this access.

Bug: 32610632
Test: manual inspection of /proc files to verify group.
Test: manual inspection of zygote's children to make sure they do not
      inherit AID_READPROC

Change-Id: I3619a9ae33c8077e068e8024f7c7d44cfca6fb76
2016-11-02 13:48:32 -07:00
Steven Moreland ba825ac33f Update for hidlized hwservicemanager.
Bug: 32313592
Test: end to end
Change-Id: I76a7ee01413b28e95e9f19fcde90f6372502ec67
2016-11-02 13:29:34 -07:00
Dimitry Ivanov 011074f0da Merge "Return nullptr from FindNamespaceByClassLoader for NB-enabled apps." am: c54c533cf6
am: b870bbd69a

Change-Id: I15d9d46071941e871e332ae5ab83fc4a3b73042c
2016-11-02 16:09:47 +00:00
Dimitry Ivanov b870bbd69a Merge "Return nullptr from FindNamespaceByClassLoader for NB-enabled apps."
am: c54c533cf6

Change-Id: If1801f74a0a55e3cb526f1f00566d119d14da92a
2016-11-02 16:06:49 +00:00
Treehugger Robot c54c533cf6 Merge "Return nullptr from FindNamespaceByClassLoader for NB-enabled apps." 2016-11-02 16:00:45 +00:00
Jorge Lucangeli Obes 5794ea38f4 Merge "init: Add support for ambient capabilities." am: 043bc971f2
am: c406474c54

Change-Id: Ic10ad2ddc2e416eff46b5a43f517a1409e273c34
2016-11-02 15:55:57 +00:00
Jorge Lucangeli Obes c406474c54 Merge "init: Add support for ambient capabilities."
am: 043bc971f2

Change-Id: I92b7b0f5397e4d938b9c1f1e74aa2145c2297371
2016-11-02 15:52:56 +00:00
Treehugger Robot 043bc971f2 Merge "init: Add support for ambient capabilities." 2016-11-02 15:47:01 +00:00
Jorge Lucangeli Obes 24b29132a0 init: Add support for ambient capabilities.
Ambient capabilities are inherited in a straightforward way across
execve(2):

"
If you are nonroot but you have a capability, you can add it to pA.
If you do so, your children get that capability in pA, pP, and pE.
For example, you can set pA = CAP_NET_BIND_SERVICE, and your
children can automatically bind low-numbered ports.
"

This will allow us to get rid of the special meaning for AID_NET_ADMIN
and AID_NET_RAW, and if desired, to reduce the use of file capabilities
(which grant capabilities to any process that can execute the file). An
additional benefit of the latter is that a single .rc file can specify
all properties for a service, without having to rely on a separate file
for file capabilities.

Ambient capabilities are supported starting with kernel 4.3 and have
been backported to all Android common kernels back to 3.10.

I chose to not use Minijail here (though I'm still using libcap) for
two reasons:

1-The Minijail code is designed to work in situations where the process
is holding any set of capabilities, so it's more complex. The situation
when forking from init allows for simpler code.

2-The way Minijail is structured right now, we would not be able to
make the required SELinux calls between UID/GID dropping and other priv
dropping code. In the future, it will make sense to add some sort of
"hook" to Minijail so that it can be used in situations where we want
to do other operations between some of the privilege-dropping
operations carried out by Minijail.

Bug: 32438163
Test: Use sample service.
Change-Id: I3226cc95769d1beacbae619cb6c6e6a5425890fb
2016-11-01 19:56:14 -04:00
Dimitry Ivanov 800083d229 Return nullptr from FindNamespaceByClassLoader for NB-enabled apps.
This function is always called by the frameworks in order to
initialize vulkan layer path. For NB apps returning nullptr
disables vulkan layer library lookup as expected.

Bug: http://b/32542970
Test: mm
Change-Id: I426b2b9f5ea7227b00f063ed6040f37bb2b4f21f
2016-11-01 14:48:45 -07:00
Josh Gao 35beaca383 Merge "adb: add `adb reconnect offline` to reconnect offline devices." am: 0945380e36
am: 1d51d6d6aa

Change-Id: I83cca311becc99b3ea4a3f2b213397af5554768c
2016-10-31 21:38:46 +00:00
Josh Gao 1d51d6d6aa Merge "adb: add `adb reconnect offline` to reconnect offline devices."
am: 0945380e36

Change-Id: I832f5c97f455b2b38b4bcd734759cb9561ec9b31
2016-10-31 21:33:19 +00:00
Josh Gao 0945380e36 Merge "adb: add `adb reconnect offline` to reconnect offline devices." 2016-10-31 21:26:23 +00:00
Nick Kralevich 041a72ab30 Merge "init: Put init in group AID_READPROC" am: 995560919c
am: ba2a810deb

Change-Id: Id46e8132118a0c07ba3db362318c2709e48ceddd
2016-10-31 19:29:11 +00:00
Nick Kralevich ba2a810deb Merge "init: Put init in group AID_READPROC"
am: 995560919c

Change-Id: Id2271f8200b020fe5ccaa82e3ea4b68368a6adf1
2016-10-31 19:21:49 +00:00
Treehugger Robot 995560919c Merge "init: Put init in group AID_READPROC" 2016-10-31 19:13:35 +00:00
Wei Wang e17f82f8b1 Merge "Fix log for early_mount" am: fff1669341
am: fc60c4694c

Change-Id: If1ca10ed2aef36192f06459f097277d5c28f6f99
2016-10-31 15:16:51 +00:00
Wei Wang fc60c4694c Merge "Fix log for early_mount"
am: fff1669341

Change-Id: I1624e4ac16b6bab7e6aaddb4ef9def01a5c8d15c
2016-10-31 15:10:21 +00:00
Treehugger Robot fff1669341 Merge "Fix log for early_mount" 2016-10-31 15:04:38 +00:00
Robert Sesek a2ceaf6b8b Add fs_config entries for the webview_zygote.
The webview_zygote is a non-root zygote process that creates isolated_app
children for rendering web content. It needs:
- CAP_SETUID and CAP_SETGID to change the UID of the new child process.
- CAP_SETPCAP to clear the capability bounding set after forking.

Test: m
Test: angler boots

Bug: 21643067
Change-Id: I986fa04be54e812f5dd2afa14e5d2d3e474e2b10
2016-10-31 10:33:36 -04:00
Daichi Hirono b1bcc950f9 Merge "Add FuseBridgeLoop to libappfuse." am: b5ce6f02dd
am: de21fbb30b

Change-Id: I94dca86db976b167283da1ea2fbf220d92737150
2016-10-31 06:20:51 +00:00
Daichi Hirono de21fbb30b Merge "Add FuseBridgeLoop to libappfuse."
am: b5ce6f02dd

Change-Id: I61d931b7f9b21cad7c5702c1ca362ac10ea91e00
2016-10-31 06:13:50 +00:00
Treehugger Robot b5ce6f02dd Merge "Add FuseBridgeLoop to libappfuse." 2016-10-31 06:09:32 +00:00
Nick Kralevich 80960d2a9a init: Put init in group AID_READPROC
bootcharts currently only show root's processes, which isn't very
useful. To investigate and track boot duration issues, we need a way for
init to see all the pids. Add init to GID 3009 (aka AID_READPROC)

Ensure that init's children don't inherit this GID by always clearing
supplementary group IDs on fork.

Bug: 32506197
Test: Device boots and /proc/1/status says init is in gid 3009
Test: zygote starts and the Group: line in /proc/ZYGOTEPID/status is empty
Change-Id: Iba90717aaa591f1d6030a379a272aee003600c0a
Not-Tested: bootchart actually works. Speculative fix.
2016-10-29 12:20:00 -07:00
Wei Wang 313b352382 Fix log for early_mount
Test: on device
Bug: 32508724
Change-Id: Ib2908b19f6068012d5597ac4cc590ffb0c063b75
2016-10-28 18:05:36 -07:00
Elliott Hughes 2f01ec4dfa Merge "Log when bootcharting ends." am: cd368c640a
am: 62fd68bb47

Change-Id: Ib245577211e73a7feb25c0b45b7bbe8e04c93b2e
2016-10-29 00:40:05 +00:00
Elliott Hughes 62fd68bb47 Merge "Log when bootcharting ends."
am: cd368c640a

Change-Id: I39e25bb450d601084f5d88d72934d319607a76d9
2016-10-29 00:35:07 +00:00
Treehugger Robot cd368c640a Merge "Log when bootcharting ends." 2016-10-29 00:29:09 +00:00
Keun-young Park 1692bbc410 Merge "Add UID for vehicle network" am: 9112b419bd
am: 3142267ff2

Change-Id: Ia7fbc5f1c6db4bef85451988866ed5dc7e289232
2016-10-28 21:14:36 +00:00
Keun-young Park 3142267ff2 Merge "Add UID for vehicle network"
am: 9112b419bd

Change-Id: Ie6111026580d97d8552fd3de1fe10e88820205c6
2016-10-28 21:09:36 +00:00
Treehugger Robot 9112b419bd Merge "Add UID for vehicle network" 2016-10-28 21:03:09 +00:00
Elliott Hughes 5ee97e8ec0 Log when bootcharting ends.
Bug: http://b/26863004
Test: bootcharted N9
Change-Id: Ie91a4342d05ac5e7b6a8d37fa729edf36c38912b
2016-10-28 12:30:32 -07:00
Keun-young Park 42e802c2fb Add UID for vehicle network
- Access to vehicle network is done in vehicle network service process.

Test: build
bug: 32508433
Change-Id: I340d1f4964d70b53f10d84fb15a62107e1dedc0e
2016-10-28 12:08:07 -07:00
Daichi Hirono 8eb80cbc48 Merge "Add utility functions for FUSE." am: e381ecf63b
am: d37b649e9a

Change-Id: Id2cf1b3bdc22ae218c0f0712f260287a86d8cf98
2016-10-28 06:34:47 +00:00
Daichi Hirono d37b649e9a Merge "Add utility functions for FUSE."
am: e381ecf63b

Change-Id: I3a4dcfacdeeaccd3f49d09a86b130cf719d4c386
2016-10-28 06:29:45 +00:00
Treehugger Robot e381ecf63b Merge "Add utility functions for FUSE." 2016-10-28 06:22:33 +00:00
Josh Gao 22d2b3e1c2 adb: add `adb reconnect offline` to reconnect offline devices.
Add a command to reconnect offline/unauthorized devices, mainly for use
with the inotify-monitoring of vendor key directories added by 2e671202.

Bug: http://b/29273531
Test: manually tested with a sailfish + copying vendor keys
Change-Id: If34cccee4ae553ada65d128b57d03cba8c0d7c46
2016-10-27 17:13:23 -07:00
Daichi Hirono c613476297 Add FuseBridgeLoop to libappfuse.
The CL adds FuseBridgeLoop class to libappfuse, which is used in the
system service to proxy fuse commands to applications.

Bug: 29970149
Test: libappfuse_test
Change-Id: I0708f608b3868721ab16ba4028fd2c17a6735af7
2016-10-27 15:04:15 +09:00
Daichi Hirono 7f8e819ded Add utility functions for FUSE.
The CL adds utility functions to framework to parse FUSE messages
from the kernel. The library will be used from framework JNI and service
JNI.

Bug: 32260320
Test: libappfuse_test
Change-Id: Ib89b26d34789e6c26a3288beceb3ea145c1ae780
2016-10-27 12:40:24 +09:00
Elliott Hughes 1cb40045df Merge "Make "adb logcat" pass $ANDROID_LOG_TAGS through again." am: b838ff65d9
am: a4f497e0a2

Change-Id: Iba736a025518b0741971820ec5476996ba54f695
2016-10-27 01:14:08 +00:00
Elliott Hughes a4f497e0a2 Merge "Make "adb logcat" pass $ANDROID_LOG_TAGS through again."
am: b838ff65d9

Change-Id: I29acb11ca837c1824e4530c1e6315f04c7a25648
2016-10-27 01:10:07 +00:00
Treehugger Robot b838ff65d9 Merge "Make "adb logcat" pass $ANDROID_LOG_TAGS through again." 2016-10-27 01:02:56 +00:00
Mark Salyzyn 973b4df6a8 Merge "liblog: remove reference to log/logger.h" am: 459ec807a7
am: c023da688b

Change-Id: I6cf7903299c7ae66b182e4d51cb8e9153cd23785
2016-10-26 23:51:33 +00:00
Mark Salyzyn c023da688b Merge "liblog: remove reference to log/logger.h"
am: 459ec807a7

Change-Id: Ifd58f7446670d5059a6084bdea23dfb8b70aa914
2016-10-26 23:47:03 +00:00
Treehugger Robot 459ec807a7 Merge "liblog: remove reference to log/logger.h" 2016-10-26 23:43:46 +00:00
Wei Wang 8e1a4d6366 Merge "Make sure wait for the dm device" am: d70a5feb60
am: 496e667966

Change-Id: Id3099d46be278ce60db72100adee6c882c216725
2016-10-26 22:46:29 +00:00
Wei Wang 496e667966 Merge "Make sure wait for the dm device"
am: d70a5feb60

Change-Id: If1e188c32548995413e49c1f7edece8d2c526bb2
2016-10-26 22:35:28 +00:00