Commit Graph

59638 Commits

Author SHA1 Message Date
android-build-team Robot f7fbd135ad Make change and version bump to r_aml_300800200 for mainline module file: adb/apex/apex_manifest.json
Change-Id: Ieaeb532bba164be995f2b6d34478ccfb771b859f
2020-06-04 21:51:12 +00:00
Woody Lin 39bdf397fa libsparse: Limit block size to 64 MB
Limit the block size to 64 MB before fastboot executable binary for
windows 64-bit is released.

Bug: 156057250
Change-Id: Ic4edb963a3d99f718d7630aba3f351729a84e994
2020-06-04 11:36:56 +08:00
Josh Gao 68e713ff0d check_ms_os_desc: fix buffer overflow. am: a311f7866f
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/11726469

Change-Id: Ic9d034f826af1a899b7c467d2dab78b6a1f14d10
2020-06-04 00:12:24 +00:00
Josh Gao a311f7866f check_ms_os_desc: fix buffer overflow.
Bug: http://b/155505587
Test: check_ms_os_desc
Change-Id: Ie99715ab62571d24460c3a1fb859d22951f30cb8
Merged-In: Ie99715ab62571d24460c3a1fb859d22951f30cb8
2020-06-03 15:32:06 -07:00
TreeHugger Robot c92f65a222 Merge changes from topic "multi-kernel-mod-dirs" into rvc-dev am: 0917ad0467
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/11711957

Change-Id: I68877bbfcc70b86bcd922a1e1e986e97f7d78fea
2020-06-03 21:12:42 +00:00
Steve Muckle 664d7d56da add libmodprobe api to query the number of modules loaded am: 8bafa9e28e
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/11711956

Change-Id: I4247d607ce39d74e10acc310b656281ae87db4a2
2020-06-03 21:12:40 +00:00
TreeHugger Robot 0917ad0467 Merge changes from topic "multi-kernel-mod-dirs" into rvc-dev
* changes:
  first_stage_init: support kernel module directories
  add libmodprobe api to query the number of modules loaded
2020-06-03 20:54:33 +00:00
Steve Muckle e35d217958 first_stage_init: support kernel module directories
Kernel modules may be located within directories in /lib/modules.
Attempt to load kernel modules from each directory that has a name starting with
the major and minor version of the currently running kernel. If a single
kernel module is successfully loaded from a directory, that directory is
treated as the correct kernel module directory for the system. No other
kernel module directories are searched and any kernel module load errors
in that directory are fatal. If the attempt to load the first kernel
module from a directory fails, or if there are no kernel modules in a
directory, then the search proceeds to the next directory.

If no kernel module is successfully loaded from any directory as above,
an attempt is made to load kernel modules from the top level at
/lib/modules/.

Bug: 157645635
Change-Id: I92eadd8617f03a645da460ccb776bc04fa541f00
Merged-In: I92eadd8617f03a645da460ccb776bc04fa541f00
2020-06-03 12:11:38 -07:00
Steve Muckle 8bafa9e28e add libmodprobe api to query the number of modules loaded
In the short term this will be used to help implement support for
multiple kernel module directories but it may be useful in other
contexts as well.

Bug: 157645635
Change-Id: I15a252b6e9394292c8f3557ed65112c935830441
Merged-In: I15a252b6e9394292c8f3557ed65112c935830441
2020-06-03 12:11:15 -07:00
Mohammad Samiul Islam 312598ac90 Merge "Create /metadata/staged-install dir to store staged install failure reasons" into rvc-dev am: 000226f1d5
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/11408963

Change-Id: I9fac99764b0029b69b58107ef037265d7e6816cd
2020-06-03 10:19:46 +00:00
Mohammad Samiul Islam 000226f1d5 Merge "Create /metadata/staged-install dir to store staged install failure reasons" into rvc-dev 2020-06-03 09:57:18 +00:00
android-build-team Robot 8a1dad4215 Snap for 6549967 from 1eb8341e15 to mainline-release
Change-Id: I8492c8cc94075c79495458bd2417e293150297b4
2020-06-02 07:06:40 +00:00
Tej Singh 1eb8341e15 Merge "Retry pullfinish with empty payload if call fails" into rvc-dev am: 84db2e40e1
Original change: undetermined

