Commit graph

29923 commits

Author SHA1 Message Date
Steven Moreland
adec9f59cd Merge "libsysutils: Android.mk -> Android.bp" am: d0013343e9
am: 01ff125c20

Change-Id: I191ed9297797e9ab014d00cb96a8c319184e487e
2017-04-25 16:37:56 +00:00
Steven Moreland
01ff125c20 Merge "libsysutils: Android.mk -> Android.bp"
am: d0013343e9

Change-Id: I45eb8746984691971b5370b43c90a2c4db23a26d
2017-04-25 16:35:54 +00:00
Treehugger Robot
d0013343e9 Merge "libsysutils: Android.mk -> Android.bp" 2017-04-25 16:32:49 +00:00
Jaekyun Seok
33e7e21645 Merge "Update persist.sys.usb.config on runtime" am: 41346e553b
am: ac945881b3

Change-Id: I32d78d88863fdae54663b5177d450a0c8d037ae1
2017-04-25 04:00:35 +00:00
Jaekyun Seok
ac945881b3 Merge "Update persist.sys.usb.config on runtime"
am: 41346e553b

Change-Id: I950b791f00fbbb72dca2154df7ea8dc055373257
2017-04-25 03:58:33 +00:00
Treehugger Robot
41346e553b Merge "Update persist.sys.usb.config on runtime" 2017-04-25 03:51:17 +00:00
Jaekyun Seok
0cf3a07e14 Update persist.sys.usb.config on runtime
persist.sys.usb.config values can't be combined on build-time when
property files are split into each partition.
So we need to apply the same rule of
build/make/tools/post_process_props.py on runtime.

Test: building succeeded and tested on sailfish.
Bug: 37617113
Bug: 37648659

Change-Id: I78cdffee446d3ae6a89f138faed5f3149e4b507d
2017-04-25 01:31:19 +00:00
Bowgo Tsai
aacfa4f8c2 Merge "init: set ro.boot.avb_version in recovery mode" am: f1bd536efd
am: a1da077454

Change-Id: I277fa4c53e1f9669483fd01bed610eca0170de2c
2017-04-25 00:39:37 +00:00
Bowgo Tsai
47fe14b456 Merge "init: moving early mount logic into init_first_stage.cpp" am: bcd36a20d4
am: 2d7818a104

Change-Id: Ia85b043c2db96ad893983af34c338901c4a9e435
2017-04-25 00:39:21 +00:00
Bowgo Tsai
a1da077454 Merge "init: set ro.boot.avb_version in recovery mode"
am: f1bd536efd

Change-Id: I50c39b6d6f6b0e24e9b4688f98fecf30ebbcd0c9
2017-04-25 00:37:40 +00:00
Bowgo Tsai
2d7818a104 Merge "init: moving early mount logic into init_first_stage.cpp"
am: bcd36a20d4

Change-Id: I8f8f2dde261ef8322c904bfaa66ab1e0fe9c5a85
2017-04-25 00:37:21 +00:00
Treehugger Robot
f1bd536efd Merge "init: set ro.boot.avb_version in recovery mode" 2017-04-25 00:31:41 +00:00
Treehugger Robot
bcd36a20d4 Merge "init: moving early mount logic into init_first_stage.cpp" 2017-04-25 00:31:27 +00:00
Steven Moreland
d0d759dc09 libsysutils: Android.mk -> Android.bp
Test: links
Change-Id: If1d034ecb880e8c41d58b14ebebcda5b72e88424
2017-04-24 17:15:31 -07:00
Mark Salyzyn
614baba5fa Merge "Revert "logd: add Chattiest LOG_TAG statistics"" am: 5002a48cee
am: 74b66822d2

Change-Id: If8a4a0de8350b39e77d4d78383aa922a18663b46
2017-04-24 20:15:37 +00:00
Mark Salyzyn
74b66822d2 Merge "Revert "logd: add Chattiest LOG_TAG statistics""
am: 5002a48cee

