Commit graph

1023 commits

Author SHA1 Message Date
Nick Desaulniers
4f4a2baa21 Merge "Enable metadata encryption" 2017-04-28 21:29:29 +00:00
Paul Lawrence
2bf87eebe4 Enable metadata encryption
Bug: 26778031
Test: Boots, reboots, sector 0 of userdata encrypted
      Make sure an FDE device, both default and password protected,
      boots.
      Make sure an FBE device without metadata encryption boots.
Change-Id: I55135f2d81002f4010a857c021ee840f792f7917
2017-04-28 17:26:30 +00:00
Abodunrinwa Toki
552a4c10b3 Merge "Initialize textclassifier model update directory" am: a079e453a3 am: f566376046
am: d13dca13e8

Change-Id: Icb4af42818bd715709858abfb75e610c52ce48db
2017-04-28 00:44:54 +00:00
Abodunrinwa Toki
40673e3381 Initialize textclassifier model update directory
Test: Builds successfully. Directory is initialized on install. Tests pass.
bit FrameworksCoreTests:android.view.textclassifier.TextClassificationManagerTest
Bug: 34780396

Change-Id: Icbf7962f11b66579931f48053132da6e03e62c61
2017-04-27 22:56:43 +01:00
Wei Wang
b0d85903cd Merge "Revert "Revert "Ensure update_verifier run before zygote""" am: 5fe07acd07 am: 0380041304
am: b8fdeb4c5a

Change-Id: Ief5492dd4b08de351c5ef8c72aeb3ffb09f6feff
2017-04-25 17:46:07 +00:00
Wei Wang
35a2ee84d5 Revert "Revert "Ensure update_verifier run before zygote""
This reverts commit 2de3344180.

Change-Id: Ifc49bf389ed43a56baf5bb55d5f2028b8725083d
2017-04-24 21:33:12 +00:00
Keun-young Park
1a6eb1628c Merge "Revert "Ensure update_verifier run before zygote"" am: a037bddd8a am: 615211301e
am: 2e211888c0

Change-Id: Ie9eb8fc13d35a615ff14d120816e675d8ea20f2b
2017-04-22 01:12:06 +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
Wei Wang
1214e236eb Merge "Ensure update_verifier run before zygote" am: a42ec8a9e3 am: 29a0f68c11
am: 73fc12cbda

Change-Id: Ife005b30f6115747309f0b3f096f5380e17f192a
2017-04-21 22:28:27 +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
93ee9b3cb3 Merge "early start zygote_secondary as well" am: a0bf415cad am: b7896f0a0d
am: 1abccccb71

Change-Id: I0bf50e54aacc5cd2f967c44dd5176800ee69a695
2017-04-21 17:07:33 +00:00
Keun-young Park
f8532445b4 early start zygote_secondary as well
- late start of zygote_secondary leads into occasional
  1 second wait for starting system service.
- Early start secondary zygote so that there is no additional
  wait.

bug: 37508384
Test: python packages/services/Car/tools/bootanalyze/bootanalyze.py -r -c packages/services/Car/tools/bootanalyze/config.yaml -n 100 -f -e 16 -w 30
Change-Id: I2e4eb0b59a9a8417b56a72fe2de6fa2a6e1ab0a2
2017-04-20 18:31:48 -07:00
Mark Salyzyn
e4f22b16a5 Merge "init.rc: move load_system_props to beginning of 'on fs'" am: 798ac73dcf am: 03393e6f63
am: 925a895266

Change-Id: I4ea086b0fcf12a0d5df279712807e4e44e82f955
2017-04-19 16:47:51 +00:00
Mark Salyzyn
3510359a3c init.rc: move load_system_props to beginning of 'on fs'
ro.logd.kernel, ro.config.low_ram, ro.logd.timestamp and ro.debuggable
need to be retrieved prior to logd start in order for the service to
behave in a configured manner.  Other essential services are also
dependent on these system properties as well, so it just makes sense
to pick them all up first in 'on fs'.

