Commit graph

1544 commits

Author SHA1 Message Date
Tom Cherry
2920471ffa Merge "Revert "Make /data/data a symlink to /data/user/0"" am: 823816ee9f am: 20a74298a5
am: e4f35b111e

Change-Id: I9fdb4b5d8e6b1dcf89b853a737f389553cc1a1df
2017-05-08 21:00:47 +00:00
Tom Cherry
982e0693ce Revert "Make /data/data a symlink to /data/user/0"
This reverts commit d147cb5887.

Original change breaks AVD
Original changes breaks SF/AF
Bug: 38026755
Bug: 38030346
Bug: 38114264

Change-Id: Iab56244f0dc0f6b0df2916c691277a882fc7d184
2017-05-08 16:06:38 +00:00
Jiyong Park
b2a4b8cd18 libbacktrace is VNDK-SP
libbacktrace and its dependents are now VNDK-SP. Since they are in
/vendor/lib/vndk-sp directory, they are accessible directly from the
vndk namespace. Therefore, libbacktrace is removed from the exported
shared libs list of the default namespace.

Bug: 37413104
Test: sailfish builds and boots
Change-Id: I137c17d55940b783eab6d0125bc4d26b96bcc2f2
2017-05-08 10:40:14 +09:00
Steven Moreland
55337fd5cc Remove redundant dependencies
android.hidl.base@1.0 and android.hidl.manager@1.0 are built into libhidltransport.

Test: boot internal marlin
Bug: 33276472
Change-Id: I32dc22607f2df5c71555161178865900b35fc75b
(cherry picked from commit fa5ea6a81a)
2017-05-04 15:25:02 +00:00
TreeHugger Robot
04df8f456c Merge "Remove redundant dependencies" 2017-05-04 08:56:29 +00:00
Jiyong Park
c1c4dada31 Merge "update /vendor/*/vndk-sp to /system/*/vndk-sp" into oc-dev am: d5398bf97d
am: 874ed5ec96

Change-Id: I965e8ccb742a0133ba75fd913ffd2edb9559359a
2017-05-04 04:27:27 +00:00
Jiyong Park
874ed5ec96 Merge "update /vendor/*/vndk-sp to /system/*/vndk-sp" into oc-dev
am: d5398bf97d

Change-Id: I77ff71643767c0c0933d80d835b648673d68a343
2017-05-04 04:24:57 +00:00
Tom Cherry
4ffa5c5de9 Merge "Make /data/data a symlink to /data/user/0" am: 49bbe16447 am: c43da33005 am: f95686e0cf
am: b4f7e5b0c4

Change-Id: I225a92299452373b3e428b3b303dfb823acd3c6c
2017-05-04 00:01:10 +00:00
Tom Cherry
b4f7e5b0c4 Merge "Make /data/data a symlink to /data/user/0" am: 49bbe16447 am: c43da33005
am: f95686e0cf

Change-Id: I081704dc6d7d60edaca979f6af2b1c4418ebc844
2017-05-03 23:54:23 +00:00
cjbao
d147cb5887 Make /data/data a symlink to /data/user/0
For legacy reason, /data/data is a real dir and /data/user/0 is a
symbolic link to it.  Overhead for linux kernel to walk through
symbolic link is not negligible. This is unnessary overhead to
carry over.  This patch is to make /data/user/0 a a real dir and
make legacy folder /data/data a symbolic link.  OTAed system does
not get impacted.

Test: Manual test
Change-Id: I419564a75f6ebf3154badb8725ba9831164592b6
Signed-off-by: cjbao <cathy.bao@intel.com>
2017-05-03 21:38:31 +00:00
Steven Moreland
fa5ea6a81a Remove redundant dependencies
android.hidl.base@1.0 and android.hidl.manager@1.0 are built into libhidltransport.

Test: boot internal marlin
Bug: 33276472
Change-Id: I32dc22607f2df5c71555161178865900b35fc75b
2017-05-03 10:24:58 -07:00
Jiyong Park
c641e19c7e update /vendor/*/vndk-sp to /system/*/vndk-sp
Some paths weren't updated.

Bug: 37522144
Test: sailfish builds and boots
Change-Id: I7aeb5d6e0d61bbc6bde4e6f221e90b21ca422622
2017-05-03 11:53:03 +09:00
Guang Zhu
82ab44ce09 Merge "Revert "Enable metadata encryption"" 2017-04-29 00:01:35 +00:00
Guang Zhu
9709c5a7ff Revert "Enable metadata encryption"
Bug: 37792477

This reverts commit 2bf87eebe4.