Change-Id: I36e508b03c1e1e2ca83f9c14aaba7daee5b49325
2017-04-24 20:07:51 +00:00
Mark Salyzyn
5002a48cee Merge "Revert "logd: add Chattiest LOG_TAG statistics"" 2017-04-24 19:54:25 +00:00
Mark Salyzyn
afd7e70553 Revert "logd: add Chattiest LOG_TAG statistics"
This reverts commit 903156ddaa.

Test: compile
Bug: 37254265
Change-Id: If9af79684119861ceecf4f88a4a4c84f991b188a
2017-04-24 19:52:33 +00:00
Tom Cherry
fea35fc7e4 Merge changes Ic446c026,I86568a5b am: 51b7cb006f
am: 41dbec9791

Change-Id: I597c7cd6e7c52760d56545891dbc2a671eafb430
2017-04-24 19:15:17 +00:00
Mark Salyzyn
ae1d2e0e83 Merge "logd: add Chattiest LOG_TAG statistics" am: 39aee46352
am: c26df4fa0f

Change-Id: I31af54d5ecca20cf8e1e3cdc41aaeff3feca3d64
2017-04-24 19:14:58 +00:00
Tom Cherry
41dbec9791 Merge changes Ic446c026,I86568a5b
am: 51b7cb006f

Change-Id: Ia0a69e72bdc4ff7ded9ce7ce2aa183d401441b9a
2017-04-24 19:01:28 +00:00
Mark Salyzyn
c26df4fa0f Merge "logd: add Chattiest LOG_TAG statistics"
am: 39aee46352

Change-Id: Ibf4d87a0ba42c9a2a0ec3bdd5a16b5d29f37618c
2017-04-24 19:01:05 +00:00
Tom Cherry
51b7cb006f Merge changes Ic446c026,I86568a5b
* changes:
  init: create init_tests.cpp
  init: clean up the SectionParser interface and Parser class
2017-04-24 18:02:05 +00:00
Bowgo Tsai
fd18a452be init: set ro.boot.avb_version in recovery mode
Previously we set ro.boot.avb_version during the first stage mount in normal mode:
  - https://android-review.googlesource.com/#/c/371774/

As the first stage mount is not performed in recovery mode, we need to set the
property separately in recovery mode.

Bug: 37414003

Test: first stage mount /vendor with vboot 2.0 (avb) on bullhead in normal mode
Test: first stage mount /system with without verity on bullhead in normal mode
Test: checks ro.boot.avb_version is 1.0 on bullhead in recovery mode

Test: first mount /vendor with with vboot 1.0 on sailfish in normal mode
Test: checks ro.boot.avb_version doesn't exist on sailfish in recovery mode

Change-Id: I262e75b8b557c4de7609b4049ccb01793644245e
2017-04-24 23:10:59 +08:00
Bowgo Tsai
d262017fef init: moving early mount logic into init_first_stage.cpp
Also renames "early mount" to "first stage mount" to prevent confusion
with "mount_all --early", which is run in the init second stage.

Also creates a base class: FirstStageMount and two derived classes:
FirstStageMountVBootV1 and FirstStageMountVBootV2 to replace/refactor
existing functions:

   - early_mount() -> DoFirstStageMount() and FirstStageMount::DoFirstStageMount()

   - vboot_1_0_early_partitions -> FirstStageMountVBootV1::GetRequiredDevices()
   - vboot_2_0_early_partitions -> FirstStageMountVBootV2::GetRequiredDevices()

   - vboot_1_0_mount_partitions ->
       FirstStageMount::MountPartitions() and
       FirstStageMountVBootV1::SetUpDmVerity()

   - vboot_2_0_mount_partitions ->
       FirstStageMount::MountPartitions() and
       FirstStageMountVBootV2::SetUpDmVerity()

