Commit graph

32082 commits

Author SHA1 Message Date
Todd Poynor
a03b4dc574 Merge changes I76212f65,I6a29c678 into oc-dev
am: 5975d4e337

Change-Id: I0441dc1f8a9ff11429a253d0510790b20b42e3b4
2017-04-14 01:37:03 +00:00
TreeHugger Robot
5975d4e337 Merge changes I76212f65,I6a29c678 into oc-dev
* changes:
  init.rc: create /data/misc/reboot owned by system
  reboot: fix owner and permissions of last_reboot_reason file
2017-04-14 01:29:39 +00:00
Wei Wang
c74c092929 Merge "init.rc: start all 3 servicemanagers early" into oc-dev
am: d12835d19f

Change-Id: I935cc9f8b353a6b513fb825e989156684f27a9dd
2017-04-14 01:26:18 +00:00
Steven Moreland
220e6d824c Merge "libutils: export system_headers" into oc-dev
am: e003513ccf

Change-Id: If2e36fa031010ee6c150bec32ba6cff7d4efae1b
2017-04-14 01:26:07 +00:00
TreeHugger Robot
d12835d19f Merge "init.rc: start all 3 servicemanagers early" into oc-dev 2017-04-14 01:15:47 +00:00
TreeHugger Robot
e003513ccf Merge "libutils: export system_headers" into oc-dev 2017-04-14 01:13:33 +00:00
Bowgo Tsai
9ec99028d2 Merge "fs_mgr: adds/changes some public APIs for early mount in init" am: d9b45c5811 am: 951427906d
am: 947210be92

Change-Id: I377a388beaa8816b322d10e8fc033d702ba61397
2017-04-14 00:31:25 +00:00
Bowgo Tsai
947210be92 Merge "fs_mgr: adds/changes some public APIs for early mount in init" am: d9b45c5811
am: 951427906d

Change-Id: I4391eb5b67cab4643c7dad2755023d0c1c3cb678
2017-04-14 00:25:02 +00:00
Bowgo Tsai
951427906d Merge "fs_mgr: adds/changes some public APIs for early mount in init"
am: d9b45c5811

Change-Id: I45bb6a8b651c76c09e2aee5d0b1105aadf1d009f
2017-04-14 00:18:26 +00:00
Treehugger Robot
d9b45c5811 Merge "fs_mgr: adds/changes some public APIs for early mount in init" 2017-04-14 00:10:02 +00:00
Todd Poynor
e1e6edcf33 init.rc: create /data/misc/reboot owned by system
Directory will be read and modified by system uid.

Bug: 37251463
Test: Manual: reboot and inspect
Change-Id: I76212f65af991ff9ad0969b9c0b8460b80fb9cd2
2017-04-13 15:48:11 -07:00
Todd Poynor
dff584659c reboot: fix owner and permissions of last_reboot_reason file
Default signature WriteStringToFile creates world-writeable files.
Set owner and group system and remove read/write for non-owner.

Bug: 37251463
Test: Manual: reboot, inspect
Change-Id: I6a29c678168dcae611b120dc52170f4eee7069a9
2017-04-13 15:48:11 -07:00
Tom Cherry
aa85663027 Merge changes Ie5ec609a,I5a2ac369,I690137b5 am: 659b78ed10 am: 01b87aac9c
am: 8d9eee4f2b

Change-Id: I5cd7d00f71bfd3970189481f381629cedc358c9b
2017-04-13 21:45:58 +00:00
Keun-young Park
72b8964110 use s_max_mnt_count to detect mke2fs generated partition
am: 1c438c1baa

Change-Id: I756e853149242eadb9e8ab0c3dd6855cc1b6ccb3
2017-04-13 21:42:56 +00:00
Tom Cherry
8d9eee4f2b Merge changes Ie5ec609a,I5a2ac369,I690137b5 am: 659b78ed10
am: 01b87aac9c

