Commit graph

59591 commits

Author SHA1 Message Date
Tom Cherry
2756f320fe [automerger skipped] Merge "init: don't sync() before shutting down services" into rvc-dev am: 27311fd844 -s ours
am skip reason: Change-Id I6fd7d3a25d3225081388e39a14c9fdab21b592ba with SHA-1 10615eb397 is in history

Change-Id: I05faca41a3d6ba5a64e7fe0d8d3e9131c91c14a4
2020-04-03 02:57:05 +00:00
Tom Cherry
27311fd844 Merge "init: don't sync() before shutting down services" into rvc-dev 2020-04-03 02:40:17 +00:00
Bill Peckham
36c627da2a Merge "Ignore functionfs mounts." am: 362a41a4f6 am: 300333e210
Change-Id: I37611b55ba27a5cf7fa07102882c8017bf2274df
2020-04-02 23:27:40 +00:00
Bill Peckham
300333e210 Merge "Ignore functionfs mounts." am: 362a41a4f6
Change-Id: I11933d177368f9255c11a9f3cd5dfb2a541b0a9d
2020-04-02 23:07:53 +00:00
Nikita Ioffe
b86c50d4c3 [automerger skipped] Properly fail userspace reboot if it's not supported am: 6bd3bc8d01 -s ours
am skip reason: Change-Id I1264078f53ed3ff54638c7f3b6846b7437f98ee5 with SHA-1 92116e4129 is in history

Change-Id: I072de643588f5d9c915ff9d6fea498c0c80f875b
2020-04-02 22:57:50 +00:00
Bill Peckham
362a41a4f6 Merge "Ignore functionfs mounts." 2020-04-02 22:46:28 +00:00
David Anderson
99223931a3 Merge "fs_mgr: Allow commas in boot device paths." am: f9459a45eb am: e64cc297b6
Change-Id: I62b37c4aca11ce28864a5b5a55ed3937fff659d7
2020-04-02 21:47:45 +00:00
David Anderson
e64cc297b6 Merge "fs_mgr: Allow commas in boot device paths." am: f9459a45eb
Change-Id: Id16a67880e85e5dea4ca1c889614911730cc3b8e
2020-04-02 21:27:16 +00:00
David Anderson
f9459a45eb Merge "fs_mgr: Allow commas in boot device paths." 2020-04-02 21:11:44 +00:00
Tom Cherry
6288212ac3 init: don't sync() before shutting down services
Devices in the lab are hitting an issue where they're getting stuck
likely in the sync() call in DoReboot() before we start the reboot
monitor thread and before we shut down services.

It's possible that concurrent writing to RW file systems is causing
this sync() call to take essentially forever.  To protect against
this, we need to remove this sync().  Note that we will still call
sync() after shutting down services.

Note that the service shutdown code has a timeout and there is a
reboot monitor thread that will shutdown the device if more than 30
seconds pass above that timeout.  This change increases that timeout
to 300 seconds to give the final sync() calls explicitly more time to
finish.

Bug: 150863651
Test: reboot functions normally
Test: put an infinite loop in DoReboot and the the reboot monitor thread
      triggers and shuts down the device appropriately
Merged-In: I6fd7d3a25d3225081388e39a14c9fdab21b592ba
Change-Id: I6fd7d3a25d3225081388e39a14c9fdab21b592ba
(cherry picked from commit 10615eb397)
2020-04-02 12:51:36 -07:00
Nikita Ioffe
3cc699e1fb Merge "Improve logging in bootstat." am: 2884943687 am: 41b977a1fa
Change-Id: I34cd2c0fef185c01c39ed970f98402efb421517b
2020-04-02 19:00:02 +00:00
Nikita Ioffe
41b977a1fa Merge "Improve logging in bootstat." am: 2884943687
Change-Id: Ie6d6012afd1df347303f4054eee1229d98a80be8
2020-04-02 18:37:37 +00:00
Nikita Ioffe
2884943687 Merge "Improve logging in bootstat." 2020-04-02 18:12:55 +00:00
Nikita Ioffe
6bd3bc8d01 Properly fail userspace reboot if it's not supported
Previously, after `adb reboot userspace` is called on a device that
doesn't suppor it, init would've logged an error and quietly exit the
shutdown sequence. This was leaving adb handing forever.