Change-Id: Idf515704bc550643cbfdb5aa874c64b566121adc
2020-06-01 19:18:54 +00:00
Tej Singh 84db2e40e1 Merge "Retry pullfinish with empty payload if call fails" into rvc-dev 2020-06-01 19:14:09 +00:00
android-build-team Robot 19c4992ed0 Snap for 6546508 from 00f9033f79 to mainline-release
Change-Id: Ie9d12ca1cadbee4fe2497cd4ad8c522df8ce7018
2020-06-01 07:13:32 +00:00
Yifan Hong 00f9033f79 Merge "libsnapshot: proto use correct index" into rvc-dev am: ee418ecb66
Change-Id: Ifc6119b6da686bd045f300f964f4875aaa1579a1
2020-05-31 21:58:51 +00:00
Yifan Hong ee418ecb66 Merge "libsnapshot: proto use correct index" into rvc-dev 2020-05-31 21:47:14 +00:00
Alessio Balsini 4eed181718 Merge "libsnapshot: Export COW image size" into rvc-dev am: 3ec696d0ce
Change-Id: I478dd338324f2cb939c60e66f7b49242844f7cf6
2020-05-31 12:28:44 +00:00
Alessio Balsini 3ec696d0ce Merge "libsnapshot: Export COW image size" into rvc-dev 2020-05-31 12:20:46 +00:00
android-build-team Robot cf7f053298 Snap for 6545159 from b51a1b7335 to mainline-release
Change-Id: I7e51975b2039d7ef4cdef10d327ead5cff23010d
2020-05-31 07:08:12 +00:00
Howard Ro b51a1b7335 Merge "Libstatspull: decrease default pull timeout to 2s" into rvc-dev am: 413668bcf3
Change-Id: I3f85933303129256e3a089b88ef03fff357f6415
2020-05-30 10:18:15 +00:00
Howard Ro 413668bcf3 Merge "Libstatspull: decrease default pull timeout to 2s" into rvc-dev 2020-05-30 09:59:13 +00:00
Yifan Hong 8d996c4d3f libsnapshot: proto use correct index
Test: pass
Bug: 154016862
Change-Id: I845d2250ddb27bdbaee0d54663a2fdb45dbfbd11
2020-05-30 03:13:17 +01:00
Alessio Balsini 2898343409 libsnapshot: Export COW image size
Enable libsnapshot to export the size of the COW image, representing the
fraction of the COW device that is temporarily created in the /data
partition, computed just before initializing a merge operation.
Thise additional information can be used by other components (i.e.,
update engine) to enrich Virtual A/B metrics.

Bug: 154016862
Test: manual OTA
Signed-off-by: Alessio Balsini <balsini@google.com>
Signed-off-by: Yifan Hong <elsk@google.com>
Change-Id: I4faa0785f23884e26161e0d51268dd7a305d86bf
Merged-In: I4faa0785f23884e26161e0d51268dd7a305d86bf
(cherry picked from commit 2a1778d340)
2020-05-30 03:12:57 +01:00
Tej Singh 00ffb6c77e Libstatspull: decrease default pull timeout to 2s
Decrease the default pull timeout to 2 seconds.

Test: atest LibStatsPullTests
Test: atest libstatspull_test
Bug: 154056912
Change-Id: I8f7660de64e8c74a8c7ce7d252369c0456895e3b
2020-05-29 23:37:21 +00:00
David Anderson 78c6f365cd libdm: Fallback to legacy ueventd logic if running on an older system. am: b2cc8cb2d7
Change-Id: I5050d859e12d3ea85c5bbefaa42f76d3b1ec897a
2020-05-29 22:25:52 +00:00
Tej Singh c95f781901 Retry pullfinish with empty payload if call fails
If the first call for pullFinished fails, it is likely because the
transaction is too large. Currently, if this happens statsd will just
sleep until the timeout. With this change, the client will retry calling
pullFinish if the first attempt fails, but with an empty payload (and
with success = false) to cause the puller to fail fast, and so statsd
does not wait for the timeout.

Test: atest LibStatsPullTests
Bug: 157768117
Change-Id: I3af991fae47bb7c09bf8a6fc83f28556b836c6e4
2020-05-29 15:21:08 -07:00
David Anderson b2cc8cb2d7 libdm: Fallback to legacy ueventd logic if running on an older system.
When delivering single-stage, non-AB OTAs, the updater binary is built
on a newer OS than recovery is compiled with. libdm relies on newer ueventd
behavior which therefore breaks this model. As a workaround, we allow
libdm to fallback to the old ueventd logic if the following conditions
hold true: (1) we're in recovery, (2) the device is not an AB device,
and (3) the release is <= 10.

Since the old ueventd behavior can lead to races in libdm, this fallback
should stay as narrow as possible.