Change-Id: I283f720675ee25f9d0ec11c8e8468fbb2473613a
2017-04-13 21:39:52 +00:00
Tom Cherry
01b87aac9c Merge changes Ie5ec609a,I5a2ac369,I690137b5
am: 659b78ed10

Change-Id: I95c78e2f20e9a420855bcdbc08c8b0c3d6094a31
2017-04-13 21:33:30 +00:00
Tom Cherry
659b78ed10 Merge changes Ie5ec609a,I5a2ac369,I690137b5
* changes:
  ueventd: Fix up string handling in handle_*_device_event()
  ueventd: convert mkdir_recursive() to std::string
  ueventd: move subsystem logic from code to ueventd.rc
2017-04-13 21:22:45 +00:00
Wei Wang
00cdc10662 init.rc: start all 3 servicemanagers early
With the binder traffic of composer moved to vndbinder,
vndservicemanager is needed to be started early to get bootanim
displayed quickly.

Also servicemanager is required to be start early to support early
bootanim and sufaceflinger.

Bug: 37306311
Test: bootanim regression fixed
Change-Id: Ice1e05bdb3fe4e67a63a49f1db8afdb018c7b61b
2017-04-13 21:06:17 +00:00
Bowgo Tsai
40ead9f41c Merge "fs_mgr_avb: refactors how vbmeta is loaded" am: fc500ddb52 am: a6db40c7cd
am: 0265f55b44

Change-Id: I4389b2d95fe1a7216e36422359311f23d6a0e768
2017-04-13 20:21:11 +00:00
Bowgo Tsai
0265f55b44 Merge "fs_mgr_avb: refactors how vbmeta is loaded" am: fc500ddb52
am: a6db40c7cd

Change-Id: I353b7601d616aa736d82659ad90c4828aec07383
2017-04-13 20:15:05 +00:00
Bowgo Tsai
a6db40c7cd Merge "fs_mgr_avb: refactors how vbmeta is loaded"
am: fc500ddb52

Change-Id: Ia964c5180682a5b3929b11f801d943024e8db2f7
2017-04-13 20:09:27 +00:00
Treehugger Robot
fc500ddb52 Merge "fs_mgr_avb: refactors how vbmeta is loaded" 2017-04-13 19:58:37 +00:00
Steven Moreland
b084bc3545 libutils: export system_headers
vendor + vendor_available modules built with BOARD_VNDK_VERSION :=
current aren't allowed to use global headers. Since libutils uses
system headers itself, it should export them as well.

Also added some items into windows-deprecated.h. This file is supposed
to be in sync with the libnativewindow variant until all dependencies on
it can be fixed. However, it is missing some updates. This matters when
including libsystem_headers adds system headers before libnativewindow
headers in the lookup paths.

Bug: 33241851
Test: building with BOARD_VNDK_VERSION := current produces many fewer
errors.

Change-Id: I950821f1dae3ddc110db50869247913d5b1aa638
2017-04-13 12:05:16 -07:00
Jeffrey Vander Stoep
be2bfc55f7 Merge "init: expand generated attributes on sepolicy compile" into oc-dev
am: 57d4c59559

Change-Id: If3230f31ab3d680c411351d61dc68e5963355d33
2017-04-13 18:37:43 +00:00
Keun-young Park
1c438c1baa use s_max_mnt_count to detect mke2fs generated partition
- Old tool will set it to 10 while mke2fs will set it to -1.
- For now, only tag it.
- TODO: possibly add different policy per image tool version.

bug: 32246772
Test: check dmesg after reboot

(cherry picked from commit 95e233f9ff)

Change-Id: Icd4758e240009d7b37df2d8a0e2a20d5ddbe4906
2017-04-13 11:32:53 -07:00
Jeffrey Vander Stoep
57d4c59559 Merge "init: expand generated attributes on sepolicy compile" into oc-dev 2017-04-13 18:11:08 +00:00
Jeff Vander Stoep
d278253378 init: expand generated attributes on sepolicy compile
Expand auto generated attributes in selinux policy when doing
on-device compile of platform + vendor selinux policy.