With this approach, init will fail setprop
"sys.powerctl=reboot,userspace" in case userspace reboot is not
supported.

Test: adb root
Test: adb setprop init.userspace_reboot.is_supported 0
Test: adb reboot userspace
Test: atest CtsInitTestCases
Bug: 146639622
Change-Id: I1264078f53ed3ff54638c7f3b6846b7437f98ee5
Merged-In: I1264078f53ed3ff54638c7f3b6846b7437f98ee5
(cherry picked from commit 92116e4129)
2020-04-02 17:25:48 +01:00
Nikita Ioffe
39dab62ff0 [automerger skipped] Make init.userspace_reboot.is_supported a rw property am: 9fd393f430 -s ours
am skip reason: Change-Id I7552d5ccc6e9b750a6081947eef8fcb027be13e1 with SHA-1 663cd35030 is in history

Change-Id: Iea491137db1f9dd047c3d82ecc6f97d83e860712
2020-04-02 15:37:30 +00:00
Nikita Ioffe
49062f3b72 Improve logging in bootstat.
This should help in debugging issues related to the mismatch between
actual last reboot reason property and the expected one (see attached
bug).

Test: adb reboot
Test: adb logcat | grep bootstat
Bug: 152900920
Change-Id: I085cf1fb80a30389fd3ba821d40b6111a3294d95
2020-04-02 13:03:21 +01:00
Nikita Ioffe
d1f4e3ede2 Merge "Properly fail userspace reboot if it's not supported" am: 2af5bd00b0 am: 62a02cc826
Change-Id: Ia9250cd4a4818cd71c9408e38aefcef091416180
2020-04-02 11:00:59 +00:00
Nikita Ioffe
62a02cc826 Merge "Properly fail userspace reboot if it's not supported" am: 2af5bd00b0
Change-Id: I5bfed4253a2eddde7930c64a3aefa0b87902cfc9
2020-04-02 10:44:21 +00:00
Nikita Ioffe
2af5bd00b0 Merge "Properly fail userspace reboot if it's not supported" 2020-04-02 10:23:45 +00:00
Paul Duffin
6ccfc9ab88 Merge "Add "com.android.os.statsd" to libprocessgroup apex_available" into rvc-dev-plus-aosp 2020-04-02 09:42:56 +00:00
Maciej Żenczykowski
16fa65dee3 Merge "NetlinkEvent - ignore captive portal and pref64 nd user opts" am: 23bfaae6dc am: cfe842456e
Change-Id: I55c5d7c06bd22610967d8ff2d73dadfd201197cf
2020-04-02 03:34:25 +00:00
Maciej Żenczykowski
cfe842456e Merge "NetlinkEvent - ignore captive portal and pref64 nd user opts" am: 23bfaae6dc
Change-Id: I14928091507f1bcd1ed74103a65473abff103bf9
2020-04-02 03:07:44 +00:00
David Anderson
fabc36445e fs_mgr: Allow commas in boot device paths.
If the value of androidboot.boot_devices has a comma in its path, it'll
get split and /dev/block/by-name symlinks won't work. As a workaround,
add "androidboot.boot_device" as a valid command-line parameter. It can
be repeated multiple times to retain multiple-boot-device semantics.

Bug: 153024538
Test: device boots with androidboot.boot_device= set
Change-Id: I1be5aeec287ba198768c3452b1930d59b2f13463
2020-04-01 19:58:18 -07:00
Maciej Żenczykowski
23bfaae6dc Merge "NetlinkEvent - ignore captive portal and pref64 nd user opts" 2020-04-02 02:37:19 +00:00
Josh Gao
d6998c98d8 Merge changes I90e10c74,I038d1df4,I4299bd96 am: 73d44bb6c2 am: 72138abaa7
Change-Id: Ifa3354b755dab76cff00f3e7ceb0a80e5dd6657d
2020-04-01 23:19:26 +00:00
Josh Gao
72138abaa7 Merge changes I90e10c74,I038d1df4,I4299bd96 am: 73d44bb6c2
Change-Id: Ia63c3ad5c91d59de688379c97a820899fe5400ea
2020-04-01 22:51:26 +00:00
Josh Gao
73d44bb6c2 Merge changes I90e10c74,I038d1df4,I4299bd96
* changes:
  adbd: delete unused variable.
  adb: move things around to prepare to add LZ4.
  adb: fix misindentation in Android.bp