Test: smoke test
Bug: 37425809
Change-Id: I33ad185f397ee527ed3c84cc2bcb40ff8ca785b5
2017-04-19 14:55:35 +00:00
Tom Cherry
1f49801ab1 Merge "init: handle sys.powerctl immediately" am: 14ed55bae8 am: e6bfb53196
am: 8972f887d2

Change-Id: I3af0841fc3c23e2758ec5f330e9ba03f7695d50f
2017-04-18 18:33:17 +00:00
Tom Cherry
14ed55bae8 Merge "init: handle sys.powerctl immediately" 2017-04-18 18:14:18 +00:00
Tom Cherry
98ad32a967 init: handle sys.powerctl immediately
Currently if a process sets the sys.powerctl property, init adds this
property change into the event queue, just like any other property.
The actual logic to shutdown the device is not executed until init
gets to the action associated with the property change.

This is bad for multiple reasons, but explicitly causes deadlock in
the follow scenario:

A service is started with `exec` or `exec_start`
The same service sets sys.powerctl indicating to the system to
shutdown
The same service then waits infinitely

In this case, init doesn't process any further commands until the exec
service completes, including the command to reboot the device.

This change causes init to immediately handle sys.powerctl and reboot
the device regardless of the state of the event queue, wait for exec,
or wait for property conditions.

Bug: 37209359
Bug: 37415192

Test: Init reboots normally
Test: Update verifier can reboot the system
Change-Id: Iff2295aed970840f47e56c4bacc93001b791fa35
2017-04-17 16:40:06 -07:00
Wei Wang
c9c66cd486 Merge "init.rc: set initial cpuset to all cores" am: 66f44d823f am: eb9ddd14f1
am: d7652f553c

Change-Id: I1e1fee25ddd8f990dac12712dc1ae1955736f2d8
2017-04-17 20:29:05 +00:00
Wei Wang
66f44d823f Merge "init.rc: set initial cpuset to all cores" 2017-04-17 20:01:43 +00:00
Wei Wang
2e83b86a8a init.rc: set initial cpuset to all cores
Starting zygote early requires cpuset to be initialized to all cores for
foreground cpuset. Change to expolit all cores by default at boot and
let device manufacturers override to proper values in device specific
init script.

Bug: 36576280
Test: marlin boot fast and checked cpuset during early boot
Change-Id: I2c1ce0630e58a7b04d1a453c6740d3f0bce9de9f
2017-04-14 15:03:29 -07: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
Todd Poynor
e092b72bf4 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 18:01:13 -07: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
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
Jaesoo Lee
dcf4d19dd9 disable module loading after BOOT_COMPLETED broadcast
This CL disables module loading by writing 1 to
/proc/sys/kernel/modules_disabled when the property sys.boot_completed
is set to 1 by ActivityManagerService (at the broadcast of
PHASE_BOOT_COMPLETED).

Bug: 36515654
Test: tested on sailfish and verified that module loading is disabled in
userdebug and enabled in eng mode
Merged-In: Id38d34a6395966ab21e440614337c0cfca791ad0
(cherry picked from commit 6ed19d1675)

Change-Id: I2faa459b450b3a64f854c832c6b91cbf682bbffa
2017-04-12 10:08:26 +09:00
Jaesoo Lee
6ed19d1675 disable module loading after BOOT_COMPLETED broadcast
This CL disables module loading by writing 1 to
/proc/sys/kernel/modules_disabled when the property sys.boot_completed
is set to 1 by ActivityManagerService (at the broadcast of
PHASE_BOOT_COMPLETED).

Bug: 36515654
Test: tested on sailfish and verified that module loading is disabled in
userdebug and enabled in eng mode
Change-Id: Id38d34a6395966ab21e440614337c0cfca791ad0
2017-04-11 10:22:47 +09:00
Janis Danisevskis
ec0ab6524e Move early_hal start to late-fs trigger action
The class early_hal is essentially for the keymaster hal which needs
to be up before vold tries to unlock a storage encryption key (FDE or
FBE). The current position is too early in the boot process, because
on devices with legacy HAL the wrapper service uses system properties
to find the legacy HAL.

This patch moves the start of the early_hal class to the late-fs trigger
action which runs right after the system property action.

Test: Manually tested and update tested on bullhead, sailfish, and
      another device.