Bug: 37413399
Test: first stage mount /vendor with vboot 2.0 (avb) on bullhead
Test: first stage mount /system with without verity on bullhead
Test: first stage mount /vendor with with vboot 1.0 on sailfish
Change-Id: I6584bdf7d832c9fbc8740f97c9b8b94e68a90783
2017-04-24 23:10:10 +08:00
Treehugger Robot
39aee46352 Merge "logd: add Chattiest LOG_TAG statistics" 2017-04-24 14:35:36 +00:00
Lorenzo Colitti
87f9ffdac7 Merge "Revert "Make the xtables lock readable only by AID_RADIO and root."" am: d272ca38f6
am: aaa2b30d5c

Change-Id: Iec3b4c60ee07b8208ae55badb5e0df268a4a7178
2017-04-22 04:30:49 +00:00
Lorenzo Colitti
aaa2b30d5c Merge "Revert "Make the xtables lock readable only by AID_RADIO and root.""
am: d272ca38f6

Change-Id: Iaba9526ef774432758bdd03394e999313686973d
2017-04-22 04:27:49 +00:00
Lorenzo Colitti
d272ca38f6 Merge "Revert "Make the xtables lock readable only by AID_RADIO and root."" 2017-04-22 04:21:18 +00:00
Tom Cherry
ad54d094cd init: create init_tests.cpp
Start a init_tests.cpp file for end-to-end tests that parse small init script
segments and verify that they act as expected.

The first tests ensure that the execution order of event triggers
happens appropriately.

Test: Boot bullhead, run unit tests

Change-Id: Ic446c02605ab796fd41e0596ce1fd381aee80ce0
2017-04-21 18:27:42 -07:00
Tom Cherry
30a6f276fd init: clean up the SectionParser interface and Parser class
Remove the dependency on Action and Service from what should be a
generic Parser class.

Make ActionParser, ImportParser, and ServiceParser take a pointer to
their associated classes instead of accessing them through a
singleton.

Misc fixes to SectionParser Interface:
1) Make SectionParser::ParseLineSection() non-const as it always should
have been.
2) Use Rvalue references where appropriate
3) Remove extra std::string& filename in SectionParser::EndFile()
4) Only have SectionParser::ParseSection() as pure virtual

Document SectionParser.

Make ImportParser report the filename and line number of failed imports.

Make ServiceParser report the filename and line number of duplicated services.

Test: Boot bullhead

Change-Id: I86568a5b375fb4f27f4cb235ed1e37635f01d630
2017-04-21 18:26:40 -07:00
Keun-young Park
2e211888c0 Merge "Revert "Ensure update_verifier run before zygote"" am: a037bddd8a
am: 615211301e

Change-Id: I8331e8769b00f50bc4009d935c3bd6c7b6668381
2017-04-22 01:09:37 +00:00
Keun-young Park
615211301e Merge "Revert "Ensure update_verifier run before zygote""
am: a037bddd8a

Change-Id: I535056ddbe20cd43d844167b72840105b13eeb64
2017-04-22 01:05:36 +00:00
Keun-young Park
a037bddd8a Merge "Revert "Ensure update_verifier run before zygote"" 2017-04-22 00:56:48 +00:00
Keun-young Park
2de3344180 Revert "Ensure update_verifier run before zygote"
This reverts commit 5dc05effec.

Change-Id: Ic041860dee8a2993c6b4890beca4da745cfbfb60
2017-04-22 00:43:55 +00:00
Mark Salyzyn
903156ddaa logd: add Chattiest LOG_TAG statistics
Report global LOG_TAG usage.

Test: gTest liblog-unit-tests, logd-unit-tests & logcat-unit-tests
Test: manual: inspect logcat -S results around 'Chattiest TAGs'
Bug: 37254265
Change-Id: I32473a1d9131c87e4fb7841d5cc0ea9cc14c63cd
2017-04-21 15:55:10 -07:00
Wei Wang
73fc12cbda Merge "Ensure update_verifier run before zygote" am: a42ec8a9e3
am: 29a0f68c11

