aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/libs/fs/shared_fd.cpp4
-rw-r--r--host/commands/run_cvd/boot_state_machine.cc4
-rw-r--r--host/commands/run_cvd/launch/open_wrt.cpp11
-rw-r--r--host/commands/run_cvd/server_loop_impl_snapshot.cpp6
-rw-r--r--host/libs/vm_manager/crosvm_manager.cpp16
-rw-r--r--shared/sepolicy/vendor/bug_map2
-rw-r--r--system_image/Android.bp11
7 files changed, 32 insertions, 22 deletions
diff --git a/common/libs/fs/shared_fd.cpp b/common/libs/fs/shared_fd.cpp
index c1d671ec7..2442787b2 100644
--- a/common/libs/fs/shared_fd.cpp
+++ b/common/libs/fs/shared_fd.cpp
@@ -397,7 +397,11 @@ SharedFD SharedFD::Dup(int unmanaged_fd) {
bool SharedFD::Pipe(SharedFD* fd0, SharedFD* fd1) {
int fds[2];
+#ifdef __linux__
+ int rval = pipe2(fds, O_CLOEXEC);
+#else
int rval = pipe(fds);
+#endif
if (rval != -1) {
(*fd0) = std::shared_ptr<FileInstance>(new FileInstance(fds[0], errno));
(*fd1) = std::shared_ptr<FileInstance>(new FileInstance(fds[1], errno));
diff --git a/host/commands/run_cvd/boot_state_machine.cc b/host/commands/run_cvd/boot_state_machine.cc
index 14c7252e6..fd858a40e 100644
--- a/host/commands/run_cvd/boot_state_machine.cc
+++ b/host/commands/run_cvd/boot_state_machine.cc
@@ -253,10 +253,6 @@ class CvdBootStateMachine : public SetupFeature, public KernelLogPipeConsumer {
SubprocessOptions(), WEXITED)
.ok());
CHECK(Execute({adb_bin_path, "-s", instance_.adb_ip_and_port(),
- "shell", "svc", "wifi", "enable"},
- SubprocessOptions(), WEXITED)
- .ok());
- CHECK(Execute({adb_bin_path, "-s", instance_.adb_ip_and_port(),
"shell", "cmd", "uwb", "enable-uwb"},
SubprocessOptions(), WEXITED)
.ok());
diff --git a/host/commands/run_cvd/launch/open_wrt.cpp b/host/commands/run_cvd/launch/open_wrt.cpp
index 5b84a3b00..289d63f7a 100644
--- a/host/commands/run_cvd/launch/open_wrt.cpp
+++ b/host/commands/run_cvd/launch/open_wrt.cpp
@@ -86,11 +86,12 @@ class OpenWrt : public CommandSource {
wifi_tap = ap_cmd.AddTap(instance_.wifi_tap_name());
}
- if (IsRestoring(config_)) {
- const std::string snapshot_dir = config_.snapshot_path();
- CF_EXPECT(ap_cmd.SetToRestoreFromSnapshot(snapshot_dir, instance_.id(),
- "_openwrt"));
- }
+ // TODO(khei): Enable restore once open_wrt instance restoring is fixed
+ // if (IsRestoring(config_)) {
+ // const std::string snapshot_dir = config_.snapshot_path();
+ // CF_EXPECT(ap_cmd.SetToRestoreFromSnapshot(snapshot_dir, instance_.id(),
+ // "_openwrt"));
+ //}
/* TODO(kwstephenkim): delete this code when Minidroid completely disables
* the AP VM itself
diff --git a/host/commands/run_cvd/server_loop_impl_snapshot.cpp b/host/commands/run_cvd/server_loop_impl_snapshot.cpp
index 9ed21a354..c90c4aca6 100644
--- a/host/commands/run_cvd/server_loop_impl_snapshot.cpp
+++ b/host/commands/run_cvd/server_loop_impl_snapshot.cpp
@@ -155,9 +155,6 @@ Result<void> ServerLoopImpl::HandleSuspend(ProcessMonitor& process_monitor) {
"cmd", "bluetooth_manager", "wait-for-state:STATE_OFF"},
SubprocessOptions(), WEXITED));
CF_EXPECT(Execute({adb_bin_path, "-s", instance_.adb_ip_and_port(), "shell",
- "svc", "wifi", "disable"},
- SubprocessOptions(), WEXITED));
- CF_EXPECT(Execute({adb_bin_path, "-s", instance_.adb_ip_and_port(), "shell",
"cmd", "uwb", "disable-uwb"},
SubprocessOptions(), WEXITED));
// right order: guest -> host
@@ -182,9 +179,6 @@ Result<void> ServerLoopImpl::HandleResume(ProcessMonitor& process_monitor) {
"cmd", "bluetooth_manager", "enable"},
SubprocessOptions(), WEXITED));
CF_EXPECT(Execute({adb_bin_path, "-s", instance_.adb_ip_and_port(), "shell",
- "svc", "wifi", "enable"},
- SubprocessOptions(), WEXITED));
- CF_EXPECT(Execute({adb_bin_path, "-s", instance_.adb_ip_and_port(), "shell",
"cmd", "uwb", "enable-uwb"},
SubprocessOptions(), WEXITED));
LOG(DEBUG) << "The guest resumed.";
diff --git a/host/libs/vm_manager/crosvm_manager.cpp b/host/libs/vm_manager/crosvm_manager.cpp
index 529a660cc..fe25ab896 100644
--- a/host/libs/vm_manager/crosvm_manager.cpp
+++ b/host/libs/vm_manager/crosvm_manager.cpp
@@ -819,9 +819,18 @@ Result<std::vector<MonitorCommand>> CrosvmManager::StartCommands(
// This needs to be the last parameter
crosvm_cmd.Cmd().AddParameter("--bios=", instance.bootloader());
+ std::vector<MonitorCommand> commands;
+
+ if (vhost_user_gpu) {
+ // The vhost user gpu crosvm command should be added before the main
+ // crosvm command so that the main crosvm command can use a prerequisite
+ // to wait for the communication socket to be ready.
+ commands.emplace_back(std::move(vhost_user_gpu->device_cmd));
+ commands.emplace_back(std::move(vhost_user_gpu->device_logs_cmd));
+ }
+
// log_tee must be added before crosvm_cmd to ensure all of crosvm's logs are
// captured during shutdown. Processes are stopped in reverse order.
- std::vector<MonitorCommand> commands;
commands.emplace_back(std::move(crosvm_log_tee_cmd));
if (gpu_capture_enabled) {
@@ -878,11 +887,6 @@ Result<std::vector<MonitorCommand>> CrosvmManager::StartCommands(
commands.emplace_back(std::move(crosvm_cmd.Cmd()), true);
}
- if (vhost_user_gpu) {
- commands.emplace_back(std::move(vhost_user_gpu->device_cmd));
- commands.emplace_back(std::move(vhost_user_gpu->device_logs_cmd));
- }
-
return commands;
}
diff --git a/shared/sepolicy/vendor/bug_map b/shared/sepolicy/vendor/bug_map
index 8a616df25..33a4601aa 100644
--- a/shared/sepolicy/vendor/bug_map
+++ b/shared/sepolicy/vendor/bug_map
@@ -5,3 +5,5 @@ rs privapp_data_file file b/291029681
rs priv_app unix_stream_socket b/291029681
rs priv_app udp_socket b/291029681
mediashell_app rootfs dir b/293075059
+init debugfs_bootreceiver_tracing dir b/340399580
+init debugfs_wifi_tracing dir b/340399580
diff --git a/system_image/Android.bp b/system_image/Android.bp
index 786535f35..8252664a9 100644
--- a/system_image/Android.bp
+++ b/system_image/Android.bp
@@ -302,6 +302,15 @@ android_system_image {
avb_hash_algorithm: "sha256",
deps: [
+ "android.hardware.biometrics.fingerprint@2.1", // generic_system
+ "android.hardware.radio@1.0", // generic_system
+ "android.hardware.radio@1.1", // generic_system
+ "android.hardware.radio@1.2", // generic_system
+ "android.hardware.radio@1.3", // generic_system
+ "android.hardware.radio@1.4", // generic_system
+ "android.hardware.radio.config@1.0", // generic_system
+ "android.hardware.radio.deprecated@1.0", // generic_system
+ "android.hardware.secure_element@1.0", // generic_system
"abx",
"aconfigd",
"aflags",
@@ -330,7 +339,7 @@ android_system_image {
"cgroups.json",
"cmd",
"content",
- "cppreopts.sh", // generic_system
+ "cppreopts.sh", // generic_system
"credstore",
"debuggerd",
"device_config",