Commit graph

30438 commits

Author SHA1 Message Date
Steven Moreland
d0a19a6487 Bluetooth hal: moved to vendor partition.
Bug: 35328775
Test: works in both binderized and passthrough modes
Change-Id: I61f1ff6b777089d7aad5184c0aee4f653897b32e
2017-02-27 15:41:48 -08:00
TreeHugger Robot
3d0d6b380f Merge "gatekeeper HAL uses "default" service name" 2017-02-24 23:21:58 +00:00
Sandeep Patil
ddfe01281a Merge changes from topic 'fs_mgr_dt' am: dbb40b64e9 am: ad384fc992
am: 50eb15a0d0

Change-Id: I4c8784610d0d41c3807851c516e3ef59388ca70f
2017-02-24 23:10:30 +00:00
Sandeep Patil
50eb15a0d0 Merge changes from topic 'fs_mgr_dt' am: dbb40b64e9
am: ad384fc992

Change-Id: I4da9fc02a777aab48fc59e98d1509391eded7347
2017-02-24 23:07:29 +00:00
Sandeep Patil
ad384fc992 Merge changes from topic 'fs_mgr_dt'
am: dbb40b64e9

Change-Id: I8e54aecb4825f4adc3fd92ceff1da76e1c4b227b
2017-02-24 23:05:00 +00:00
Treehugger Robot
dbb40b64e9 Merge changes from topic 'fs_mgr_dt'
* changes:
  fs_mgr: refactor: consolidate device tree file reading in one place
  fs_mgr: consolidate DT compatible check
2017-02-24 23:01:08 +00:00
TreeHugger Robot
9691bb604b Merge "health HAL uses "default" service name" 2017-02-24 22:30:23 +00:00
Sandeep Patil
4cd9a46916 fs_mgr: refactor: consolidate device tree file reading in one place
If Device tree values are read for comparison, they produce false
negatives with std::strings due to trailing '\0'. This change
consolidates the triming of trailing null into a single helper function
to be used everywhere fs_mgr reads DT values for comparison or other
reasons where it wishes to have the trailing null trimmed.

b/27805372

Test: Boot sailfish w/ early mount /vendor

Change-Id: If71efc830dc440323df764c7461867e71ed6515b
Signed-off-by: Sandeep Patil <sspatil@google.com>
2017-02-24 13:29:33 -08:00
Sandeep Patil
e396c607ff fs_mgr: consolidate DT compatible check
Fixes the compatible check in fs_mgr_boot_config by consolidating the
check in a single privately exported function within fs_mgr (i.e.
is_dt_compatible()).

b/27805372

Test: Boot sailfish w/ early mount

Change-Id: Ie2d1646b81cf9eba8d16828ca8cf2c75156c294c
Signed-off-by: Sandeep Patil <sspatil@google.com>
2017-02-24 13:29:26 -08:00
Colin Cross
62a6b16c4b Merge "Make libutils test compile on the host" am: f5fd4888ce am: a05a666c01
am: 3bc7d607d4

Change-Id: I00ac6f6871d925c805953eff0fa0c918cee3600a
2017-02-24 21:25:24 +00:00
Colin Cross
3bc7d607d4 Merge "Make libutils test compile on the host" am: f5fd4888ce
am: a05a666c01

Change-Id: Iaf009f378a9b29b56297b5ba3f061bad6cec3c71
2017-02-24 21:22:23 +00:00
Colin Cross
a05a666c01 Merge "Make libutils test compile on the host"
am: f5fd4888ce

Change-Id: Id45309c93a25cba0aa632757eebee341d2dc8d98
2017-02-24 21:19:52 +00:00
Colin Cross
f5fd4888ce Merge "Make libutils test compile on the host" 2017-02-24 21:16:01 +00:00
Josh Gao
d65cfc14fd Merge "Revert "adb: remove win32 dependency on libwinpthread-1.dll."" am: 87eb0fc3d0 am: 00613c52ca
am: f100ad841f