Bug: 35764921

Change-Id: I34b45b85f8450e9ef18861535fdb2ee963df8c9b
(cherry picked from commit 1ad8d21947)
2017-04-07 15:28:56 -07:00
Janis Danisevskis
1ad8d21947 Move early_hal start to late-fs trigger action
The class early_hal is essentially for the keymaster hal which needs
to be up before vold tries to unlock a storage encryption key (FDE or
FBE). The current position is too early in the boot process, because
on devices with legacy HAL the wrapper service uses system properties
to find the legacy HAL.

This patch moves the start of the early_hal class to the late-fs trigger
action which runs right after the system property action.

Test: Manually tested and update tested on bullhead, sailfish, and
      another device.
Bug: 35764921

Change-Id: I34b45b85f8450e9ef18861535fdb2ee963df8c9b
2017-04-07 02:30:18 +00:00
Steven Moreland
38b5735987 init.rc: add class_start early_hal
This class is used to start hals which are required in order to mount
data (for instance keymaster).

Test: works to start early_hal in internal
Bug: 36278706
Change-Id: If06908135e59b187683d8cf4cc4a00b490559081
(cherry picked from commit 5d56bad4bd)
2017-04-04 15:35:05 -07:00
Steven Moreland
5d56bad4bd init.rc: add class_start early_hal
This class is used to start hals which are required in order to mount
data (for instance keymaster).

Test: works to start early_hal in internal
Bug: 36278706
Change-Id: If06908135e59b187683d8cf4cc4a00b490559081
2017-04-04 21:22:47 +00:00
Tom Cherry
aaeb792312 init.rc: launch update_verifier with exec_start
This allows update_verifier to raise it's priority and ioprio.

Bug: 36511808
Bug: 36102163
Test: Boot bullhead
Test: Verify boottime decrease on sailfish
Change-Id: I5710c6a98dc7acee9063d1fa1d1c80668f0f1528
(cherry picked from commit 1e2d8c7fce)
2017-03-29 13:37:54 -07:00
Tom Cherry
1e2d8c7fce init.rc: launch update_verifier with exec_start
This allows update_verifier to raise it's priority and ioprio.

Bug: 36511808
Bug: 36102163
Test: Boot bullhead
Test: Verify boottime decrease on sailfish
Change-Id: I5710c6a98dc7acee9063d1fa1d1c80668f0f1528
2017-03-28 15:54:45 -07:00
Steven Moreland
da48f4938a Merge "Revert "Revert "Start hwservicemanager earlier.""" am: ca622b4e78 am: e326cb121e
am: 352b3d737c

Change-Id: I7cb77ed1a7e4d7d8cee945a1ddee0c448f350452
2017-03-27 17:37:30 +00:00
Steven Moreland
d627502bb0 Revert "Revert "Start hwservicemanager earlier.""
This reverts commit 5011270225.

Now starting even earlier.

Reason for revert: Needed change, reverted b/c broken device.

Bug: 36278706
Test: original DOA device boots
Test: angler, bullhead, fugu, marlin, ryu
Test: all these devices boot with wipe
Test: all these devices boot with w/o wipe
Test: lshal shows all included services

Change-Id: Ic639aedf7834b1bd3a26d23d109727f5559317e9
2017-03-24 20:52:44 -07:00
Thierry Strudel
7d84086639 Merge "Revert "Start hwservicemanager earlier."" am: 3ba313597d am: 263cf5c8d9
am: ea6de14c5e

Change-Id: Ia0b57d328df2fc47e7f5dee35930e43bb514c4f5
2017-03-24 14:42:14 +00:00
Thierry Strudel
3ba313597d Merge "Revert "Start hwservicemanager earlier."" 2017-03-24 14:33:18 +00:00
Steven Moreland
5011270225 Revert "Start hwservicemanager earlier."
This reverts commit 9e36331174.

Reason for revert: a DOA device

Bug: 36546734

Change-Id: I0456247d362fe43b8c37623d04432eb494f68f68
2017-03-24 06:05:41 +00:00
Jeff Vander Stoep
5659c9cf1d Merge "Create dir in /data for vendor customization" am: c39a31f002 am: bfc4da8369
am: bc4d384d49

