Commit graph

34082 commits

Author SHA1 Message Date
Elliott Hughes
76a934a459 Remove documentation for obsolete board configuration.
Bug: N/A
Test: builds
Change-Id: I5afbf2da35a7defb12b98bb5387ab7d3eee6f15a
2017-06-28 07:50:00 -07:00
Jiyong Park
22ca4f76c2 resolve merge conflicts of 20d9cf2ee to stage-aosp-master
Test: I solemnly swear I tested this conflict resolution.
Merged-In: If8fc73e4ae4c2f8281c41a12f1c18079aab8baa2
Change-Id: Ie7feb839c9da2a11579ed850680c044c9fc3432a
2017-06-28 05:55:43 +00:00
Treehugger Robot
20d9cf2ee7 Merge "fs_mgr: add libfstab for vendor" 2017-06-28 04:57:48 +00:00
Jiyong Park
e7df1f7623 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: I371174fa1f6b4de6d6dd437b84ce4ed1e8740672
Merged-In: If8fc73e4ae4c2f8281c41a12f1c18079aab8baa2
2017-06-28 11:24:25 +09:00
Guang Zhu
aa447d7aa5 Merge "Revert "init: Terminate gracefully when CAP_SYS_BOOT is absent""
am: b5b4136ac4

Change-Id: Icd0a76aeb770cec04c029d30114bb3cf645a850c
2017-06-28 02:22:49 +00:00
Guang Zhu
b5b4136ac4 Merge "Revert "init: Terminate gracefully when CAP_SYS_BOOT is absent"" 2017-06-28 02:15:43 +00:00
Guang Zhu
c22f93856f Revert "init: Terminate gracefully when CAP_SYS_BOOT is absent"
Bug: 63080844

This reverts commit 683ebc8059.

Change-Id: I6074ff09300fd30bfc66881ded1c4f868a845a91
2017-06-28 02:10:33 +00:00
Josh Gao
14e36421db Merge changes I5c6bf2a5,I20a337bb
am: 7f81b2af61

Change-Id: I5388b048cdcc41d374b1d58476def364409b72b2
2017-06-27 23:59:36 +00:00
Treehugger Robot
7f81b2af61 Merge changes I5c6bf2a5,I20a337bb
* changes:
  debuggerd: diagnostics for dumps that are guaranteed to fail.
  libprocinfo: add support for parsing process state.
2017-06-27 23:54:36 +00:00
Luis Hector Chavez
ec8a5f2aa6 Merge "init: Terminate gracefully when CAP_SYS_BOOT is absent"
am: fbb482f499

Change-Id: I7cff66250e7f5d0b9d55feb2ddb6d74608aa4dd9
2017-06-27 23:01:19 +00:00
Dan Albert
e76c8020ba Merge "Indicate that a packet was truncated."
am: 046160959c

Change-Id: Id672c3c987c2ba2b12c8296b659038d95bfd48f8
2017-06-27 23:00:57 +00:00
Treehugger Robot
fbb482f499 Merge "init: Terminate gracefully when CAP_SYS_BOOT is absent" 2017-06-27 22:55:48 +00:00
Treehugger Robot
046160959c Merge "Indicate that a packet was truncated." 2017-06-27 22:50:48 +00:00
Josh Gao
0915f23d5f debuggerd: diagnostics for dumps that are guaranteed to fail.
Print diagnostics when the user requests a dump that is guaranteed to
fail, such as trying to dump a process you can't send a signal to.

Bug: http://b/63008395
Change-Id: I5c6bf2a5751f858e0534990b8d2ab6932eb9f11d
Test: manually tested
2017-06-27 15:06:57 -07:00
Josh Gao
9cb2e2eb8c libprocinfo: add support for parsing process state.
Bug: http://b/63008395
Test: libprocinfo_test32
Change-Id: I20a337bb5075bcdb325d2b48e174b0b5ef896261
2017-06-27 15:06:27 -07:00
Mark Salyzyn
3a156e6c2b Merge changes Ibe1feb39,I05be83e4,If1422e4d
am: a4f086ab20