Change-Id: I94a784f37c729291d840bae93c0e3b2647eb92f4
2017-02-24 21:14:39 +00:00
Josh Gao
f100ad841f Merge "Revert "adb: remove win32 dependency on libwinpthread-1.dll."" am: 87eb0fc3d0
am: 00613c52ca

Change-Id: Ie780290c64ccd3bc49df9007e5ceb136aa08e6a6
2017-02-24 21:11:34 +00:00
Josh Gao
00613c52ca Merge "Revert "adb: remove win32 dependency on libwinpthread-1.dll.""
am: 87eb0fc3d0

Change-Id: I58794c4e5325a2f1bd0812bed2d451c82ba97056
2017-02-24 21:09:05 +00:00
Josh Gao
87eb0fc3d0 Merge "Revert "adb: remove win32 dependency on libwinpthread-1.dll."" 2017-02-24 21:02:25 +00:00
Colin Cross
155c983ad1 Make libutils test compile on the host
Reapply of Icd5f39ae71b57167e9b2fe7ec09c5400bcb90e78 with
RefBase_test.cpp and Looper_test.cpp removed from mac builds.

Test: out/host/linux-x86/nativetest64/libutils_tests/libutils_tests
Test: out/host/darwin-x86/nativetest64/libutils_tests/libutils_tests
Change-Id: I5979b296a8500b5697d94d64fc441363047adcea
2017-02-24 08:10:06 -08:00
Richard Uhler
2aa94cfaf9 Merge "Revert "Make libutils test compile on the host"" am: 16f4fb9c4e am: 5682e001e9
am: 0d461283ce

Change-Id: I82132fc1e9eda421ed44a65029d389fdde67d5e8
2017-02-24 11:20:20 +00:00
Richard Uhler
0d461283ce Merge "Revert "Make libutils test compile on the host"" am: 16f4fb9c4e
am: 5682e001e9

Change-Id: I3b01c3f65e7b05191b3867928a5e9d1b8f8cc1c8
2017-02-24 11:17:14 +00:00
Richard Uhler
5682e001e9 Merge "Revert "Make libutils test compile on the host""
am: 16f4fb9c4e

Change-Id: I855db58666f2a2b2dda4bb9bb36d7c4df44a3903
2017-02-24 11:14:43 +00:00
Richard Uhler
16f4fb9c4e Merge "Revert "Make libutils test compile on the host"" 2017-02-24 11:10:43 +00:00
Richard Uhler
26bfee52b3 Revert "Make libutils test compile on the host"
Fails mac build: "system/core/include/utils/Looper.h:25:10: fatal error: 'sys/epoll.h' file not found"

This reverts commit afa891e85e.

Change-Id: Ib558b8f5a303b55ab32a399d338d8aac0fae32b2
2017-02-24 09:36:13 +00:00
Colin Cross
23eff4621f Merge changes Icd5f39ae,I2a4e956c am: 6d795c2883 am: 92466ff6ea
am: 9cb1d219bd

Change-Id: Ic79f7efd0090a940ac1cb7be1e863c2668790bd3
2017-02-24 07:09:41 +00:00
Colin Cross
9cb1d219bd Merge changes Icd5f39ae,I2a4e956c am: 6d795c2883
am: 92466ff6ea

Change-Id: I8505a2397c0e38e5c043b69934a0bf3c7e6266ef
2017-02-24 07:07:01 +00:00
Colin Cross
92466ff6ea Merge changes Icd5f39ae,I2a4e956c
am: 6d795c2883

Change-Id: Iada421394365a767712b553706a5897b21b2ae5a
2017-02-24 07:04:39 +00:00
Treehugger Robot
6d795c2883 Merge changes Icd5f39ae,I2a4e956c
* changes:
  Make libutils test compile on the host
  Fix ODR issue in StrongPointer_test.cpp
2017-02-24 06:59:11 +00:00
Colin Cross
afa891e85e Make libutils test compile on the host
Test: out/host/linux-x86/nativetest64/libutils_tests/libutils_tests
Change-Id: Icd5f39ae71b57167e9b2fe7ec09c5400bcb90e78
2017-02-23 21:25:19 -08:00
Colin Cross
fe06c63301 Fix ODR issue in StrongPointer_test.cpp
StrongPointer_test.cpp's Foo was colliding with RefBase_test.cpp's
Foo.

