Jiyong Park
5eeb934689
fs_mgr: add libfstab for vendor
...
libfstab is a subset of libfs_mgr, intended for vendors to use. It
exposes APIs for reading fstab. Note this 'visible to vendor' does not
mean that the API should be stable forever. The API can be changed in
later releases of Android, ,but the newer Android must not cause
run-time error when there is an older version of this static library
being used somewhere.
Bug: 62990533
Test: BOARD_VNDK_VERSION=current m -j libfstab.vendor
Change-Id: If8fc73e4ae4c2f8281c41a12f1c18079aab8baa2
2017-06-27 16:16:22 +09:00
Ben Fennema
f13aef79fa
Merge "libcutils: fs_config: fix "system/<partition>/" aliasing" am: 449bfd7a93 am: cd3584e90b am: 609b4cf6a5
...
am: 52c61939c3
Change-Id: I5a5cea577e24c8a40e179200a55536d647400033
2017-06-27 00:50:22 +00:00
Josh Gao
16d85915ca
Merge "Revert "adb: turn on libusb by default."" am: b22067677e am: de931dab2d am: 947a301852
...
am: cb39742d3a
Change-Id: Ibaec7fe7dabb5d640b48acf0b9e5b7d2688712bd
2017-06-27 00:50:01 +00:00
Ben Fennema
52c61939c3
Merge "libcutils: fs_config: fix "system/<partition>/" aliasing" am: 449bfd7a93 am: cd3584e90b
...
am: 609b4cf6a5
Change-Id: Ice84d7764a4394b3f101673b5b310860adf59fd6
2017-06-26 22:54:10 +00:00
Ben Fennema
609b4cf6a5
Merge "libcutils: fs_config: fix "system/<partition>/" aliasing" am: 449bfd7a93
...
am: cd3584e90b
Change-Id: I8127f1b5f6b6b7667e65c53d0ae5ee91ba28d92e
2017-06-26 22:52:09 +00:00
Ben Fennema
cd3584e90b
Merge "libcutils: fs_config: fix "system/<partition>/" aliasing"
...
am: 449bfd7a93
Change-Id: I9f3d0f0e4dc147d9d2a5a1e41486805ada29d62a
2017-06-26 22:49:41 +00:00
Treehugger Robot
449bfd7a93
Merge "libcutils: fs_config: fix "system/<partition>/" aliasing"
2017-06-26 22:43:37 +00:00
Josh Gao
cb39742d3a
Merge "Revert "adb: turn on libusb by default."" am: b22067677e am: de931dab2d
...
am: 947a301852
Change-Id: Ideabacf8cd79adaf6fb828874ac636ed88707240
2017-06-26 22:17:29 +00:00
Josh Gao
947a301852
Merge "Revert "adb: turn on libusb by default."" am: b22067677e
...
am: de931dab2d
Change-Id: I19b7d82bcc60c6942e4faa1db2ee2999a1d698a0
2017-06-26 22:13:41 +00:00
Josh Gao
de931dab2d
Merge "Revert "adb: turn on libusb by default.""
...
am: b22067677e
Change-Id: I0fae08024b03bea8d03e9d5611575ebdba9b7e54
2017-06-26 22:01:36 +00:00
Treehugger Robot
b22067677e
Merge "Revert "adb: turn on libusb by default.""
2017-06-26 21:33:34 +00:00
Ben Fennema
acd7b7b0c0
libcutils: fs_config: fix "system/<partition>/" aliasing
...
Pull prefix checking into fs_config_cmp and make prefix_cmp be a
glorified partial ? strncmp() : strcmp()
Results before:
[ RUN ] fs_config.system_alias
[ ERROR ] system/core/libcutils/tests/fs_config.cpp:143:: vendor/lib/hw didn't match system/vendor/lib
[ ERROR ] system/core/libcutils/tests/fs_config.cpp:143:: system/vendor/bin/wifi didn't match vendor/bin/wifi
[ ERROR ] system/core/libcutils/tests/fs_config.cpp:143:: system/odm/bin/wifi didn't match odm/bin/wifi
[ ERROR ] system/core/libcutils/tests/fs_config.cpp:143:: system/oem/bin/wifi didn't match oem/bin/wifi
system/core/libcutils/tests/fs_config.cpp:247: Failure
Value of: check_fs_config_cmp(fs_config_cmp_tests)
Actual: true
Expected: false
[ FAILED ] fs_config.system_alias (6 ms)
Results after:
[ RUN ] fs_config.system_alias
[ OK ] fs_config.system_alias (0 ms)
Bug: 62204623
Test: gTest libcutils-unit-test --gtest_filter=fs_config.*
Change-Id: I8282827002816e86ea3014fed29eabf43b837815
Signed-off-by: Ben Fennema <fennema@google.com>
2017-06-26 14:13:52 -07:00
Josh Gao
969110ca4a
Revert "adb: turn on libusb by default."
...
This reverts commit f2f0b31850 .
libusb seems to be causing flakiness on some machines. Disable it for
now.
Bug: http://b/62962248
Test: python test_device.py (with DeviceOfflineTest commented out)
Change-Id: Ia9de78ab772c22574cf5ca7facb78f22af6d7a71
2017-06-26 13:17:58 -07:00
Bowgo Tsai
8ee91bf77c
Merge "AVB: allow no metadata in the generic system.img for project Treble" am: c70bf5836c am: caa5b4417f am: 2410d0c792
...
am: 61cdb66230
Change-Id: I23cdb0a5826f3378245375c5f5551aa46edd8536
2017-06-24 01:54:51 +00:00
Bowgo Tsai
61cdb66230
Merge "AVB: allow no metadata in the generic system.img for project Treble" am: c70bf5836c am: caa5b4417f
...
am: 2410d0c792
Change-Id: I5b03a7ac1cdb883df27aca8122c4a1383d805126
2017-06-24 01:51:47 +00:00
Bowgo Tsai
2410d0c792
Merge "AVB: allow no metadata in the generic system.img for project Treble" am: c70bf5836c
...
am: caa5b4417f
Change-Id: I4859e15d3bf05c22a708761e91b2e52fbb28ca1f
2017-06-24 01:40:33 +00:00
Bowgo Tsai
caa5b4417f
Merge "AVB: allow no metadata in the generic system.img for project Treble"
...
am: c70bf5836c
Change-Id: I583d9357df07c958778533599b9d91d00c255eb0
2017-06-24 01:35:01 +00:00
Treehugger Robot
c70bf5836c
Merge "AVB: allow no metadata in the generic system.img for project Treble"
2017-06-24 01:28:25 +00:00
Bowgo Tsai
60f19a0792
AVB: allow no metadata in the generic system.img for project Treble
...
The generic system.img released from project Treble can't contain any verity
metadata (e.g., vboot 1.0, AVB, or any other implementation) because it's
*generic*. To make any device can boot with it, `avbctl disable-verification`
is introduced to set a new flag AVB_VBMETA_IMAGE_FLAGS_VERIFICATION_DISABLED
in the top-level vbmeta to disable the entire AVB verification process. This
should be done prior to flash the generic system.img. See the following link
for details:
https://android-review.googlesource.com/#/c/418399/
This CL checks whether AVB_VBMETA_IMAGE_FLAGS_VERIFICATION_DISABLED is
set in the top-level vbmeta. When set, skip verifying the vbmeta structs
against androidboot.vbmeta.{hash_alg, size, digest} because it will be
absent in kernel cmdline. Also, only top-level vbmeta struct is read then
returned by libavb in this case.
Note that another flag AVB_VBMETA_IMAGE_FLAGS_HASHTREE_DISABLED, usually
set by `adb disable-verity`, is used to signal fs_mgr to skip setting up
dm-verity, but libavb still verifies all vbmeta structs. fs_mgr will
also verify all vbmeta structs against androidboot.vbmeta.{hash_alg,
size, digest} from kernel cmdline as well.
Also rename SetUpAvb() to SetUpAvbHashtree() to better fit its usage.
This function will return kDisabled when any of the above two flags is set.
Finally, regardless of which flag is set or not set, we still only allow two
return values from avb_slot_verify():
- AVB_SLOT_VERIFY_RESULT_OK: it's still possible to get this value
when any of these flags are set in build time. e.g.,
BOARD_AVB_MAKE_VBMETA_IMAGE_ARGS=--flags 2
- AVB_SLOT_VERIFY_RESULT_ERROR_VERIFICATION: in most cases we should
get this value, because the flags are likely set at run time.
Bug: 62523303
Test: boot device with 'avbctl disable-verification'.
Test: boot device with 'avbctl enable-verification'.
Test: boot device with 'adb disable-verity'.
Test: boot device with 'adb enable-verity'.
Test: build image with BOARD_AVB_MAKE_VBMETA_IMAGE_ARGS=--flags 2, then boot device.
repeat the above steps to boot device again.
Change-Id: Ie8436f3e0e82c78490208f3b85eac5238a9fdfdb
2017-06-24 09:20:15 +08:00
Tom Cherry
6b6d4834b0
Merge "init: create android::init:: namespace" am: 040212706b am: d3d79b2196 am: b57e1180e3
...
am: 99d93f4462
Change-Id: If8efbff1df7bead15a9f3c595e63390d9786dde7
2017-06-23 23:28:53 +00:00
Tom Cherry
99d93f4462
Merge "init: create android::init:: namespace" am: 040212706b am: d3d79b2196
...
am: b57e1180e3
Change-Id: Ic6d35273820d70136a6085bf49dcf3afcbb24f24
2017-06-23 23:24:21 +00:00
Tom Cherry
b57e1180e3
Merge "init: create android::init:: namespace" am: 040212706b
...
am: d3d79b2196
Change-Id: I3dccff251dda7d7452e33a7e71178c59f0c22169
2017-06-23 23:19:53 +00:00
Tom Cherry
d3d79b2196
Merge "init: create android::init:: namespace"
...
am: 040212706b
Change-Id: Iff22100c7357ccc4a2a48c50b093375b5dd8a4b9
2017-06-23 23:15:21 +00:00
Jeff Vander Stoep
e8bd9e88b5
Merge "Revert "crash_dump: during early boot, output to kmsg on userdebug."" into oc-dr1-dev am: 75a32dead5
...
am: d47d328b41
Change-Id: I54ccbffab33e03df978b8ab5e42daee41c87d418
2017-06-23 23:13:10 +00:00
Tom Cherry
040212706b
Merge "init: create android::init:: namespace"
2017-06-23 23:07:23 +00:00
Jeff Vander Stoep
d47d328b41
Merge "Revert "crash_dump: during early boot, output to kmsg on userdebug."" into oc-dr1-dev
...
am: 75a32dead5
Change-Id: Ia893832c1428858afd8d8726a789a5989dafa9a0
2017-06-23 23:01:27 +00:00
TreeHugger Robot
75a32dead5
Merge "Revert "crash_dump: during early boot, output to kmsg on userdebug."" into oc-dr1-dev
2017-06-23 22:45:48 +00:00
NIEJuhu
1c2af0803b
Merge "libsysutils: Fix vold vulnerability in FrameworkListener" am: 45b4fe454a am: bac524b0cd am: 56f021f0a4
...
am: 4eaface969
Change-Id: Ia1eafe9747673e45b5a47d68da966bd9f4621927
2017-06-23 20:58:41 +00:00
NIEJuhu
4eaface969
Merge "libsysutils: Fix vold vulnerability in FrameworkListener" am: 45b4fe454a am: bac524b0cd
...
am: 56f021f0a4
Change-Id: I9ed0e9e8cab7d26573464651932995b257e18904
2017-06-23 20:53:12 +00:00
Christopher Ferris
c759906eb1
Merge "Add section parsing and function name handling." am: 62a17c6c4a am: ee5c756d25 am: c37b983738
...
am: 8f937188e2
Change-Id: I7bfb6f97e98f966894b5c4d04448c3effd645d1b
2017-06-23 20:48:11 +00:00
NIEJuhu
56f021f0a4
Merge "libsysutils: Fix vold vulnerability in FrameworkListener" am: 45b4fe454a
...
am: bac524b0cd
Change-Id: I95154db2cad94aa4c9560b9abeec3c1967891d9f
2017-06-23 20:46:55 +00:00
Christopher Ferris
8f937188e2
Merge "Add section parsing and function name handling." am: 62a17c6c4a am: ee5c756d25
...
am: c37b983738
Change-Id: I256da8e2c77c74f9e9add0aa7670a0a3b09f7f8c
2017-06-23 20:43:42 +00:00
Christopher Ferris
c37b983738
Merge "Add section parsing and function name handling." am: 62a17c6c4a
...
am: ee5c756d25
Change-Id: Iaf9dd25a0982916c6c2b06bf7ba618e1b2b452e1
2017-06-23 20:38:53 +00:00
NIEJuhu
bac524b0cd
Merge "libsysutils: Fix vold vulnerability in FrameworkListener"
...
am: 45b4fe454a
Change-Id: I19d92353e5c425b4e8b1fd07e68da29975e2d991
2017-06-23 20:38:40 +00:00
Andreas Gampe
bf1c1e4dcc
Merge "Debuggerd: Fix debuggerd_test" into oc-dr1-dev am: 394c1ad959 -s ours
...
am: 5b77682b0d -s ours
Change-Id: I102648105a4d9722b5a322e55991f411ee637b7b
2017-06-23 20:38:25 +00:00
Jeff Vander Stoep
5fdc4cc746
Revert "crash_dump: during early boot, output to kmsg on userdebug."
...
This reverts commit bf2dd48241 .
Addresses:
avc: denied { relabelto } for name="kmsg_debug" dev="tmpfs" ino=10642
scontext=u:r:init:s0 tcontext=u:object_r:device:s0 tclass=chr_file
Bug: 62101480, 35197529
Test: build and boot device. Verify selinux denial no longer occurs.
Change-Id: I28ce16f50eec20ef15c1721f41b66f22a84e7cca
2017-06-23 13:37:54 -07:00
Andreas Gampe
5b77682b0d
Merge "Debuggerd: Fix debuggerd_test" into oc-dr1-dev
...
am: 394c1ad959 -s ours
Change-Id: I89a8416c2be1c26d23fff3d80939b48131b3f17d
2017-06-23 20:33:17 +00:00
Treehugger Robot
45b4fe454a
Merge "libsysutils: Fix vold vulnerability in FrameworkListener"
2017-06-23 20:31:49 +00:00
TreeHugger Robot
394c1ad959
Merge "Debuggerd: Fix debuggerd_test" into oc-dr1-dev
2017-06-23 20:28:30 +00:00
Christopher Ferris
ee5c756d25
Merge "Add section parsing and function name handling."
...
am: 62a17c6c4a
Change-Id: I010d9e6efa6d472242704be7a53e7bfeed24c4d5
2017-06-23 20:24:34 +00:00
Tom Cherry
81f5d3ebef
init: create android::init:: namespace
...
With some small fixups along the way
Test: Boot bullhead
Test: init unit tests
Change-Id: I7beaa473cfa9397f845f810557d1631b4a462d6a
2017-06-23 13:21:20 -07:00
Christopher Ferris
62a17c6c4a
Merge "Add section parsing and function name handling."
2017-06-23 20:18:35 +00:00
Tom Cherry
9bd49531d9
Merge "init: cleanup some string usage" am: 84c2eebbdd am: 77382acf42 am: 288fb7c2cc
...
am: 1a23b2aef5
Change-Id: I4cbf4f73cc3d58c0f1f7fb464f0919fe05f6b58d
2017-06-23 20:07:26 +00:00
Tom Cherry
1a23b2aef5
Merge "init: cleanup some string usage" am: 84c2eebbdd am: 77382acf42
...
am: 288fb7c2cc
Change-Id: I61e6ee578e55ebe343112c8114816ac4e18b9c7e
2017-06-23 20:01:41 +00:00
Tom Cherry
288fb7c2cc
Merge "init: cleanup some string usage" am: 84c2eebbdd
...
am: 77382acf42
Change-Id: I068291aeb16249a1b82e047dc894c283114a2bef
2017-06-23 19:55:39 +00:00
Tom Cherry
77382acf42
Merge "init: cleanup some string usage"
...
am: 84c2eebbdd
Change-Id: Ic42cb28916c0e8d03db302985f66cb02a801af97
2017-06-23 19:47:07 +00:00
Tom Cherry
84c2eebbdd
Merge "init: cleanup some string usage"
2017-06-23 19:40:24 +00:00
Christopher Ferris
8098b1c378
Add section parsing and function name handling.
...
Add the code to parse the Elf section headers.
Add the plumbing through of all the symbol handling code.
Add tests for all of this new functionality.
Bug: 23762183
Test: Pass new unit tests.
Change-Id: Ie2d90cbb3d7653c53251dbcf34d9e5d241278377
2017-06-23 10:51:28 -07:00
Andreas Gampe
0ecc88bb28
Debuggerd: Fix debuggerd_test
...
Follow-up to commit 695713e931f0436aca56be9c0dacf2a5dd4e56e7 in
bionic. Change expectations of the abort callstack.
(cherry picked from commit 26cbafb892 )
Bug: 62810360
Merged-In: I350a29ee1713a7ebdd50f2b9bdc2078c671e22c7
Test: mmma system/core/debuggerd
Test: adb shell /data/nativetest/debuggerd_test/debuggerd_test32
Test: adb shell /data/nativetest64/debuggerd_test/debuggerd_test64
Change-Id: I350a29ee1713a7ebdd50f2b9bdc2078c671e22c7
2017-06-23 10:49:19 -07:00
Daichi Hirono
31d0b19263
Add volatile to temporary variable. am: d9cda90ad4
...
am: a91e4f205f
Change-Id: Ie4e79b561e625ae7022e22c1c0ce1a73ef9d0d2a
2017-06-23 15:52:51 +00:00