2020-04-01 22:38:38 +00:00
Bill Peckham
647a8cdd44 Ignore functionfs mounts.
Vendors may add additional functionfs mounts. Since these
will never be remounted, we can safely filter these out.

Bug: 153008210
Test: Test device with previously unfiltered entries.
Change-Id: I7f384b8a0ce93dd6701fe3c4d9dd2557370b31e1
2020-04-01 14:29:12 -07:00
Josh Gao
e485bdf06e adbd: delete unused variable.
Bug: https://issuetracker.google.com/150827486
Test: m adb com.android.adbd.apex
Change-Id: I90e10c74d695659c702dea4173cb33ac5ca1a102
2020-04-01 13:09:31 -07:00
Josh Gao
6e697f2f8c adb: move things around to prepare to add LZ4.
Bug: https://issuetracker.google.com/150827486
Test: m adb com.android.adbd.apex
Change-Id: I038d1df4f179ddb23102016d781c9bd90da5a546
2020-04-01 13:09:29 -07:00
Josh Gao
31d42aa73c adb: fix misindentation in Android.bp
Bug: https://issuetracker.google.com/150827486
Test: none
Change-Id: I4299bd962963a58ef5f075405b99b1d1e4c1febc
2020-04-01 13:09:16 -07:00
Nikita Ioffe
9fd393f430 Make init.userspace_reboot.is_supported a rw property
General recommendation is to avoid read-only properties, and instead control
"read-onlines" by only allowing init/vendor_init to set the property.

Since ro.init.userspace_reboot.is_supported was added in this release, and
nobody outside of the platform is querying it directly, it should be fine to
simply rename it.

Test: adb shell getprop init.userspace_reboot.is_supported
Test: atest CtsUserspaceRebootHostSideTestCases
Bug: 152803929
Change-Id: I7552d5ccc6e9b750a6081947eef8fcb027be13e1
Merged-In: I7552d5ccc6e9b750a6081947eef8fcb027be13e1
(cherry picked from commit 663cd35030)
2020-04-01 18:24:57 +01:00
Tom Cherry
e69fc7ae18 Merge "init: don't sync() before shutting down services" am: d54a4bf9a3 am: 5bff2ac286
Change-Id: I0167b94f0680ccf01ed0f5e337a81e685a298010
2020-04-01 16:07:22 +00:00
Tom Cherry
5bff2ac286 Merge "init: don't sync() before shutting down services" am: d54a4bf9a3
Change-Id: I8a6699ee125e03b672bf38e1bb2a41f63fdd2bea
2020-04-01 15:51:40 +00:00
Tom Cherry
d54a4bf9a3 Merge "init: don't sync() before shutting down services" 2020-04-01 15:40:44 +00:00
Nikita Ioffe
0f5171234d Merge "Make init.userspace_reboot.is_supported a rw property" am: 884b570100 am: 24d89ac980
Change-Id: I1b559c32092c72f69ce79161e23c8a16efbd964f
2020-04-01 13:52:19 +00:00
Nikita Ioffe
92116e4129 Properly fail userspace reboot if it's not supported
Previously, after `adb reboot userspace` is called on a device that
doesn't suppor it, init would've logged an error and quietly exit the
shutdown sequence. This was leaving adb handing forever.

With this approach, init will fail setprop
"sys.powerctl=reboot,userspace" in case userspace reboot is not
supported.

Test: adb root
Test: adb setprop init.userspace_reboot.is_supported 0
Test: adb reboot userspace
Test: atest CtsInitTestCases
Bug: 146639622
Change-Id: I1264078f53ed3ff54638c7f3b6846b7437f98ee5
2020-04-01 14:34:54 +01:00
Nikita Ioffe
24d89ac980 Merge "Make init.userspace_reboot.is_supported a rw property" am: 884b570100
Change-Id: I09a3c3ba50963f2e6e9ecc33a0d9048390c4599f
2020-04-01 13:32:15 +00:00
Nikita Ioffe
884b570100 Merge "Make init.userspace_reboot.is_supported a rw property" 2020-04-01 13:14:21 +00:00
David Anderson
c3ed00599e [automerger skipped] Merge "libdm: Link libraries statically for VTS." into rvc-dev am: bcb856fe1a -s ours
am skip reason: Change-Id I9f356c854833b5e68820e4d3d4e9709af1288381 with SHA-1 e580566b00 is in history