Test: out/host/linux-x86/nativetest64/libutils_tests/libutils_tests
      from later CL
Change-Id: I2a4e956c88a07cec72d7ce734cf06c58134a4235
2017-02-23 21:25:18 -08:00
Colin Cross
477b3fc355 Merge "Fix multiton issue" am: 78b285b367 am: 6d7751a13b
am: dafd687617

Change-Id: I7e7369361dda3df0e97169c0d06ce24c57490c7d
2017-02-24 04:12:20 +00:00
Colin Cross
dafd687617 Merge "Fix multiton issue" am: 78b285b367
am: 6d7751a13b

Change-Id: Ie09b193b7f6fce5bfa9998193bc050d9469064c9
2017-02-24 04:09:48 +00:00
Colin Cross
6d7751a13b Merge "Fix multiton issue"
am: 78b285b367

Change-Id: I56c87e6d4d8b5f5364d2c37c95cf0097d6071985
2017-02-24 04:07:49 +00:00
Treehugger Robot
78b285b367 Merge "Fix multiton issue" 2017-02-24 04:03:11 +00:00
Sandeep Patil
72b689bf34 Merge changes from topic 'early-mount-verity' am: 93072f2ce3 am: 2eb715d866
am: d93e05052a

Change-Id: I014d926e0bf7f560b7fbfa32f11b078dc7b6edc4
2017-02-24 02:23:54 +00:00
Colin Cross
b0145091a7 Fix multiton issue
I385a05a3ca01258e44fe3b37ef77e4aaff547b26 broke Singleton in the
same way that 544e3e3606 had already
fixed once.  Fix it again, the next CL will add tests.

This affected cases where two libraries referenced the same singleton,
the one that was supposed to define the singleton was already loaded,
and then the second library was dlopen'd.

Bug: 35674422
Test: out/host/linux-x86/nativetest64/libutils_tests/libutils_tests
      from later CL
Change-Id: I87c64f95ed294a887e67a6c11be3072299789f01
2017-02-23 18:22:46 -08:00
Sandeep Patil
d93e05052a Merge changes from topic 'early-mount-verity' am: 93072f2ce3
am: 2eb715d866

Change-Id: I32cc1ceaaaf1eaad47f7e4c129a520c5835ecd10
2017-02-24 02:21:21 +00:00
Sandeep Patil
2eb715d866 Merge changes from topic 'early-mount-verity'
am: 93072f2ce3

Change-Id: Idf13b00a6e69f96d8496377ec2ce58944599666e
2017-02-24 02:18:54 +00:00
Treehugger Robot
93072f2ce3 Merge changes from topic 'early-mount-verity'
* changes:
  adb: early-mount: fix verity toggle through adb for early mount
  early_mount: fs_mgr: move all fstab logic into fs_mgr
2017-02-24 02:13:50 +00:00
Tom Cherry
db3a4c748a Merge "Check setegid() return values" am: 0d24c8f852 am: fb13dab611
am: 5de0f0ea41

Change-Id: Id04b1cddd4baa137527dd2d50189f01a89a2f646
2017-02-24 01:04:49 +00:00
Elliott Hughes
658656b56b Merge "Add some basic docs for <android-base/logging.h>" am: 3b5089371b am: 8d8c3026a8
am: 13c0d23711

Change-Id: I8382784fff485958f2f44186d8866221aabe7023
2017-02-24 01:04:37 +00:00
Tom Cherry
5de0f0ea41 Merge "Check setegid() return values" am: 0d24c8f852
am: fb13dab611

Change-Id: I67b0dfc4049f337631e12ab29330984db9edd04c
2017-02-24 01:02:19 +00:00
Elliott Hughes
13c0d23711 Merge "Add some basic docs for <android-base/logging.h>" am: 3b5089371b
am: 8d8c3026a8