Bug: 3650825
Test: Build and boot Marlin
Change-Id: Icc1c3af0b504236ae13fd8a5155c2109befd7688
2017-04-13 17:32:51 +00:00
Vijay Venkatraman
80ea0166f2 Merge "Moved include/backtrace to libbacktrace/include" into oc-dev
am: 95f9a9678d  -s ours

Change-Id: Idf9849a35af69c7ca98bc15be1a7d110b0b155da
2017-04-13 17:27:30 +00:00
Vijay Venkatraman
95f9a9678d Merge "Moved include/backtrace to libbacktrace/include" into oc-dev 2017-04-13 16:53:13 +00:00
Vijay Venkatraman
a130b80069 Moved include/backtrace to libbacktrace/include
Export libbacktrace_headers

cherry-pick from commit 8f2c28d572

Bug: 33241851
Test: Build sailfish
Change-Id: Ied4168425ded95724d051ffdc9965c5927bc05ae
Merged-In: Iba310ffc21d17ba542bed954a960ab305037061c
2017-04-13 09:26:20 -07:00
Bowgo Tsai
08d996678c Merge "fs_mgr: adding fs_mgr_get_slot_suffix() public API" am: b26f48f135 am: 4c96971cee
am: e203dbb2f6

Change-Id: Icca6f2dac8c9bef0d3b1d0d2202371f3e101be19
2017-04-13 13:56:54 +00:00
Bowgo Tsai
e203dbb2f6 Merge "fs_mgr: adding fs_mgr_get_slot_suffix() public API" am: b26f48f135
am: 4c96971cee

Change-Id: Icad63b84bb6de85b1a73db84a784ad8b5bdb0f38
2017-04-13 13:50:49 +00:00
Bowgo Tsai
4c96971cee Merge "fs_mgr: adding fs_mgr_get_slot_suffix() public API"
am: b26f48f135

Change-Id: I201aa8370395eca0ce63c6912df977019c2c2f3b
2017-04-13 13:42:49 +00:00
Treehugger Robot
b26f48f135 Merge "fs_mgr: adding fs_mgr_get_slot_suffix() public API" 2017-04-13 13:26:42 +00:00
Bowgo Tsai
80d1ad17ed fs_mgr: adds/changes some public APIs for early mount in init
Several changes in this CL:
  - Moves class FsManagerAvbHandle to public API
  - Adds a parameter 'wait_for_verity_dev' for FsManagerAvbHandle::SetUpAvb()
    to allow not to wait for verity device gets created
  - Adds FsManagerAvbHandle::AvbHashtreeDisabled() to query whether AVB is disabled
  - Adds fs_mgr_is_avb() to query whether a fstab_rec has MF_AVB flag

Bug: 33254008
Test: test AVB on bullhead
Change-Id: I89c43ca574ae632db8a700fc2590a1f80212c993
2017-04-13 18:29:10 +08:00
Bowgo Tsai
95c966a859 fs_mgr_avb: refactors how vbmeta is loaded
Adds two classes FsManagerAvbhandle and FsManagerAvbVerifier to replace the
following functions or struct:

    - fs_mgr_load_vbmeta_images() -> FsManagerAvbhandle::Open()
    - fs_mgr_unload_vbmeta_images() -> deleted
    - fs_mgr_setup_avb() -> FsManagerAvbhandle::SetUpAvb()

    - androidboot_vbmeta -> FsManagerAvbVerifier
    - load_vbmeta_prop() -> FsManagerAvbVerifier::Create()
    - verify_vbmeta_images() -> FsManagerAvbVerifier::VerifyVbmetaImages()

And only invokes FsManagerAvbhandle::Open() when there is a fstab entry having
'avb' flag (need HASHTREE descriptor). fs_mgr_is_avb_used() can be
removed as it only checks system property "ro.boot.vbmeta.hash_alg" to
decide whether vbmeta needs to be loaded, which might not be accurate.

