Merge "Pulls android-info.txt from system_image_dir."
diff --git a/host/commands/assemble_cvd/boot_image_utils.cc b/host/commands/assemble_cvd/boot_image_utils.cc
index 572fd41..285daa4 100644
--- a/host/commands/assemble_cvd/boot_image_utils.cc
+++ b/host/commands/assemble_cvd/boot_image_utils.cc
@@ -241,13 +241,19 @@
bootconfig_fd->Write(bootconfig.c_str(), bootconfig.size());
LOG(DEBUG) << "Bootconfig parameters from vendor boot image and config are "
<< ReadFile(instance_internal_dir + "/bootconfig");
-
std::string vendor_boot_params = ReadFile(build_dir + "/vendor_boot_params");
auto kernel_cmdline =
ExtractValue(vendor_boot_params, "vendor command line args: ") +
(bootconfig_supported
? ""
: " " + android::base::StringReplace(bootconfig, "\n", " ", true));
+ if (!bootconfig_supported) {
+ // "androidboot.hardware" kernel parameter has changed to "hardware" in
+ // bootconfig and needs to be replaced before being used in the kernel
+ // cmdline.
+ kernel_cmdline = android::base::StringReplace(
+ kernel_cmdline, " hardware=", " androidboot.hardware=", true);
+ }
LOG(DEBUG) << "Cmdline from vendor boot image is " << kernel_cmdline;
auto tmp_vendor_boot_image_path = new_vendor_boot_image_path + TMP_EXTENSION;
diff --git a/host/commands/bt_connector/main.cpp b/host/commands/bt_connector/main.cpp
index aeab339..1b8d291 100644
--- a/host/commands/bt_connector/main.cpp
+++ b/host/commands/bt_connector/main.cpp
@@ -65,7 +65,10 @@
while (true) {
char buf[1024];
auto read = bt_in->Read(buf, sizeof(buf));
- if (cuttlefish::WriteAll(sock, buf, read) == -1) {
+ while (cuttlefish::WriteAll(sock, buf, read) == -1) {
+ LOG(ERROR) << "failed to write to socket, retry.";
+ // Wait for the host process to be ready
+ sleep(1);
openSocket(&sock, FLAGS_hci_port);
}
}
@@ -76,6 +79,9 @@
char buf[1024];
auto read = sock->Read(buf, sizeof(buf));
if (read == -1) {
+ LOG(ERROR) << "failed to read from socket, retry.";
+ // Wait for the host process to be ready
+ sleep(1);
openSocket(&sock, FLAGS_hci_port);
continue;
}
diff --git a/host/libs/config/bootconfig_args.cpp b/host/libs/config/bootconfig_args.cpp
index f48a96b..b7c7f7a 100644
--- a/host/libs/config/bootconfig_args.cpp
+++ b/host/libs/config/bootconfig_args.cpp
@@ -86,7 +86,7 @@
auto vmm = vm_manager::GetVmManager(config.vm_manager());
AppendVector(&bootconfig_args,
vmm->ConfigureBootDevices(instance.virtual_disk_paths().size()));
- // TODO(b/173815685): Resolve issue with androidboot.hardware and add GpuMode
+ AppendVector(&bootconfig_args, vmm->ConfigureGpuMode(config.gpu_mode()));
bootconfig_args.push_back(
concat("androidboot.serialno=", instance.serial_number()));
diff --git a/host/libs/config/kernel_args.cpp b/host/libs/config/kernel_args.cpp
index c4789dc..7a9a40e 100644
--- a/host/libs/config/kernel_args.cpp
+++ b/host/libs/config/kernel_args.cpp
@@ -24,13 +24,11 @@
#include "common/libs/utils/environment.h"
#include "common/libs/utils/files.h"
#include "host/libs/config/cuttlefish_config.h"
-#include "host/libs/vm_manager/crosvm_manager.h"
#include "host/libs/vm_manager/qemu_manager.h"
#include "host/libs/vm_manager/vm_manager.h"
namespace cuttlefish {
-using vm_manager::CrosvmManager;
using vm_manager::QemuManager;
namespace {
@@ -100,8 +98,6 @@
std::vector<std::string> kernel_cmdline;
AppendVector(&kernel_cmdline, VmManagerKernelCmdline(config));
- auto vmm = vm_manager::GetVmManager(config.vm_manager());
- AppendVector(&kernel_cmdline, vmm->ConfigureGpuMode(config.gpu_mode()));
if (config.enable_gnss_grpc_proxy()) {
kernel_cmdline.push_back("gnss_cmdline.serdev=serial8250/serial0/serial0-0");
diff --git a/host/libs/vm_manager/crosvm_manager.cpp b/host/libs/vm_manager/crosvm_manager.cpp
index 6ce5de5..8739b75 100644
--- a/host/libs/vm_manager/crosvm_manager.cpp
+++ b/host/libs/vm_manager/crosvm_manager.cpp
@@ -110,7 +110,7 @@
"androidboot.cpuvulkan.version=" + std::to_string(VK_API_VERSION_1_1),
"androidboot.hardware.gralloc=minigbm",
"androidboot.hardware.hwcomposer=cutf",
- "androidboot.hardware.egl=angle",
+ "androidboot.hardware.egl=swiftshader",
"androidboot.hardware.vulkan=pastel",
};
}
diff --git a/shared/BoardConfig.mk b/shared/BoardConfig.mk
index c77440d..7b7f759 100644
--- a/shared/BoardConfig.mk
+++ b/shared/BoardConfig.mk
@@ -202,7 +202,7 @@
BOARD_KERNEL_CMDLINE += firmware_class.path=/vendor/etc/
BOARD_KERNEL_CMDLINE += init=/init
-BOARD_BOOTCONFIG += androidboot.hardware=cutf_cvm
+BOARD_BOOTCONFIG += hardware=cutf_cvm
# TODO(b/176860479): Remove once goldfish and cuttlefish share a wifi implementation
BOARD_KERNEL_CMDLINE += mac80211_hwsim.radios=0
diff --git a/shared/sepolicy/system_ext/private/mediaprovider.te b/shared/sepolicy/system_ext/private/mediaprovider.te
new file mode 100644
index 0000000..515ef26
--- /dev/null
+++ b/shared/sepolicy/system_ext/private/mediaprovider.te
@@ -0,0 +1 @@
+gpu_access(mediaprovider)
diff --git a/shared/sepolicy/system_ext/private/traceur_app.te b/shared/sepolicy/system_ext/private/traceur_app.te
new file mode 100644
index 0000000..ed1bead
--- /dev/null
+++ b/shared/sepolicy/system_ext/private/traceur_app.te
@@ -0,0 +1 @@
+gpu_access(traceur_app)