Commit graph

1450 commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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