Change-Id: Ic7e700c71062486cc5a281c9fa36c39354893ecf
2017-04-21 22:24:54 +00:00
Wei Wang
29a0f68c11 Merge "Ensure update_verifier run before zygote"
am: a42ec8a9e3

Change-Id: Ifded709acce34be00956567b9599f83bb3f051bf
2017-04-21 22:21:55 +00:00
Treehugger Robot
a42ec8a9e3 Merge "Ensure update_verifier run before zygote" 2017-04-21 22:16:52 +00:00
Wei Wang
5dc05effec Ensure update_verifier run before zygote
Currently zygote is started early for FBE device but update_verifier is run later
which creates a potential risk. This CL ensures update_verifier run before
zygote touches anything within data/ partition. With this change, we also start zygote
early for unencrypted/unsupported encryption state device.

Bug: 37543411
Test: marlin boots
Change-Id: I95daa73bc1a503eecb70d7be78251b74b773abf8
2017-04-21 11:54:55 -07:00
Keun-young Park
1abccccb71 Merge "early start zygote_secondary as well" am: a0bf415cad
am: b7896f0a0d

Change-Id: Ibc070c240c73366e992fd289799b8f618f5e6bb7
2017-04-21 17:04:33 +00:00
Keun-young Park
b7896f0a0d Merge "early start zygote_secondary as well"
am: a0bf415cad

Change-Id: I3b4840313e0b80aa134d2469f8c27b32dd5f1c93
2017-04-21 17:02:03 +00:00
Keun-young Park
a0bf415cad Merge "early start zygote_secondary as well" 2017-04-21 16:49:11 +00:00
Sandeep Patil
dba5e13593 Merge "fs_mgr: remove the repetitive and annoying bootconfig error print" am: 515e7a4fc4
am: d1078c42ce

Change-Id: I2b735716342c046cd160a4a16a16911dbe53574a
2017-04-21 16:42:30 +00:00
Lorenzo Colitti
b6e4b35fe4 Revert "Make the xtables lock readable only by AID_RADIO and root."
This reverts commit 5e801e7bd5.

The file permissions don't allow access to the lock on devices
where vendor code runs with UID root and GID radio. They are
no longer necessary because we have a more flexible selinux-based
solution in https://android-review.googlesource.com/#/c/354223/ .

Test: strace -f -e flock -p <netmgrd_pid> on angler shows flock succeeds
Test: strace -f -e flock -p <netmgrd_pid> on marlin shows flock succeeds
Test: netd_unit_test passes on marlin
Test: strace -f -e flock -p <netd_pid> on marlin shows flock succeeds
Bug: 36108349
Bug: 37483189
Change-Id: Ia1bbf8d93ec6777514be66cbd1a32dfc95df95c0
2017-04-21 16:41:35 +00:00
Sandeep Patil
d1078c42ce Merge "fs_mgr: remove the repetitive and annoying bootconfig error print"
am: 515e7a4fc4

Change-Id: I8cdffd2ab6fc3cc5527d7f8f99f8303ad2c0db35
2017-04-21 16:37:29 +00:00
Treehugger Robot
515e7a4fc4 Merge "fs_mgr: remove the repetitive and annoying bootconfig error print" 2017-04-21 16:29:37 +00:00
Mark Salyzyn
f4589bb613 Merge "liblog: test: liblog.__security miscalculation" am: 3ed85748e1
am: 725526774b

Change-Id: I9027d158e1af9cf270c3c297fcf5fa2dd11ea351
2017-04-21 15:27:26 +00:00
Mark Salyzyn
725526774b Merge "liblog: test: liblog.__security miscalculation"
am: 3ed85748e1

Change-Id: I7f590ae54efd191986b3232fb55d3faf36617007
2017-04-21 15:23:26 +00:00
Treehugger Robot
3ed85748e1 Merge "liblog: test: liblog.__security miscalculation" 2017-04-21 15:17:03 +00:00