Commit graph

29252 commits

Author SHA1 Message Date
Treehugger Robot
273a0624c5 Merge "init: consolidate restorecon after selinux initialization in single function" 2017-03-30 00:48:04 +00:00
Zhenhua WANG
e8fb11dfa1 NativeBridge: add "linked namespace" semantic corresponding to linker
For dynamic linking perspective, semantics of NativeBridge needs to
align with dynamic linker. This patch adds "linked namespace" semantic
which shares some libraries from one namespace to another.

Test: make test-art-host-run-test-115-native-bridge
Change-Id: I71ce1dde19d61363d5eb9731fd4795a8c315b3a0
2017-03-29 17:34:11 -07:00
Calin Juravle
c169b2018f Set libnativeloader style to clang-format-2
Test: clang-format.py ...
Change-Id: I322c134c1e6b58b2c4ea21b6dfac5727860604c2
2017-03-29 17:33:12 -07:00
Calin Juravle
bac9807247 Set libnativebridge style to clang-format-2
Test: clang-format.py ...
Change-Id: Ie08ae6a056f0381590e202a597042fb2490af530
2017-03-29 17:29:57 -07:00
Janis Danisevskis
9cc51728af Make init builtin command installkey respect property updates
init used to block on installkey such that it was unable to
process property events. This lead to a deadlock by which
the Keymaster HAL would wait indefinitely for the
hwservicemanager.ready=true. 

This fixes the issue by implementing the builtin in terms of 
do_exec, which allows init to stay responsive to properties 
while waiting for the child to terminate.

Bug: 36278706
Test: Add a 3s delay into hwservicemanager before it sets the property
      hwservicemanager.ready and the device still boots.

Change-Id: Iaefd31156ca01f3a44b4f85a8bf78beee8dfe224
2017-03-30 00:11:48 +00:00
Keun-young Park
acd55b39fe send SIGTERM only once
- Processes capturing SIGTERM signal will not terminate and
  killProcessGroup will timeout after retry. This gives 200ms
  of waiting per such process. Change it to retry only once as
  SIGTERM will keep failing for such process.

bug: 36696408
Test: check time spent in SIGTERM for reboot
Change-Id: I9b0843614598dd3f97a50b21352046297ed70b6b
2017-03-29 16:33:25 -07:00
Keun-young Park
fac4b63eff add killProcessGroupOnce
- killProcessGroup retries if it fails while
  killProcessGroupOnce only tries once.
- useful for sending signal like SIGTERM once.

bug: 36696408
Test: will add usage to init
Change-Id: Ia1e3d4ec848e785a3238f262b02914695cded4c7
2017-03-29 16:33:15 -07:00
Sandeep Patil
7ef60b4ed4 init: consolidate restorecon after selinux initialization in single function
Test: Boot sailfish
Change-Id: I423028f12a84c4e0c12c9bdde52b6d795d45b620
(cherry picked from commit 74df5bab16)
Signed-off-by: Sandeep Patil <sspatil@google.com>
2017-03-29 16:01:31 -07:00
Keun-young Park
5579d46471 Merge "set zero shutdown timeout for eng build"
am: 6fb2ef1d03

Change-Id: Id9fbc2ad91d6e337be7e39ab747187427e69003f
2017-03-29 21:29:37 +00:00
Treehugger Robot
6fb2ef1d03 Merge "set zero shutdown timeout for eng build" 2017-03-29 21:25:19 +00:00
Keun-young Park
c4ffa5c47d set zero shutdown timeout for eng build
- still it will take time to kill services, < 3 secs in tested device.

bug: 36678028
Test: reboot
Change-Id: I3f3eb83aede8cd950da12e3fcc259eeaf8517c3b
2017-03-29 12:25:33 -07:00
Tom Cherry
571cb53797 Merge changes from topic 'exec-start-update-verifier'
am: 8772b3686e

Change-Id: Ifaa071b38d1e34075890fd28adc4a5ccee12de53
2017-03-29 18:45:21 +00:00
Tom Cherry
64cb3d5c62 init: add exec_start command
am: b27004aa05

Change-Id: I98ce17c11621eece46728aa94dc64f54273e5a99
2017-03-29 18:45:10 +00:00
Treehugger Robot
8772b3686e Merge changes from topic 'exec-start-update-verifier'
* changes:
  init.rc: launch update_verifier with exec_start
  init: add exec_start command