Change-Id: Iff7d38052aa2a9b26ca2d43ef02f9fed352f5fe9
2017-02-24 01:02:07 +00:00
Tom Cherry
fb13dab611 Merge "Check setegid() return values"
am: 0d24c8f852

Change-Id: I4642339cbd5f03113994a9f2042dca8dc645e209
2017-02-24 00:59:53 +00:00
Elliott Hughes
8d8c3026a8 Merge "Add some basic docs for <android-base/logging.h>"
am: 3b5089371b

Change-Id: I5bc37c1c113f2448954d15ec7f635e7dba56f21c
2017-02-24 00:59:42 +00:00
Treehugger Robot
0d24c8f852 Merge "Check setegid() return values" 2017-02-24 00:55:36 +00:00
Elliott Hughes
3b5089371b Merge "Add some basic docs for <android-base/logging.h>" 2017-02-24 00:55:17 +00:00
Sandeep Patil
f134fe07b8 adb: early-mount: fix verity toggle through adb for early mount
verity toggle through adb failed to work for early mount due to fstab
entries being moved into kernel/dt. This change fixes that by using the
new fs_mgr_read_fstab_default() api that will make sure all fstab
entries (from dt as well as from /fstab.{ro.hardware}) are combined
before returning the fstab object.

b/27805372

Test: early mount /system and /vendor on angler.
- test adb disable-verity && adb root to ensure rebooted instance
doesn't have 'partition.system.verified' property set. i.e. verity is
indeed disabled.

- test adb enable-verity && adb root to ensure rebooted instance does
have 'partition.system.verified' property set, i.e. verity is enabled.
also verified by trying to do 'adb remount' which correctly warns about
verity

Change-Id: Iffdcc0a0b959a65c326219bd4e9e41cba9ec7c88
Signed-off-by: Sandeep Patil <sspatil@google.com>
2017-02-23 16:48:52 -08:00
Sandeep Patil
c20c0c2cdd early_mount: fs_mgr: move all fstab logic into fs_mgr
With init parsing fstab fragments from kernel separately, the fs_mgr
would completely miss the device tree entries. That leads to things like
'adb remount' to go through without warning for verity even if /system
is verified. This happens because 'verity_update_state' completely
misses the partitions passed to android through the device tree.

solution is to teach fs_mgr about device tree fstab entries and add 2
new public APIs.

1. fs_mgr_read_fstab_dt() - reads device tree and returns fstab
generated from it.

2. fs_mgr_read_fstab_default() - reads both device tree fstab and
/fstab.{ro.hardware} and returns the combined table.

This also reduces the hardcoded /fstab.{ro.hardware} occurence only to
fs_mgr and for eveyone who wants to read the "default" fstab must be
changed to call fs_mgr_read_fstab_default() instead. e.g. adb.

b/27805372

Test: Angler was used since it has 2 early mounted partitions instead of
one. 1 verified and 1 unverified.
- Boot angler successfully without early mount
- Boot angler successfully with /vendor early mount and test if 'adb
remount' warns us about verity
- Boot angler successfully with both /system and /vendor early mounted
and ensure 'adb remount' warns us about verity.
- check partitions.system.verified status after /system early mount ot
ensure it is set to VERITY_MODE_DEFAULT.
- 'adb disable-verity' with early mounted /system doesn't work due to
missing changes in adb

TODO:
change adb to use the new fs_mgr_read_fstab_default() API

Change-Id: I82038d87c7a44488e938acce2cc1082c08f6f73a
Signed-off-by: Sandeep Patil <sspatil@google.com>
2017-02-23 16:48:43 -08:00
Tom Cherry
917cca2f04 Merge "Make Condition use CLOCK_MONOTONIC" am: 7f932afefc am: 36ba2fbef7
am: 83f76a20a8

Change-Id: I214548f856db2826b7a4ea96a98950fee7d20a27
2017-02-23 22:09:39 +00:00
Tom Cherry
83f76a20a8 Merge "Make Condition use CLOCK_MONOTONIC" am: 7f932afefc
am: 36ba2fbef7

Change-Id: Ib15f34fcb36761dbbc7f3094a3a76a771792b593
2017-02-23 22:07:09 +00:00