For example, there are only HASH descriptors in the verified chain but
no HASHTREE descriptors. In this case, the fs_mgr doesn't have to do
anything because it only takes care of HASHTREE descriptors.

Also adds a new class FsManagerAvbOps to provide the C++ binding
FsManagerAvbOps::AvbSlotVerify() for libavb->avb_slot_verify().

Bug: 33254008
Test: test AVB on bullhead
Change-Id: I8fe15ba01c277152630a2a5c1c5c7f25fbf34030
2017-04-13 18:28:53 +08:00
Bowgo Tsai
87d0836cda fs_mgr: adding fs_mgr_get_slot_suffix() public API
The function returns "_a" or "_b" based on two possible values in
kernel cmdline:

  - androidboot.slot = a or b OR
  - androidboot.slot_suffix = _a or _b

Bug: 33254008
Bug: 36533366
Test: boot sailfish
Change-Id: Ia0a524e4145ebf61af5821f42ecad212c95ed748
2017-04-13 18:28:48 +08:00
Hidehiko Abe
035224e3c5 Merge "Force set timezone to UTC in logd." am: 0de940c26d am: 5cadd1399b
am: 8becca0b44

Change-Id: Ib06e78dedd61899a65181bb00e4fd20c0c69f555
2017-04-13 07:33:28 +00:00
Hidehiko Abe
8becca0b44 Merge "Force set timezone to UTC in logd." am: 0de940c26d
am: 5cadd1399b

Change-Id: I3b3f9af4e461fab3cde1dca2d4a7785a5ce84089
2017-04-13 07:26:53 +00:00
Hidehiko Abe
5cadd1399b Merge "Force set timezone to UTC in logd."
am: 0de940c26d

Change-Id: I2c68d784b134461bd82bc1d8fe05f95b1ad98225
2017-04-13 07:21:24 +00:00
Treehugger Robot
0de940c26d Merge "Force set timezone to UTC in logd." 2017-04-13 07:14:02 +00:00
Steven Moreland
246704f902 Merge "libutils: mark as vendor_available" into oc-dev
am: bed3cbd8ac

Change-Id: Ia9537e563c9ad050fe2f6629a7705e081fe864c1
2017-04-13 05:06:35 +00:00
TreeHugger Robot
bed3cbd8ac Merge "libutils: mark as vendor_available" into oc-dev 2017-04-13 04:55:20 +00:00
Martijn Coenen
30ec708335 Merge "restorecon hwservice_contexts." into oc-dev
am: f8952a196c

Change-Id: If828fe3afd399f15fcc351f39dc0cdc7531ed635
2017-04-13 03:43:51 +00:00
Martijn Coenen
f8952a196c Merge "restorecon hwservice_contexts." into oc-dev 2017-04-13 03:34:48 +00:00
Steven Moreland
5a8c9a1f6e Merge "libutils: mark as vendor_available" am: 86c725a4c2 am: 7c8b168c4e
am: 45d079ac73

Change-Id: If00a7cc3e30d130230375e92452bbc966f425a5c
2017-04-13 02:04:35 +00:00
Steven Moreland
45d079ac73 Merge "libutils: mark as vendor_available" am: 86c725a4c2
am: 7c8b168c4e

Change-Id: Ie78167b0b908bf97fa018c03ec1c07d8be6158f6
2017-04-13 01:58:29 +00:00
Steven Moreland
7c8b168c4e Merge "libutils: mark as vendor_available"
am: 86c725a4c2

Change-Id: I8e46dc744dca4d0d3400fe1f8325c43ee3d03677
2017-04-13 01:52:29 +00:00
Treehugger Robot
86c725a4c2 Merge "libutils: mark as vendor_available" 2017-04-13 01:40:56 +00:00
Martijn Coenen
6887273a28 restorecon hwservice_contexts.
Test: marlin boots, angler boots
Bug: 34454312
Change-Id: I5da8b0b10a7a4c0e6e0c9aea39004852889e8d97
2017-04-12 18:02:33 -07:00