Change-Id: Ic14d961fb28c1cbad6a2082a321a679580a69d2c
2017-03-23 19:48:45 +00:00
Treehugger Robot
c39a31f002 Merge "Create dir in /data for vendor customization" 2017-03-23 19:36:52 +00:00
Jeff Vander Stoep
61efb0dab8 Create dir in /data for vendor customization
Vendor owns /data/vendor.

HAL data must go in /data/vendor/hardware/.

Bug: 34980020
Test: build and boot AOSP Marlin. Observe /data/vendor and
      /data/vendor/hardware exist and are empty.
Change-Id: I6fe96e3c76a10a5eb480ba10e10d4d006de56c12
2017-03-23 10:30:34 -07:00
Steven Moreland
2b9a3391d0 Merge "Start hwservicemanager earlier." am: fcd509298d am: 0a85db775e
am: 6c546660d9

Change-Id: Ifd4e04fef289f8ece3884434efa1a3c6d47890fa
2017-03-23 03:53:01 +00:00
Treehugger Robot
fcd509298d Merge "Start hwservicemanager earlier." 2017-03-23 03:39:40 +00:00
Steven Moreland
9e36331174 Start hwservicemanager earlier.
Also start hals where hwservicemanager was started before.

Bug: 36278706
Test: internal marlin+angler boots
Change-Id: Ia55d2ef747fcbd086a09e1bb856824b14343118b
2017-03-22 11:19:31 -07:00
Wei Wang
33a55b3d52 init.rc: remove bg_non_interactive cgroup am: a27a91a5fd am: 20943abad0
am: 7d4d63ca18

Change-Id: I5c1d3a860c64dae63be5edcc91734805863d6f85
2017-03-22 00:34:33 +00:00
Wei Wang
a27a91a5fd init.rc: remove bg_non_interactive cgroup
We have seen cases when threads in this cgroup not scheduled for more than
a few seconds in heavy workload situation and causing device freeze.
In Linux, multiple threads placed in ROOT cgroup cause the CPU resource to
be split per thread, rather than per group.
Currently we have many threads in ROOT cgroup, which makes threads in
bg_non_interactive cgroup to have "tiny" CPU resource other than 5%
quota defined.

Bug: 34193533
Test: on marlin
Change-Id: I7721f6196560fbedf6265e8b6db130cec9edefd7
2017-03-20 22:13:07 -07:00
David Lin
a44f638a01 Merge "init.rc: enable ledtrig-transient support for vibrator" am: 75b66a6f2a am: 64af4183a1
am: f357e1989a

Change-Id: I98daea756aceeaeaca099bfb6dd668c68c58a8dd
2017-03-11 01:35:24 +00:00
Treehugger Robot
75b66a6f2a Merge "init.rc: enable ledtrig-transient support for vibrator" 2017-03-11 01:23:18 +00:00
Wei Wang
8c1e3292a8 Merge "init.rc: make sure netd start after post-fs-data" am: f58280e7dc am: 449b59873f
am: 07ace62093

Change-Id: I68103aafa9a23e0bf177d91544e4fbd743d222e4
2017-03-09 23:56:30 +00:00
Wei Wang
bae9ba3402 init.rc: make sure netd start after post-fs-data
Current init doesn't order the triggeres it scaned, and there is no
guarantee that general event trigger exec first and then event+property
triggers.

This CL will make sure netd started after post-fs-data trigger is done.

Bug: 35110957
Test: marlin boots
Change-Id: I7bb55af4e00f336682388abfa8a06eac2136b7d4
2017-03-09 13:53:39 -08:00
David Lin
27b2c1e678 init.rc: enable ledtrig-transient support for vibrator
This change makes the init process to always attempts to enable
transient trigger for vibrator. This allows the exported properties to
change the ownership later at the on boot stage.

Test: device vibrates with the driver supports ledtrig-transient

Change-Id: If5eb7b7feaefe803f2ead634fbe4fc7b48da84ea
Signed-off-by: David Lin <dtwlin@google.com>
2017-03-09 18:42:33 +00:00