Bug: 156536673
Bug: 155202260
Test: manual test
Change-Id: I7f9da49e4ba8dfe165e0923d9918827d51d090cd
2020-05-29 18:13:48 +00:00
Martijn Coenen 752ed87cc9 Merge changes from topic "fusectl" into rvc-dev am: 6030f2f016
Change-Id: Id351b58f26ed663e79f891a376e03f0e52023805
2020-05-29 14:55:10 +00:00
Martijn Coenen 6030f2f016 Merge changes from topic "fusectl" into rvc-dev
* changes:
  Abort FUSE filesystems during shutdown.
  Abort FUSE filesystem when Zygote restarts.
  Mount fusectl filesystem.
2020-05-29 14:41:20 +00:00
android-build-team Robot a8ea9b0ed7 Snap for 6539570 from 736e7b4afa to mainline-release
Change-Id: I33e56d1408facbd3905a02db15e8c4c62c6a63c0
2020-05-29 07:00:47 +00:00
Christopher Ferris 736e7b4afa Fail explicitly on length overflow. am: bff51b88aa
Change-Id: I349be60206e9c1f673d845d07b76b4540d25c2f5
2020-05-29 01:01:59 +00:00
Christopher Ferris bff51b88aa Fail explicitly on length overflow.
Instead of aborting when FileMap::create detects an overflow, detect the
overflow directly and fail the call.

Bug: 156997193

Test: Ran unit tests, including new unit test that aborted before.
Merged-In: Ie49975b8949fd12bbde14346ec9bbb774ef88a51
Change-Id: Ie49975b8949fd12bbde14346ec9bbb774ef88a51
(cherry picked from commit 68604b9c29)
2020-05-28 15:46:51 -07:00
TreeHugger Robot 79c2098ab9 Merge "Add ro.boot.fstab_suffix and modify mount_all to use it" into rvc-dev am: 87ee2378de
Change-Id: I56e3d250550cf66a92a69a63c87d89ce4f448c68
2020-05-28 17:29:59 +00:00
Martijn Coenen 860ba64393 Abort FUSE filesystems during shutdown.
To ensure we can shutdown cleanly, and don't hang an outstanding
requests to a FUSE host daemon that has already exited.

Bug: 153411204
Test: inspect logs during shutdown
Change-Id: I8e6479bd54dbc1fc85b087617aa6b16be9f15a3b
2020-05-28 19:11:07 +02:00
Martijn Coenen dd0440f4e5 Abort FUSE filesystem when Zygote restarts.
The FUSE filesystem is implemented by a Zygote child. If Zygote dies,
all of its children die along with it, including the FUSE daemon. The
FUSE filesystem is cleaned up automatically whenever the /dev/fuse file
descriptor of the FUSE daemon is closed. However, due to the way the
binder driver holds on to the 'struct files' of processes in the kernel,
the closing of FDs of all of Zygote's children is serialized.

That in turn means that, if a process has a file with dirty pages on
FUSE, and that FD is closed *before* the FUSE FD, the FUSE kernel driver
will happily issue a request to the FUSE daemon to serve that request.
But since the FUSE userspace daemon is already dead, it will never get
served. And because the closing of all FDs is serialized, we will never
close the FUSE fd to unblock this request.

Solve this particular case by manually aborting the FUSE filesystem when
Zygote restarts. Because we now explicitly close the FUSE fd, the FUSE
filesystem will be cleaned up, all outstanding requests to it will be
cancelled, and new ones will be skipped.

Bug: 153411204
Test: kill zygote manually
Change-Id: I2cb6c1a03cc1a932461ff33558894a428ff35180
2020-05-28 19:11:01 +02:00
TreeHugger Robot 87ee2378de Merge "Add ro.boot.fstab_suffix and modify mount_all to use it" into rvc-dev 2020-05-28 17:05:49 +00:00
Martijn Coenen 959dcf106d Mount fusectl filesystem.
To allow us to manually abort FUSE filesystems.

Bug: 153411204
Test: inspect /sys/fs/fuse/
Change-Id: I150597635d62932aa70ee696b4d978c822e6ea8d
2020-05-28 16:25:45 +02:00
android-build-team Robot b00b381cb3 Snap for 6535363 from db08cf228d to mainline-release
Change-Id: Ifd28f0a7bbe66444276ee402117bcdf82f5cf298
2020-05-28 07:00:53 +00:00
Alistair Delva c631f94c77 Add ro.boot.fstab_suffix and modify mount_all to use it
Currently the ReadDefaultFstab function, which calls GetFstabPath,
makes some assumptions about what the fstab will be called and where
it is located. This is being used by vold to set up userdata encryption
and for gsid, and is even used in the default boot control HAL, so it
has become quite baked.

The original way for a board to specify things to mount was to use the
"mount_all /path/to/fstab" command in init.rc. However, due to the
above functionality, the path after mount_all is no longer very useful,
as it cannot differ from the inferred path, or userdata encryption and
other features will be broken.