2017-03-29 18:39:32 +00:00
Tom Cherry
6ee34f0286 Merge "init: replace property_get with its android::base equivalent"
am: 7bcce1e3c0

Change-Id: I877b59339d1cfc3a8953b298f975365db55d3a22
2017-03-29 18:34:54 +00:00
Treehugger Robot
7bcce1e3c0 Merge "init: replace property_get with its android::base equivalent" 2017-03-29 18:28:51 +00:00
Tom Cherry
ccf23537ee init: replace property_get with its android::base equivalent
Slowly try to decouple property_service.cpp from the rest of init.

Test: Boot bullhead
Change-Id: I267ae0b057bca0bf657b97cb8bfbb18199282729
2017-03-29 10:07:54 -07:00
Neil Fuller
1fd9390f0b Merge "Update to support staging behavior"
am: ec16825cb8

Change-Id: Iee19b80e6b722cd87c70b48870e4040713f47fa2
2017-03-29 12:41:47 +00:00
Treehugger Robot
ec16825cb8 Merge "Update to support staging behavior" 2017-03-29 12:39:47 +00:00
Neil Fuller
ae52ab2acf Update to support staging behavior
The tzdatacheck binary is being modified to support
"staging" of an install / uninstall. tzdatacheck is now
responsible for making time zone distros "live" during
boot. It was previously the responsibility of the
TimeZoneDistroInstaller.

Bug: 31008728
Test: Manual testing
Test: CTS: run cts -m CtsHostTzDataTests

Change-Id: I1d390bf2b383a9505320e3455a20ae640bf83d7b
2017-03-29 10:56:45 +01:00
Bowgo Tsai
acc1c3c792 fs_mgr: removing fs_mgr_read_fstab_with_dt()
Currently there is no client requires fs_mgr_read_fstab_with_dt() so
remove this API. Devices with fstab entries in device tree should use
fs_mgr_read_fstab_default() to get default fstab, or just use
fs_mgr_read_fstab_dt() to get those in device tree.

Bug: 35811655
Test: normal boot sailfish
Test: run factory data reset in sailfish
Test: recovery boot sailfish
Test: adb sideload in sailfish

Change-Id: I1579d81cea7366cf3867cfe5ad56feb36cbb7246
2017-03-29 16:25:03 +08:00
Elliott Hughes
939cb2950f Merge "Make demangle work more like c++filt."
am: 58c1804653

Change-Id: I9a1ae42f7808b63a6b3e3fa204b8e60d57920c93
2017-03-29 05:08:07 +00:00
Treehugger Robot
58c1804653 Merge "Make demangle work more like c++filt." 2017-03-29 05:02:42 +00:00
Tom Cherry
375cc20455 Merge "init: remove unused cutils includes"
am: 20e43a2f2c

Change-Id: I6c4e89c9b0ce39669ca6914cc134e28f005e4d55
2017-03-29 01:31:23 +00:00
Treehugger Robot
20e43a2f2c Merge "init: remove unused cutils includes" 2017-03-29 01:27:19 +00:00
Elliott Hughes
102183ee66 Make demangle work more like c++filt.
Also tweak the help output to fit the toybox style.

Bug: N/A
Test: readelf -aW | demangle
Change-Id: I110b9e385f583d5047c785364c8a5a33575d8357
2017-03-28 17:38:01 -07:00
Tom Cherry
1ec1bd918c init: remove unused cutils includes
Test: Boot bullhead
Change-Id: I629f9c3863f00fa38f87a68442c2380d28764718
2017-03-28 16:22:33 -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
Wei Wang
446cfa74ef Merge "libcutils: remove sched_set/getscheduler"
am: e0bec6b11e

Change-Id: I3f9a133401ac8a85ba3c6fd220875066df99271a
2017-03-28 22:39:56 +00:00
Treehugger Robot
e0bec6b11e Merge "libcutils: remove sched_set/getscheduler" 2017-03-28 22:32:29 +00:00
Christopher Ferris
8726529e3e Merge "Only allow short functions in class definitions."
am: e3b27d22bf

Change-Id: Id56de01fede79702bc1942abcd4baf147968141f
2017-03-28 21:34:47 +00:00
Christopher Ferris
e3b27d22bf Merge "Only allow short functions in class definitions." 2017-03-28 21:20:17 +00:00
Tom Cherry
f30abecf3c Merge "Fix timeouts for android::base::WaitForProperty*"
am: 57d78354d6