Change-Id: I68152c57f213124e286840088518056bd519d689
2020-04-01 04:55:47 +00:00
David Anderson
bcb856fe1a Merge "libdm: Link libraries statically for VTS." into rvc-dev 2020-04-01 04:40:26 +00:00
TreeHugger Robot
f0fb5629e4 [automerger skipped] Merge changes from topic "minadbd_static_libadbd" into rvc-dev am: 3db222694d -s ours
am skip reason: Change-Id Ie479ae2fbaf1006228a531dab26c7d535ed403db with SHA-1 3735614b28 is in history

Change-Id: I87ca144566ff9c69070f5de8b9aa86b2a8d41e0d
2020-04-01 04:35:07 +00:00
TreeHugger Robot
3db222694d Merge changes from topic "minadbd_static_libadbd" into rvc-dev
* changes:
  Statically link libadbd into minadbd.
  adb: temporarily kill adb_benchmark.
  Move adbd's legacy USB implementation to fastboot.
2020-04-01 04:18:37 +00:00
Maciej Żenczykowski
a806a7153f NetlinkEvent - ignore captive portal and pref64 nd user opts
These are provided to userspace by newer kernels.

Test: builds
Bug: 150648313
Change-Id: I811c75e9a4739db149f502b9a43c99a8ed883341
2020-03-31 20:25:33 -07:00
Josh Gao
36fb67568c Statically link libadbd into minadbd.
Bug: http://b/150317254
Test: booted aosp_walleye-eng into recovery
Change-Id: Ie479ae2fbaf1006228a531dab26c7d535ed403db
Merged-In: Ie479ae2fbaf1006228a531dab26c7d535ed403db
(cherry picked from commit 3735614b28)
2020-03-31 19:16:08 -07:00
Tom Cherry
10615eb397 init: don't sync() before shutting down services
Devices in the lab are hitting an issue where they're getting stuck
likely in the sync() call in DoReboot() before we start the reboot
monitor thread and before we shut down services.

It's possible that concurrent writing to RW file systems is causing
this sync() call to take essentially forever.  To protect against
this, we need to remove this sync().  Note that we will still call
sync() after shutting down services.

Note that the service shutdown code has a timeout and there is a
reboot monitor thread that will shutdown the device if more than 30
seconds pass above that timeout.  This change increases that timeout
to 300 seconds to give the final sync() calls explicitly more time to
finish.

Bug: 150863651
Test: reboot functions normally
Test: put an infinite loop in DoReboot and the the reboot monitor thread
      triggers and shuts down the device appropriately
Change-Id: I6fd7d3a25d3225081388e39a14c9fdab21b592ba
2020-03-31 18:59:23 -07:00
Tom Cherry
6eef871628 Merge "init: only print backtraces on subsequent reboots with a value" am: e55818cd83 am: 6ec231e7ad
Change-Id: I5560436712aafb73b0afd8fbce5d4c72c7510d28
2020-04-01 01:20:27 +00:00
Tom Cherry
6ec231e7ad Merge "init: only print backtraces on subsequent reboots with a value" am: e55818cd83
Change-Id: I0b9da3a76c9759e001396fe48268a96f4a143bb1
2020-04-01 01:09:53 +00:00
Tom Cherry
e55818cd83 Merge "init: only print backtraces on subsequent reboots with a value" 2020-04-01 00:53:10 +00:00
David Anderson
05aea2e700 [automerger skipped] Merge "fastbootd: Unmount /cache before flashing." into rvc-dev am: ab4a2621aa -s ours
am skip reason: Change-Id I8a86bc4d12e4b3be020bbe47e02262a5aaa913a7 with SHA-1 2ffc31b090 is in history

Change-Id: Id6ae907072764761a5b51deb4aff81f7e4debb8a
2020-04-01 00:07:48 +00:00