Commit graph

34049 commits

Author SHA1 Message Date
Keun-young Park
19ec8e7bcf Merge "add "shutdown critical" to service" am: b3915d113d
am: a4ad5d0328

Change-Id: I6467657616371e84468975e56ac086855a298efb
2017-07-06 00:56:18 +00:00
Bowgo Tsai
06c6bf67e9 Merge "fs_mgr: allow no verity metadata when the device is unlocked." am: cd0c2d8962
am: 328b56585e

Change-Id: Ib8602958bffa7061a11ca4450b3dfdaf462b63f6
2017-07-06 00:56:00 +00:00
Keun-young Park
a4ad5d0328 Merge "add "shutdown critical" to service"
am: b3915d113d

Change-Id: I25b6f42478efda7077e00141042a427245393d28
2017-07-06 00:46:31 +00:00
Bowgo Tsai
328b56585e Merge "fs_mgr: allow no verity metadata when the device is unlocked."
am: cd0c2d8962

Change-Id: Icebfb3c34b3c2878c4015f36dafe893c577b40c9
2017-07-06 00:46:09 +00:00
Treehugger Robot
b3915d113d Merge "add "shutdown critical" to service" 2017-07-06 00:40:55 +00:00
Treehugger Robot
cd0c2d8962 Merge "fs_mgr: allow no verity metadata when the device is unlocked." 2017-07-06 00:29:47 +00:00
Andreas Gampe
0e6bac40c4 Merge "Backtrace: Add libziparchive dependency" am: 69542edfbe
am: 1030828a36

Change-Id: I875b3b43c0aeb19aa2b975da652dba12e4d0f713
2017-07-06 00:00:50 +00:00
Andreas Gampe
1030828a36 Merge "Backtrace: Add libziparchive dependency"
am: 69542edfbe

Change-Id: I4514fe90b92486b2730bc453b8f4badfc9466002
2017-07-05 23:58:51 +00:00
Wei Wang
b39890048c Merge "init: Support custom shutdown actions" am: c1bc4241f8
am: 5b89535442

Change-Id: I57b87dac016b4d7d6f982ee0057823eb1119bab7
2017-07-05 23:56:50 +00:00
Treehugger Robot
69542edfbe Merge "Backtrace: Add libziparchive dependency" 2017-07-05 23:55:43 +00:00
Wei Wang
5b89535442 Merge "init: Support custom shutdown actions"
am: c1bc4241f8