Change-Id: I7e5d431c992f9860ca7b42ca81edfbfd1d8e0a1c
2017-06-27 21:52:06 +00:00
Treehugger Robot
a4f086ab20 Merge changes Ibe1feb39,I05be83e4,If1422e4d
* changes:
  init.rc: setup console-ramoops-0
  healthd: check console-ramoops-0
  fs_mgr: check console-ramoops-0
2017-06-27 21:46:30 +00:00
Elliott Hughes
216ac36534 Merge "Allow configuration of the number of tombstones."
am: 3e8d923276

Change-Id: I6c523c75801518b8cee7aa375b9b58f0914d150f
2017-06-27 21:01:16 +00:00
Elliott Hughes
3e8d923276 Merge "Allow configuration of the number of tombstones." 2017-06-27 20:57:08 +00:00
Luis Hector Chavez
683ebc8059 init: Terminate gracefully when CAP_SYS_BOOT is absent
This change makes it possible for Android running in a container to
terminate cleanly instead of calling abort() when requested to shut
down.

Bug: 62388055
Test: setprop sys.powerctl reboot makes init terminate nicely

Change-Id: I31c7b475d89d7cbd665e135d9b8951dfd4bca80d
2017-06-27 13:51:46 -07:00
Dan Albert
9893f93950 Indicate that a packet was truncated.
Test: make checkbuild, check adb log
Bug: None
Change-Id: I0006ed284697f01966fdd79ca0b05dbc6d2eecf0
2017-06-27 13:26:14 -07:00
Mark Salyzyn
4eb0ba058c init.rc: setup console-ramoops-0
On later kernels /sys/fs/pstore/console-ramoops becomes
/sys/fs/pstore/console-ramoops-0

Test: none
Bug: 63058217
Change-Id: Ibe1feb39ef9081b1ab2316510674bf181bdc7b0c
2017-06-27 09:32:38 -07:00
Mark Salyzyn
26f1dd764c healthd: check console-ramoops-0
On later kernels /sys/fs/pstore/console-ramoops becomes
/sys/fs/pstore/console-ramoops-0

Test: none
Bug: 63058217
Change-Id: I05be83e40dfc1730ed62b74a146123cdb8573ca6
2017-06-27 09:28:57 -07:00
Mark Salyzyn
cab56c0ba5 fs_mgr: check console-ramoops-0
On later kernels /sys/fs/pstore/console-ramoops becomes
/sys/fs/pstore/console-ramoops-0

Test: none
Bug: 63058217
Change-Id: If1422e4df09b68c44f16608b1d191aeb6378c66b
2017-06-27 09:10:16 -07: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
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
Elliott Hughes
35bb6d2a89 Allow configuration of the number of tombstones.
Bug: http://b/62810514
Test: altered the property, got more tombstones
Change-Id: Iba8089915fa715658d2dfecb076c6a61321243bd
2017-06-26 14:00:00 -07:00
Tom Cherry
b4dd881ffd ueventd: remove character device symlinks (/dev/usb/*)
While refactoring ueventd, I was looking for code the character device
symlinks (/dev/usb/*) that ueventd creates, such that I could test it
on a real device.  I found none in our tree, and history showing Xoom,
which was last supported years ago, was the last user.  If this code
is in fact obsolete, let's remove it.

Test: boot bullhead
Test: init unit tests

Change-Id: I601f7165eb06d36b31b6dcf69ee9e0a449d81a96
2017-06-26 13:58:57 -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
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
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
Tom Cherry
040212706b Merge "init: create android::init:: namespace" 2017-06-23 23:07:23 +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
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
Treehugger Robot
45b4fe454a Merge "libsysutils: Fix vold vulnerability in FrameworkListener" 2017-06-23 20:31:49 +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
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