On Cuttlefish, we have an interest in being able to test alternative
userdata configurations (ext4 vs f2fs, encryption on/off, etc.) and
currently the only way to achieve this is to either a) modify the
ro.hardware or ro.hardware.platform properties, which breaks a bunch
of things like default HAL filenames, or regenerate our odm.img or
vendor.img filesystems. We can't simply install another fstab and
point to it with "mount_all".

This change allows the fstab path to be omitted from "mount_all", and
adds another property which overrides the existing checks for
fstab.${ro.hardware} and fstab.${ro.hardware.platform}. Specifying
${ro.boot.fstab_suffix} will cause fstab.${ro.boot.fstab_suffix}
to be checked first.

Bug: 142424832
Test: booted cuttlefish with 'mount_all ${ro.hardware} --late'
Test: booted cuttlefish with 'mount_all --late'
Test: booted cuttlefish with 'mount_all --late' and fstab_suffix=f2fs
Test: partially booted cuttlefish with 'mount_all ${ro.hardware}'
Test: partially booted cuttlefish with 'mount_all'
Change-Id: I3e10f66aecfcd48bdb9ebf1d304b7aae745cbd3c
Merged-In: I3e10f66aecfcd48bdb9ebf1d304b7aae745cbd3c
2020-05-28 00:07:05 +00:00
Chen Zhu db08cf228d Merge "Add test config to libstatspull_test and libstatssocket_test" into rvc-dev am: f584432c90
Change-Id: I6a0a0058fb97d97b6896bef1e0c3a6b0ac070f5b
2020-05-27 07:54:27 +00:00
Chen Zhu f584432c90 Merge "Add test config to libstatspull_test and libstatssocket_test" into rvc-dev 2020-05-27 07:47:03 +00:00
TreeHugger Robot 5c79d3cca4 Merge changes I1118f2e2,I6c039b32 into rvc-dev am: d4c8a20d4b
Change-Id: I583e3c8a22de90f3fb0d42d547271cca6dd70633
2020-05-27 05:47:36 +00:00
TreeHugger Robot d4c8a20d4b Merge changes I1118f2e2,I6c039b32 into rvc-dev
* changes:
  adb: only submit USB writes on the worker thread.
  adbd: don't use libc++_static.
2020-05-27 05:15:55 +00:00
android-build-team Robot 6368ec173f Snap for 6523363 from de8f3470b0 to mainline-release
Change-Id: I118b9ffc293f432702caeb4d6461dfdb1a6d2a19
2020-05-24 07:11:03 +00:00
Paul Crowley de8f3470b0 Merge "emmc_optimized means stable_inodes" into rvc-dev am: c05e7c0236
Change-Id: Id0a268cce7f7081be2decd8a1cd9a7a343f13373
2020-05-23 22:38:07 +00:00
Paul Crowley c05e7c0236 Merge "emmc_optimized means stable_inodes" into rvc-dev 2020-05-23 22:20:06 +00:00
Paul Crowley e96d6a9067 emmc_optimized means stable_inodes
If the emmc_optimized filesystem flag is set, then like
inlinecrypt_optimized, we have to ensure that stable_inodes is set
on the filesystem.

Bug: 144046242
Test: Cuttlefish, ext4: set the flag in fstab, check for the
    stable_inodes flag using tunefs -l
Cherry-Picked-From: c2f37683bc
Merged-In: Id7f906564457c240ddf6677dd536698881385385
Change-Id: Id7f906564457c240ddf6677dd536698881385385
2020-05-21 15:20:51 -07:00
Josh Gao 6da375fdc9 adb: only submit USB writes on the worker thread.
After USB disconnection, io_submit will block until the endpoint comes
back up. We handle this in the worker thread by sending it a signal to
break it out of io_submit when we notice that USB has gone down, but
opportunistic writes from the main thread can get stuck in this scenario
as well. Submitting the writes only on the worker thread doesn't have a
measurable impact on performance, so avert this scenario by only
submitting writes from the worker thread.

Bug: http://b/157078255
Test: test_device.py
Change-Id: I1118f2e2a70d13f15592eb996e7084033ed5cb9d
(cherry picked from commit 962551000b)
2020-05-21 14:55:46 -07:00
Josh Gao 2081cf31b3 adbd: don't use libc++_static.
We have dependencies that use libc++_shared, which results in ODR
violation manifesting as host adbd crashing on launch in libc++ locale
initialization.

Bug: http://b/151056300
Test: adbd on host
Change-Id: I6c039b325308fb8c36dfe5c1d090ff4ebe9e3433
(cherry picked from commit d5d5ba1644)
2020-05-21 14:55:38 -07:00