Change-Id: I6bb1789dbc5edbb10f2f4d712e9ca83e6302fdf4
2017-07-05 23:54:56 +00:00
Treehugger Robot
c1bc4241f8 Merge "init: Support custom shutdown actions" 2017-07-05 23:49:41 +00:00
Tom Cherry
04b7493074 Merge "Merge "ueventd: remove character device symlinks (/dev/usb/*)" am: f3ae82f57f" into stage-aosp-master
am: f038ee0d82

Change-Id: I4de99eac06e1b32820a9d1e5dde645c6e26e28cd
2017-07-05 23:02:47 +00:00
Tom Cherry
bef2bbdf62 Merge "ueventd: remove character device symlinks (/dev/usb/*)" am: f3ae82f57f
am: 6e0b51825b

Change-Id: Ic31e720cd9014de76f0fd999af44ce3c3ffcd482
2017-07-05 23:01:53 +00:00
Tom Cherry
419a9ef8f1 Merge "init: reap zombies only after kill(-pid, ...)" am: a51c40ce35
am: 0924b32c1f

Change-Id: I18a3c9a9a96a2488c7714113175f3e8115bd697f
2017-07-05 23:01:35 +00:00
Android Build Merger (Role)
f038ee0d82 Merge "Merge "ueventd: remove character device symlinks (/dev/usb/*)" am: f3ae82f57f" into stage-aosp-master 2017-07-05 22:50:56 +00:00
Tom Cherry
d74886ce10 Merge "ueventd: remove character device symlinks (/dev/usb/*)"
am: f3ae82f57f

Change-Id: I50d05fbf94c6b6c7868f349ab708cb51ae25f858
2017-07-05 22:50:46 +00:00
Tom Cherry
6e0b51825b Merge "ueventd: remove character device symlinks (/dev/usb/*)"
am: f3ae82f57f

Change-Id: Ib601af84ed3b186705caaed05706d6b1f3c5746c
2017-07-05 22:50:35 +00:00
Tom Cherry
0924b32c1f Merge "init: reap zombies only after kill(-pid, ...)"
am: a51c40ce35

Change-Id: I4f1b7a05cdff1fe7851b528d0bdeda354011b599
2017-07-05 22:50:17 +00:00
Tom Cherry
f3ae82f57f Merge "ueventd: remove character device symlinks (/dev/usb/*)" 2017-07-05 22:41:55 +00:00
Tom Cherry
a51c40ce35 Merge "init: reap zombies only after kill(-pid, ...)" 2017-07-05 22:39:51 +00:00
Mark Salyzyn
ab6f80c350 Merge "fs_mgr: report errno string for __mount errors" am: 6333cd0938
am: eef732555d

Change-Id: I1d3566cf0de8b2d695cee26effc12c04a53ae2b3
2017-07-05 21:56:15 +00:00
Keun-young Park
cccb34fce8 add "shutdown critical" to service
- "shutdown critical" prevents killing the service during
  shutdown. And the service will be started if not running.
- Without it, services will be killed by SIGTERM / SIGKILL during shutdown.
- Even services with "shutdown critical" will be killed if shutdown
  times out.
- Removes ueventd and vold from hard coded list. Each service's rc will
  be updated to add "shutdown critical". watchdogd is still kept in the list.

bug: 37626581
Test: reboot and check last kmsg

Change-Id: Ie8cc699d1efbc59b9a2561bdd40fec64aed5a4bb
2017-07-05 14:55:22 -07:00
Mark Salyzyn
eef732555d Merge "fs_mgr: report errno string for __mount errors"
am: 6333cd0938

Change-Id: Ic3c85f6ed01d5edd2bfd0a29063610b4d8159f31
2017-07-05 21:54:17 +00:00
Wei Wang
eeab491efd init: Support custom shutdown actions
We have been seeing panics and errors during shutdown sequence in
some vendor's platform, and it is required to disable error handling
during shutdown.

This CL separates the shutdown request to execute another "shutdown"
trigger at the beginning of shutdown stage. And vendor can use this
trigger to add custom commands needed for shutting down gracefully.

Bug: 38203024
Bug: 62084631
Test: device reboot/shutdown
Change-Id: I3fac4ed59f06667d86e477ee55ed391cf113717f
2017-07-05 14:49:57 -07:00
Treehugger Robot
6333cd0938 Merge "fs_mgr: report errno string for __mount errors" 2017-07-05 21:41:51 +00:00
Bowgo Tsai
d1fe3bdbd6 fs_mgr: allow no verity metadata when the device is unlocked.
To boot with generic system.img for project Treble, we should allow no verity
metadata when the device is unlocked. The previous fix checks system property
"ro.boot.flash.locked" but it's unavailable during first stage mount.
This CL checks "androidboot.verifiedbootstate" in kernel command line instead.

Bug: 63268209
Test: boot sailfish without metadata on /vendor

Change-Id: Ifd1dbeb2a2f09cd06903ecdd59bc94b3905a3fbd
2017-07-05 17:22:35 +08:00
Andreas Gampe
8f0947c11f Backtrace: Add libziparchive dependency
Bug: 37342627
Test: m
Change-Id: I2b4155bd11b315ff49eb9a69549e1ab3678d0b28
2017-07-04 12:03:52 -07:00
Jiyong Park
022b164c77 Merge "zlib is not exposed to libziparchive headers" am: eb42bb8c8b
am: d74d572f9d

Change-Id: Ie544d690f230581559ad5e634ee24d03801f7ea5
2017-07-03 19:38:25 +00:00
Jiyong Park
d74d572f9d Merge "zlib is not exposed to libziparchive headers"
am: eb42bb8c8b

Change-Id: Iaa99279d773725ffb2000da4f1bb2f111bc23d82
2017-07-03 19:34:56 +00:00
Treehugger Robot
eb42bb8c8b Merge "zlib is not exposed to libziparchive headers" 2017-07-03 19:30:45 +00:00
Jiyong Park
e7cf680ccc zlib is not exposed to libziparchive headers
By forward-declaring zstream, we don't need to re-export zlib headers.

Bug: 37342627
Test: build
Test: BOARD_VNDK_VERSION=current m -j dumpstate (or any other module
using libziparchive)

Change-Id: Ia69e5d459c79878d491cfe4ca21a7cc8fed4a5d8
2017-07-03 17:44:07 +00:00
Jiyong Park
da3af937a1 Merge "libziparchive headers are moved to local directory" am: 7b44858b91
am: 4724e91dad

Change-Id: I64400ffb9578be19d187e02efb6ef9204af783cf
2017-07-03 08:15:20 +00:00
Jiyong Park
4724e91dad Merge "libziparchive headers are moved to local directory"
am: 7b44858b91

Change-Id: I77e446012003528ae4180f8450bc96563259f34f
2017-07-03 08:12:51 +00:00
Treehugger Robot
7b44858b91 Merge "libziparchive headers are moved to local directory" 2017-07-03 08:06:40 +00:00
Jiyong Park
b84d631915 Merge "Ran clang-format on libziparchive sources and headers" am: aa82721894
am: 1fd5216370

Change-Id: I24362dbd4aa00ef2cb9c6a5ffebbe67d5bad2df6
2017-07-03 00:52:26 +00:00
Jiyong Park
1fd5216370 Merge "Ran clang-format on libziparchive sources and headers"
am: aa82721894

Change-Id: I04d2e03437ea1ada667c9fcc7b6e633a0c13712f
2017-07-03 00:49:56 +00:00
Treehugger Robot
aa82721894 Merge "Ran clang-format on libziparchive sources and headers" 2017-07-03 00:45:16 +00:00
Jiyong Park
cdf7ff8e20 libziparchive headers are moved to local directory
libziparchive headers are moved from the global include directory
(/system/core/include) to the local directory inside libziparchive.

Note: /system/core/include/ziparchive still exists as a symlink to
libarchive/include/ziparchive. This will be removed when there is no
header-only dependency to libziparchive.

Bug: 37342627
Test: build
Change-Id: I3631ffc2df7be8a064d64a625d10436090c3bb0f
2017-07-02 04:33:34 +00:00
Jiyong Park
cd997e6094 Ran clang-format on libziparchive sources and headers
Test: build aosp_arm
Change-Id: I469b82b68f2c457f480fb9cd9da2026672985ce3
2017-07-02 11:46:53 +09:00
Nick Kralevich
0056e6bccc Merge "Remove unnecessary SELinux dependencies" am: 22de50d351
am: e9b9b10c58

Change-Id: Ifead418ceb9fe806d76102d9068a32539a8b99d0
2017-07-01 16:44:36 +00:00
Nick Kralevich
e9b9b10c58 Merge "Remove unnecessary SELinux dependencies"
am: 22de50d351

Change-Id: Icbd6b0df4378980eb2a7878bab1896f6ecefb6a8
2017-07-01 16:39:37 +00:00
Treehugger Robot
22de50d351 Merge "Remove unnecessary SELinux dependencies" 2017-07-01 16:35:17 +00:00
Nick Kralevich
33391dad15 Remove unnecessary SELinux dependencies
These are unused.

Test: code compiles.
Change-Id: Idd707dfcc8f6daac3a489c791ecc364841cf31f9
2017-07-01 07:41:48 -07:00
Luis Hector Chavez
9dabbbaa6a Merge "init: Read previous state of securebits before modifying" am: c10e14110a
am: 19f32317b3

Change-Id: I87084032373a71b507ed0604c7ff38ec076fc74a
2017-07-01 00:35:11 +00:00
Luis Hector Chavez
19f32317b3 Merge "init: Read previous state of securebits before modifying"
am: c10e14110a

Change-Id: I0a9b2dc97ebbc449288de2ce3e2745a1f60a4372
2017-07-01 00:30:42 +00:00
Treehugger Robot
c10e14110a Merge "init: Read previous state of securebits before modifying" 2017-07-01 00:20:50 +00:00
Luis Hector Chavez
f5965519d1 init: Read previous state of securebits before modifying
When Android is running in a container, some of the securebits might be
locked, which makes prctl(PR_SET_SECUREBITS) fail.

This change gets the previous state of the process' securebits and adds
the desired bits.

Bug: 62388055
Test: aosp_bullhead-eng boots
Test: If init has non-zero securebits, it can also boot
Change-Id: Ie03bf2538f9dca40955bc58314d269246f5731bd
2017-06-30 14:42:46 -07:00
Tom Cherry
8d13d808a5 init: reap zombies only after kill(-pid, ...)
When init gets SIGCHLD, it uses waitpid() to get the pid of an exited
process.  It then calls kill(-pid, ...) to ensure that all processes
in the process group started by that process are killed as well.

There is a bug here however as waitpid() reaps the pid when it
returns, meaning that the call to kill(-pid, ...) may fail with ESRCH
as there are no remaining references to that pid.  Or worse, if the
pid is reused, the wrong processes may get the signal.

This fixes the bug by using waitid() with WNOWAIT to get the pid of an
exited process, which does not reap the pid.  It then uses waitpid()
with the returned pid to do the reap only after the above kill(-pid,
...) and other operations have completed.

Bug: 38164998
Test: kill surfaceflinger and see that processes exit and are reaped
      appropriately
Test: `adb reboot` and observe that the extraneous kill() failed
      messages do not appear

Change-Id: Ic0213e1c97e0141e6c13129dc2abbfed86de138b
2017-06-30 13:52:48 -07:00
Steven Moreland
25982a424b Merge "logd + liblogd to Android.bp" am: c997cd64dc
am: f7a68f02d5

Change-Id: I0b117103fb0bcf0b187107d10d04ceaa6a8ee499
2017-06-30 19:45:07 +00:00