Change-Id: Ic755f2a42dcbc271aa7271da1988f035f4c18a6b
2017-03-28 20:43:50 +00:00
Tom Cherry
57d78354d6 Merge "Fix timeouts for android::base::WaitForProperty*" 2017-03-28 20:38:24 +00:00
Wei Wang
a8d59faa75 libcutils: remove sched_set/getscheduler
Bug: 36667354
Test: angler taking video
Change-Id: Ie7fbcccbd02314468c03317319574ee7e433561d
2017-03-28 13:01:20 -07:00
Christopher Ferris
a11c814d3d Only allow short functions in class definitions.
The previous rules would force short functions to be on a single line.
This change only allows single function lines in class definitions.

Test: Ran on a CL and verified single line functions only allowed in
Test: class defintions.
Change-Id: I5422543fdbb39da842bbd799c19fe2c443ff483c
2017-03-28 12:31:37 -07:00
Mark Salyzyn
621ae033a4 Merge "libcutils: handle root directory empty path"
am: 6105dbd01b

Change-Id: I48f4607f72c56ffb8bbf63682a70954995d48a28
2017-03-28 17:19:16 +00:00
Mark Salyzyn
6105dbd01b Merge "libcutils: handle root directory empty path" 2017-03-28 17:09:15 +00:00
Bowgo Tsai
c30261f266 Merge "fs_mgr: change the log level in fs_mgr_get_boot_config()"
am: c8c3e61eeb

Change-Id: Ia5e4c77d45652c8b6d4e147175db99e44fecc0d5
2017-03-28 15:49:18 +00:00
Treehugger Robot
c8c3e61eeb Merge "fs_mgr: change the log level in fs_mgr_get_boot_config()" 2017-03-28 15:43:56 +00:00
Mark Salyzyn
d749a054ff Merge "logd: strip out empty trailing iovec"
am: 6b11faeb42

Change-Id: Ib6244cf3cd089c44dd71524e09f6d4a2227c65bd
2017-03-28 15:08:15 +00:00
Mark Salyzyn
6b11faeb42 Merge "logd: strip out empty trailing iovec" 2017-03-28 15:00:38 +00:00
Jeremy Compostella
3d642d48e2 libcutils: handle root directory empty path
Usually, the canned paths lack the leading '/' which means that the
root directory is an empty path.  This patch makes
load_canned_fs_config() handle this empty path as the root directory.
It also make it flexible enough to handle an optional leading '/'.

Original-Author: Jeremy Compostella <jeremy.compostella@intel.com>
Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
Signed-off-by: Gaelle Nassiet <gaellex.nassiet@intel.com>
Change-Id: Ice759ef37d1df23a54df1158ec0d3ad7f577a069
2017-03-28 14:57:22 +00:00
Bowgo Tsai
0f34094a17 fs_mgr: change the log level in fs_mgr_get_boot_config()
fs_mgr might try to get a non-existing config through fs_mgr_get_boot_config()
on a device (e.g., for backward compatibility). Lower the log level to INFO
so it won't appear on the recovery screen.

Bug: 35811655
Test: recovery boot sailfish
Change-Id: I81497259aff3691740170abeef932d363b52be35
2017-03-28 18:52:04 +08:00
Steven Moreland
ee7137208e Merge "init: add class_restart"
am: 8678872a00

Change-Id: I92e6669b0e0a9b87fffc400f8a1ee2699bdda7fc
2017-03-28 04:27:40 +00:00
Treehugger Robot
8678872a00 Merge "init: add class_restart" 2017-03-28 04:22:47 +00:00
Josh Gao
6340d91308 Merge "debuggerd_client: properly wait for completion."
am: 372d8a2931

Change-Id: I16cc3b9538e9b9b0ca3662b0a2f64b55aa38100a
2017-03-28 03:24:35 +00:00
Treehugger Robot
372d8a2931 Merge "debuggerd_client: properly wait for completion." 2017-03-28 03:21:39 +00:00
Tom Cherry
256c8f5076 Merge "init: remove superfluous forward definitions"
am: deb23ba2c1

Change-Id: Ic8126b783cf8083a64cc0955074f586420685cdd
2017-03-28 02:32:10 +00:00
Treehugger Robot
deb23ba2c1 Merge "init: remove superfluous forward definitions" 2017-03-28 02:22:51 +00:00