Change-Id: I1a43793beda24c01f0fe9e25a7c183af1200fa76
2017-04-28 23:58:55 +00:00
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
d6ab6456c5 Initialize textclassifier model update directory
Test: Builds successfully. Directory is initialized on install. Tests pass.
bit FrameworksCoreTests:android.view.textclassifier.TextClassificationManagerTest
Bug: 34780396

Merged-In: Icbf7962f11b66579931f48053132da6e03e62c61
Change-Id: Icbf7962f11b66579931f48053132da6e03e62c61
2017-04-28 04:15:57 +01:00
Abodunrinwa Toki
3e6e906448 Merge "Initialize textclassifier model update directory" am: a079e453a3 am: f566376046 am: d13dca13e8
am: 552a4c10b3

Change-Id: I3067795ddd40e8ff1a8eca10fa2188f36c0769ba
2017-04-28 02:30:47 +00:00
Jerry Zhang
af96b5e80b Merge "Move adbd stopped trigger for configfs into core." am: e21b2fb6b4 am: fa14b1de73 am: b3988e670d
am: ee82936ecd

Change-Id: Ib276a0384eafe25d81a684c76f8d5d58a5596414
2017-04-28 02:30:11 +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
Treehugger Robot
a079e453a3 Merge "Initialize textclassifier model update directory" 2017-04-28 00:30:26 +00:00
Jerry Zhang
ee82936ecd Merge "Move adbd stopped trigger for configfs into core." am: e21b2fb6b4 am: fa14b1de73
am: b3988e670d

Change-Id: I303a29c590df9e018d00e18c1818f8ca0f1dd3ce
2017-04-28 00:04:39 +00:00
Jerry Zhang
423af1a86a Merge "Add ffs.mtp.ready triggers to mtp configs." am: a06ac26dd1 am: c6faf65758 am: 78a4f0f567
am: c9fd178fb0

Change-Id: I09be5a5f34f81b8594184cf64d6897349aa9c82f
2017-04-28 00:02:34 +00:00
Jerry Zhang
c9fd178fb0 Merge "Add ffs.mtp.ready triggers to mtp configs." am: a06ac26dd1 am: c6faf65758
am: 78a4f0f567

Change-Id: Ibb785165c83341c098edc254520b0cfeda9c8a79
2017-04-27 22:25:32 +00:00
Jerry Zhang
75f8d89a8a Move adbd stopped trigger for configfs into core.
This trigger resets ffs.ready in situations where
adbd is stopped via commandline.

Test: stop adbd
Change-Id: Ib5028d55c4883a8291d6de2dbcb0641ff8eb7a48
2017-04-27 14:59:48 -07: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
Jiyong Park
b185e01a88 Merge "Relocate VNDK-SP to /system/lib/vndk-sp and add RS libs to VNDK-SP" into oc-dev am: c43a4ad4bc
am: 7eccd838c0

Change-Id: I6a5ec9f6a65ddd39736691c1c208d9ca33ed340c
2017-04-27 01:23:14 +00:00
Jiyong Park
7eccd838c0 Merge "Relocate VNDK-SP to /system/lib/vndk-sp and add RS libs to VNDK-SP" into oc-dev
am: c43a4ad4bc

Change-Id: Ib2c7ba873d7e71aa23bcf28702c2e188f6918c15
2017-04-27 01:12:46 +00:00
Jerry Zhang
fb256b696b Add ffs.mtp.ready triggers to mtp configs.
This allows devices to use functionfs for mtp and ptp instead
of the ordinary functions. The property is set regardless of
which function is enabled so mtp and ptp functions will continue
to work.

Bug: 33220530
Test: use mtp with ffs and non ffs devices
Change-Id: I4527e153bd10ef1e262e487482ae455835d1c698
2017-04-26 17:11:50 -07:00
Andreas Gampe
8252e664f3 Merge "Linker: Add ASAN support to treble ld.config" into oc-dev
am: 57e3528d2e

Change-Id: I694aaf1f3307270f973845644dedf51786dcc6cd
2017-04-26 00:39:02 +00:00
Jiyong Park
bfa03ee9dc Relocate VNDK-SP to /system/lib/vndk-sp and add RS libs to VNDK-SP
VNDK-SP is relocated back to /system partition from /vendor partition,
following the original design.

In addition, the namespace for RenderScript is added. The namespace is
dedicated for loading VNDK-SP libs for RenderScript such as
libRS_internal.so. The reason for having a separate namespace is that
RenderScript requires more permitted paths (/data/*) which should not be
allowed for normal SP-HALs.

Bug: 37522144
Bug: 37550338
Test: sailfish builds and boots well
Test: lsof shows VNDK-SP libs are loaded from /system/lib/vndk-sp
Test: RenderScript app (CameraScript) runs well
Change-Id: Id139f626cafae2e43ee4eefc5a57a204e31bbbc9
2017-04-26 09:30:36 +09:00
TreeHugger Robot
57e3528d2e Merge "Linker: Add ASAN support to treble ld.config" into oc-dev 2017-04-26 00:28:56 +00:00
Wei Wang
07fc6421cf Merge "Revert "Revert "Ensure update_verifier run before zygote""" am: 5fe07acd07 am: 0380041304 am: b8fdeb4c5a
am: b0d85903cd

Change-Id: I77a093146a7db8651e6a6bd204ccd97ca2e37412
2017-04-25 17:53:34 +00:00
Wei Wang
53842e7dc6 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

(cherry picked from commit 5dc05effec)

Change-Id: I97cde0c20f74b1b17c995d84c2e31c86fe006395
2017-04-25 17:49:22 +00: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
Andreas Gampe
c7c2d7bcd4 Linker: Add ASAN support to treble ld.config
Add asan counterparts.

Bug: 37579959
Test: m && m SANITIZE_TARGET=address
Merged-in: I23f05436b79fbcb3f6fa11d84c95fcd180fad3b3
Change-Id: I23f05436b79fbcb3f6fa11d84c95fcd180fad3b3
2017-04-25 21:59:37 +09: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
Andreas Gampe
146b9a7254 Linker: Add ASAN support to treble ld.config
Add asan counterparts.

Bug: 37579959
Test: m && m SANITIZE_TARGET=address
Change-Id: I23f05436b79fbcb3f6fa11d84c95fcd180fad3b3
2017-04-24 08:07:53 -07:00
Keun-young Park
4971972b54 Merge "Revert "Ensure update_verifier run before zygote"" am: a037bddd8a am: 615211301e am: 2e211888c0
am: 1a6eb1628c

Change-Id: Ia7afc768cc1f140787f99c021859a99e59fa0762
2017-04-22 01:20:22 +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
34f0c315d0 Merge "Ensure update_verifier run before zygote" am: a42ec8a9e3 am: 29a0f68c11 am: 73fc12cbda
am: 1214e236eb

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

Change-Id: I8080e62c965fce0db456e3f61a2098794d5e448e
2017-04-21 17:10:04 +00: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
5fb5b81fc7 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

(cherry picked from commit f8532445b4)

Change-Id: Ia46b07f3d6abb090cc169ebd807e21b16694d172
2017-04-21 09:55:03 -07: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
Andreas Gampe
a2b67d6063 Asan_extract: Use sys.powerctl
rc-style powerctl has beem removed. Accordingly, asan_extract now
needs to access sys.powerctl directly.

Bug: 36458146
Test: m && m SANITIZE_TARGET=address SANITIZE_TARGET_SYSTEM=true
Change-Id: Ic65a858962b4b3dd613fdbfa09f93d21425bf892
2017-04-19 18:32:27 -07:00
Andreas Gampe
4648792228 Asan_extract: Set access flags.
After untar-ing, set correct access flags.

Bug: 36458146
Test: m && m SANITIZE_TARGET=address SANITIZE_TARGET_SYSTEM=true
Change-Id: Ibd98dfaeb58a0040ff2a9fee0bb880a281a673e8
2017-04-19 16:03:39 -07:00
Andreas Gampe
cb46b01167 Asan_extract: Add FDE check
Under full-disk encryption, we must skip extracting libraries
into the temporary /data directory. It is too small, and the
framework will not be able to come up.

Add a check for the vold.decrypt system property. As it turns
out that we can't reliably use this, also add a size check
(and use 512M = 131072 4K blocks as the limit).

Bug: 36458146
Test: m && m SANITIZE_TARGET=address SANITIZE_TARGET_SYSTEM=true
Change-Id: Ib350094b049b6e75832d393527b8b62a58a7fece
2017-04-19 16:03:39 -07:00
TreeHugger Robot
1b0895300f Merge changes I33ad185f,I5fc2d727 into oc-dev
* changes:
  init.rc: move load_system_props to beginning of 'on fs'
  liblog: __android_logger_property_bool svelte+eng default
2017-04-19 20:16:15 +00:00
Mark Salyzyn
82a395de27 init.rc: move load_system_props to beginning of 'on fs'
(cherry pick from commit 3510359a3c)

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 17:32:17 +00:00
Wei Wang
ac0aa5f30c Merge "init.rc: set initial cpuset to all cores" into oc-dev 2017-04-19 16:49:59 +00:00
Mark Salyzyn
2563a726fb Merge "init.rc: move load_system_props to beginning of 'on fs'" am: 798ac73dcf am: 03393e6f63 am: 925a895266
am: e4f22b16a5

Change-Id: Ib999ec2f8c052a80cd4db64939a77031cd8f2cd5
2017-04-19 16:49:44 +00: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
5ceb7b3ebd 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
(cherry picked from commit 98ad32a967)
2017-04-18 12:24:58 -07:00
Tom Cherry
3b6367af46 Merge "init: handle sys.powerctl immediately" am: 14ed55bae8 am: e6bfb53196 am: 8972f887d2
am: 1f49801ab1

Change-Id: I6af3f4e1850593f13f27a3fd48f1310e0c3e369c
2017-04-18 18:39:20 +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
Jiyong Park
dd39cf5e05 Merge "linker: don't allow libui to SP-HALs and fix warning" into oc-dev am: 02012596c1
am: 9cd5ed710b

Change-Id: I730e0cec8bdd2f8dfb6158f50a66a08519b6f562
2017-04-18 03:00:10 +00:00
Jiyong Park
9cd5ed710b Merge "linker: don't allow libui to SP-HALs and fix warning" into oc-dev
am: 02012596c1

Change-Id: Ia82a1515e8e47e5a8a39d5fb214ca8a5690efe5e
2017-04-18 01:51:48 +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
Jiyong Park
7b701de5e0 linker: don't allow libui to SP-HALs and fix warning
libui.so is not used by SP-HALs, so it is removed from the list of libs
exposed from the default namespace.

Also, this fixes a warning message "property value is empty" caused by
the automatically removed trailing '/' for the section 'legacy'. Since
the legacy behavior is already implemented by the linker itself, the
behavior doesn't need to specified in ld.config.txt.

Test: marlin/sailfish boots
Test: no warning message is shown
Change-Id: Ib679794d63b01c6794663dc88f1ab7e72cfb11d3
2017-04-18 08:16:03 +09:00
Wei Wang
81794deecf Merge "init.rc: set initial cpuset to all cores" am: 66f44d823f am: eb9ddd14f1 am: d7652f553c
am: c9c66cd486

Change-Id: Ibb9248214e48f937c80bf6af88124d602e32d502
2017-04-17 20:44:23 +00: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
Jiyong Park
2e24e8e2f0 Merge "Configure ld.config.txt for SP-HALs" into oc-dev am: 43b72b58f2
am: 7610066315

Change-Id: I59ede8903c6890b976ef3ca42c7ad1d220470a42
2017-04-15 02:07:02 +00:00
Jiyong Park
7610066315 Merge "Configure ld.config.txt for SP-HALs" into oc-dev
am: 43b72b58f2

Change-Id: I3e7e5f142f6c8e76da26e25362eccd35f10b81f1
2017-04-15 02:04:49 +00:00
TreeHugger Robot
43b72b58f2 Merge "Configure ld.config.txt for SP-HALs" into oc-dev 2017-04-15 01:47:39 +00:00
Wei Wang
8dbd12b948 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
(cherry picked from commit 2e83b86a8a)
2017-04-14 22:09:14 +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
Jiyong Park
450cff4b68 Configure ld.config.txt for SP-HALs
Now, framework process (any process that is executing /system/bin/* or
/system/xbin/*) are started with three namespaces; default, sphal and
vndk.

default namespace is the namespace that is responsible for loading libs
from /system/lib. It can't load libs from other places such as
/vendor/lib. (However, we temporarily open the path since we haven't
finished the system partition cleanup, but will do eventually).

sphal namespace is the namespace where SP-HAL (Same-process HAL) is
loaded. SP-HAL are the only vendor libraries that are allowed to be
loaded inside framework processes. libEGL_<chipset>.so and
android.hardware.graphics.mapper@2.0-impl.so, etc are SP-HALs. When
framework needs to load those SP-HALs, it explicitly loads it from this
namespace using android_get_exported_namespace() and
android_dlopen_ext().

vndk namespace is the namespace for loading vndk-sp (Vendor-NDK for
Same-Process) libs, which is a small set of framework libraries that
SP-HALs can link against. These libraries are compiled for the same
version of Android that the vendor partition is compiled against.
SP-HALs can not use libraries other than vndk-sp and ndk libs.
Membership to vndk-sp and ndk are strictly closed.

Note that in a system, there are two copies of vndk-sp libs. One at
/system/lib and the other at /vendor/lib/vndk-sp. As a result, there can
be two instances of a same library in a process.

Also adds ld.config.legacy.txt which is used on non-Treble devices where
PRODUCT_FULL_TREBLE is not set to true.
Note, this split can be cleaned up further after b/37139976 is solved.

Bug: 34407260
Test: git diff HEAD:rootdir/etc/ld.config.legacy.txt
HEAD^:rootdir/etc/ld.config.txt => 0
Test: sailfish boots (because BOARD_VNDK_VERSION is not set to
'current')

Change-Id: I8331d94edc38f22c4f8abc66cdf2050af9d0605b
2017-04-14 16:39:36 +09:00
Todd Poynor
4224f030c4 Merge changes I76212f65,I6a29c678 into oc-dev am: 5975d4e337
am: a03b4dc574

Change-Id: Ib202914daeb62057d4575e4815329f5a7bee80f0
2017-04-14 02:05:13 +00:00
Wei Wang
e61f5c42fa Merge "init.rc: start all 3 servicemanagers early" into oc-dev am: d12835d19f
am: c74c092929

Change-Id: Ib436e16a88570a6b896ec917b40be87cf9a66fe0
2017-04-14 02:04:58 +00:00
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
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
Tom Cherry
ec1d24f522 Merge changes Ie5ec609a,I5a2ac369,I690137b5 am: 659b78ed10 am: 01b87aac9c am: 8d9eee4f2b
am: aa85663027

Change-Id: I69be112c0020f7b4ce1a9a92c1e60e8f2941c5a9
2017-04-13 22:25:29 +00: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
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
Jaesoo Lee
498e500e8f Merge "disable module loading after BOOT_COMPLETED broadcast" into oc-dev am: a02b1f5bed
am: 00b0b347a0

Change-Id: I62f0b7d807a96276d08d13adcd758d126a509c39
2017-04-12 23:54:37 +00:00
Tom Cherry
780a71e779 ueventd: move subsystem logic from code to ueventd.rc
Test: Boot bullhead
Test: Boot sailfish, observe no boot time regression
Test: init unit tests

Change-Id: I690137b584fcc2b9cd2dd932a2678f75a56d6737
2017-04-12 16:36:20 -07:00
Jaesoo Lee
00b0b347a0 Merge "disable module loading after BOOT_COMPLETED broadcast" into oc-dev
am: a02b1f5bed

Change-Id: I7c750c9838b22cbcd9acb849c10be47ba7a50feb
2017-04-12 23:09:04 +00:00
Jaesoo Lee
20b7f78204 Merge "disable module loading after BOOT_COMPLETED broadcast" 2017-04-12 22:59:37 +00:00
Tom Cherry
a72518f588 Merge "ueventd: remove /dev/log" am: 120add07ab am: 9ae606d659 am: 6c2e8b10fe
am: 6289bb1341

Change-Id: I688c8cca7ebca7f4cd86ac8d3595b6ba01be9221
2017-04-12 08:23:22 +00:00
Tom Cherry
6289bb1341 Merge "ueventd: remove /dev/log" am: 120add07ab am: 9ae606d659
am: 6c2e8b10fe

Change-Id: Ic257774710a74e72a97f4187e48587150ee3d613
2017-04-12 08:17:29 +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
Tom Cherry
d4ff8d83d3 ueventd: remove /dev/log
This was marked deprecated in 2014 and removed in 2015, let's remove
the uevent rule now too.

Test: see that logging still works on bullhead
Change-Id: Idaf3f49a1afe7046eba6c976628b9f1c8b3ec094
2017-04-11 21:35:46 +00: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
71132a8608 Merge "Move early_hal start to late-fs trigger action" into oc-dev am: 9cadfde2d6
am: a074e16357

Change-Id: I4dc06d4929a68a5ad1d8dc1386876e8d772802e5
2017-04-07 06:16:27 +00: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
2ad7aafa23 Merge "init.rc: add class_start early_hal" am: 7bbd2a5290 am: 795eb840a7 am: 4bf15ab6b5
am: 53ae57e0bf

Change-Id: I10c10cfde7c6f4ffeabcad04eb738b62dfcbb831
2017-04-05 00:56:20 +00:00
Steven Moreland
53ae57e0bf Merge "init.rc: add class_start early_hal" am: 7bbd2a5290 am: 795eb840a7
am: 4bf15ab6b5

Change-Id: Ieae51492b03168b13224c252d075c03c8f80942d
2017-04-05 00:47:01 +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