From b1814f8fa9d2ad78eed5a62d9d93c7c522f23c8c Mon Sep 17 00:00:00 2001 From: jschung Date: Thu, 2 May 2024 22:07:11 +0900 Subject: Apply forced coldboot for distant display Temporally applyed folced coldboot as the distant display emulator shows invalid activity screen on snapboot. It's not 100% reproducible but it would be better to avoid weird situation by applying coldboot before getting complete resolution. Bug: 338307682 Test: build and launch distant display emulator Change-Id: I04724f23f6b5acf9a34152dc244a48d495aa02ce --- android/android-emu/android/snapshot/Quickboot.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/android/android-emu/android/snapshot/Quickboot.cpp b/android/android-emu/android/snapshot/Quickboot.cpp index dd7d3b8ca1..e296f6acea 100644 --- a/android/android-emu/android/snapshot/Quickboot.cpp +++ b/android/android-emu/android/snapshot/Quickboot.cpp @@ -20,6 +20,7 @@ #include "android/base/files/IniFile.h" #include "android/cmdline-option.h" #include "android/console.h" +#include "android/emulation/AutoDisplays.h" #include "host-common/FeatureControl.h" #include "host-common/hw-config.h" #include "android/metrics/MetricsReporter.h" @@ -369,6 +370,16 @@ bool Quickboot::load(const char* name) { LOG(WARNING) << "Exiting emulator as requested by the user..."; mVmOps.vmShutdown(); } + } else if (android::automotive::isDistantDisplaySupported( + getConsoleAgents()->settings->avdInfo())) { + // Applying forced cold boot for automotive distant display emulator + // TODO: revert when fixed the snapboot issue in b/338307682 + mWindow.showMessage("Forced cold boot for automotive distant display emulator", + WINDOW_MESSAGE_OK, kDefaultMessageTimeoutMs); + reportFailedLoad(pb::EmulatorQuickbootLoad:: + EMULATOR_QUICKBOOT_LOAD_COLD_AVD, + FailureReason::Empty); + LOG(WARNING) << "Forced cold boot for automotive distant display emulator"; } else { // TODO: Figure out how we can detect that this snapshot caused a crash? // See b/233665745 -- cgit v1.2.3 From fae3be1cc9e317c7a3f820ecbd93982930726c5f Mon Sep 17 00:00:00 2001 From: Hyun Jae Moon Date: Thu, 2 May 2024 17:54:57 +0000 Subject: Include jansene, shuohsu, hyunjaemoon to CC for fetch_netsim repo upload Test: android/build/tools/fetch_netsim/fetch-netsim.sh --bid NETSIM_DEV_BUILD_ID Bug: 334930560 Change-Id: Ibf77df52b3c961c03343058df795afe80b75b5ce --- android/build/tools/fetch_netsim/src/aemu/main.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/android/build/tools/fetch_netsim/src/aemu/main.py b/android/build/tools/fetch_netsim/src/aemu/main.py index 660c290ebd..cc0e1ffd26 100644 --- a/android/build/tools/fetch_netsim/src/aemu/main.py +++ b/android/build/tools/fetch_netsim/src/aemu/main.py @@ -261,6 +261,13 @@ def main(): type=str, help="Set of reviewers for the gerrit change that will be created.", ) + parser.add_argument( + "--cc", + default="jansene@google.com,shuohsu@google.com,hyunjaemoon@google.com", + dest="cc", + type=str, + help="Set of ccs for the gerrit change that will be created.", + ) parser.add_argument( "--dry-run", action="store_true", @@ -325,6 +332,7 @@ def main(): "Presubmit-Ready+1", f"--br=netsim-{bid}", f"--re={args.reviewers}", + f"--cc={args.cc}", str(destination_dir), ], dry_run=args.dry_run, -- cgit v1.2.3 From 5b70f5e4feebef38788dc9d4d599a3cf7f73023b Mon Sep 17 00:00:00 2001 From: Yahan Zhou Date: Fri, 26 Apr 2024 13:10:55 -0700 Subject: Temporarily turn off -gpu angle on windows We redirect it to swiftshader for now. It seems like -gpu angle has been broken for a while. Let's turn it back on once we have a proper fix. After the patch it should behave the same as 34.1.* (There seems to be another bug that causes 34.1.* to use swiftshader with -gpu angle.) Test: boot emulator on windows with -gpu angle Bug: 328275986 Change-Id: I6f8a306c2e65e443914dd40abbf853fedd95e6bf --- .../modules/aemu-gl-init/src/android/opengl/emugl_config.cpp | 12 ++++++++---- .../test/android/opengl/emugl_config_unittest.cpp | 7 ++++--- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/android/android-ui/modules/aemu-gl-init/src/android/opengl/emugl_config.cpp b/android/android-ui/modules/aemu-gl-init/src/android/opengl/emugl_config.cpp index 6771c23658..653b275f3f 100644 --- a/android/android-ui/modules/aemu-gl-init/src/android/opengl/emugl_config.cpp +++ b/android/android-ui/modules/aemu-gl-init/src/android/opengl/emugl_config.cpp @@ -467,10 +467,6 @@ bool emuglConfig_init(EmuglConfig* config, return true; } - if (!strcmp("angle", gpu_mode)) { - gpu_mode = "angle_indirect"; - } - if (!strcmp("swiftshader", gpu_mode)) { gpu_mode = "swiftshader_indirect"; } @@ -605,7 +601,15 @@ bool emuglConfig_init(EmuglConfig* config, __func__, gpu_mode, uiPreferredBackend); } } + config->use_host_vulkan = use_host_vulkan; + + // b/328275986: Turn off ANGLE because it breaks. + if (!strcmp("angle", gpu_mode) || !strcmp("angle_indirect", gpu_mode) + || !strcmp("angle9", gpu_mode) || !strcmp("angle9_indirect", gpu_mode)) { + gpu_mode = "swiftshader_indirect"; + } + const char* library_mode = gpu_mode; printf("library_mode %s gpu mode %s\n", library_mode, gpu_mode); if ((force_swiftshader_to_swangle && strstr(library_mode, "swiftshader")) diff --git a/android/android-ui/modules/aemu-gl-init/test/android/opengl/emugl_config_unittest.cpp b/android/android-ui/modules/aemu-gl-init/test/android/opengl/emugl_config_unittest.cpp index fbda28e32d..3120df4273 100644 --- a/android/android-ui/modules/aemu-gl-init/test/android/opengl/emugl_config_unittest.cpp +++ b/android/android-ui/modules/aemu-gl-init/test/android/opengl/emugl_config_unittest.cpp @@ -268,10 +268,11 @@ TEST(EmuglConfig, initFromUISetting) { EXPECT_STREQ("host", config.backend); break; case 1: - EXPECT_STREQ("angle_indirect", config.backend); + // b/328275986: Turn off ANGLE for now. + //EXPECT_STREQ("angle_indirect", config.backend); break; case 2: - EXPECT_STREQ("angle_indirect", config.backend); + //EXPECT_STREQ("angle_indirect", config.backend); break; case 3: #ifdef __APPLE__ @@ -290,7 +291,7 @@ TEST(EmuglConfig, initFromUISetting) { } } -TEST(EmuglConfig, initGLESv2Only) { +TEST(EmuglConfig, DISABLED_initGLESv2Only) { TestSystem testSys("foo", System::kProgramBitness, "/"); TestTempDir* myDir = testSys.getTempRoot(); myDir->makeSubDir(System::get()->getLauncherDirectory().c_str()); -- cgit v1.2.3 From 1171d4f3501257528d14d61901fd106b58eade7d Mon Sep 17 00:00:00 2001 From: Bo Hu Date: Thu, 2 May 2024 17:16:26 -0700 Subject: linux: force AMD gpu to turn on VulkanAllocateHostMemory Change-Id: Icb7df29d060b103d515404abab7f9f47ad72268c --- .../modules/aemu-gl-init/src/android/opengl/emugl_config.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/android/android-ui/modules/aemu-gl-init/src/android/opengl/emugl_config.cpp b/android/android-ui/modules/aemu-gl-init/src/android/opengl/emugl_config.cpp index 6771c23658..cecef543ac 100644 --- a/android/android-ui/modules/aemu-gl-init/src/android/opengl/emugl_config.cpp +++ b/android/android-ui/modules/aemu-gl-init/src/android/opengl/emugl_config.cpp @@ -664,7 +664,9 @@ bool emuglConfig_init(EmuglConfig* config, emuglConfig_get_vulkan_hardware_gpu(&vkVendor, &vkMajor, &vkMinor, &vkPatch); #if defined(__linux__) - if (vkVendor && strncmp("AMD", vkVendor, 3) == 0) { + bool isAMD = (vkVendor && strncmp("AMD", vkVendor, 3) == 0); + bool isIntel = (vkVendor && strncmp("Intel", vkVendor, 5) == 0); + if (isAMD) { feature_set_if_not_overridden( kFeature_VulkanAllocateDeviceMemoryOnly, true); if (fc::isEnabled(fc::VulkanAllocateDeviceMemoryOnly)) { @@ -674,7 +676,7 @@ bool emuglConfig_init(EmuglConfig* config, vkVendor); } } - if (vkVendor && strncmp("Intel", vkVendor, 5) == 0) { + if (isIntel || isAMD) { feature_set_if_not_overridden(kFeature_VulkanAllocateHostMemory, true); if (fc::isEnabled(fc::VulkanAllocateHostMemory)) { -- cgit v1.2.3 From 6647b908836bba524b36cd5d59ce65e1f195546a Mon Sep 17 00:00:00 2001 From: Yahan Zhou Date: Fri, 3 May 2024 17:22:55 +0000 Subject: Revert "Turn on MoltenVK with -gpu host" This reverts commit 779369a46db953e1c8b7920e07b630710e09a22b. Reason for revert: b/338555594 Change-Id: I038440685f3c41f060208d413eead0b26ebc4b10 --- .../aemu-gl-init/src/android/opengl/emugl_config.cpp | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/android/android-ui/modules/aemu-gl-init/src/android/opengl/emugl_config.cpp b/android/android-ui/modules/aemu-gl-init/src/android/opengl/emugl_config.cpp index 653b275f3f..aa264f1e6f 100644 --- a/android/android-ui/modules/aemu-gl-init/src/android/opengl/emugl_config.cpp +++ b/android/android-ui/modules/aemu-gl-init/src/android/opengl/emugl_config.cpp @@ -479,13 +479,8 @@ bool emuglConfig_init(EmuglConfig* config, bitness = System::get()->getProgramBitness(); } -#ifdef __APPLE__ - if (!strcmp("host", gpu_mode)) { - use_host_vulkan = true; - } -#endif - config->bitness = bitness; + config->use_host_vulkan = use_host_vulkan; resetBackendList(bitness); // For GPU mode in software rendering: @@ -589,9 +584,6 @@ bool emuglConfig_init(EmuglConfig* config, break; case WINSYS_GLESBACKEND_PREFERENCE_NATIVEGL: gpu_mode = "host"; -#ifdef __APPLE__ - use_host_vulkan = true; -#endif break; default: gpu_mode = "host"; @@ -601,9 +593,6 @@ bool emuglConfig_init(EmuglConfig* config, __func__, gpu_mode, uiPreferredBackend); } } - - config->use_host_vulkan = use_host_vulkan; - // b/328275986: Turn off ANGLE because it breaks. if (!strcmp("angle", gpu_mode) || !strcmp("angle_indirect", gpu_mode) || !strcmp("angle9", gpu_mode) || !strcmp("angle9_indirect", gpu_mode)) { -- cgit v1.2.3 From 752a1c99257b75425415a6127942fdf0d9519516 Mon Sep 17 00:00:00 2001 From: Hyun Jae Moon Date: Fri, 3 May 2024 22:36:15 +0000 Subject: Update version of hermit-abi to 0.3.0 Change-Id: I5f5de017e9c96500562e2220d4b29d1414f1086e --- android/build/cmake/rust/crates/hermit-abi/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/build/cmake/rust/crates/hermit-abi/Cargo.toml b/android/build/cmake/rust/crates/hermit-abi/Cargo.toml index fa7f0e15df..52bb411868 100644 --- a/android/build/cmake/rust/crates/hermit-abi/Cargo.toml +++ b/android/build/cmake/rust/crates/hermit-abi/Cargo.toml @@ -1,3 +1,3 @@ [package] name = "hermit-abi" -version = "0.2.6" +version = "0.3.0" -- cgit v1.2.3 From a5d12882d5191ac5777599b2cbd37d4b9942e511 Mon Sep 17 00:00:00 2001 From: Joshua Duong Date: Sun, 5 May 2024 23:27:56 -0700 Subject: [embedded] Fix Qt main loop hang on exit. On mac in embedded mode, the Qt main loop may not terminate because QCoreApplication::quit() never gets called. So we call it explicitly. Bug: 338084862 Test: emulator -qt-hide-window Verify snapshot save is successful on shutdown. Change-Id: I7b10fe986941b2fa9d31c7114787fb47a106e2c8 --- .../modules/aemu-ui-qt/src/android/skin/qt/emulator-container.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/android/android-ui/modules/aemu-ui-qt/src/android/skin/qt/emulator-container.cpp b/android/android-ui/modules/aemu-ui-qt/src/android/skin/qt/emulator-container.cpp index 09f286c006..647f29a1ec 100644 --- a/android/android-ui/modules/aemu-ui-qt/src/android/skin/qt/emulator-container.cpp +++ b/android/android-ui/modules/aemu-ui-qt/src/android/skin/qt/emulator-container.cpp @@ -272,6 +272,14 @@ void EmulatorContainer::closeEvent(QCloseEvent* event) { slot_hideModalOverlay(); slot_hideVirtualSceneInfoDialog(); mEmulatorWindow->closeEvent(event); + // In embedded mode, sometimes QCoreApplication::quit() doesn't get called, + // which means the Qt main loop never quits. So let's explicitly call quit() + // here prevent that situation from occurring. + if (getConsoleAgents() + ->settings->android_cmdLineOptions() + ->qt_hide_window) { + qApp->quit(); + } } void EmulatorContainer::focusInEvent(QFocusEvent* event) { -- cgit v1.2.3 From 2c76d1fd07fe4cd3914e767a451bd9c5cc32ce26 Mon Sep 17 00:00:00 2001 From: Devki Date: Wed, 8 May 2024 20:19:29 +0000 Subject: Bump Emulator version to 35.1.9. Bug: 339492893 Test: N/A Change-Id: I01fb3b53609620437821a496e25b14c7ac4df92b --- mac.source.properties | 2 +- source.properties | 2 +- win.source.properties | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/mac.source.properties b/mac.source.properties index e319ed551a..3f1db07be1 100644 --- a/mac.source.properties +++ b/mac.source.properties @@ -1,4 +1,4 @@ Pkg.UserSrc=false -Pkg.Revision=35.1.8 +Pkg.Revision=35.1.9 Pkg.Path=emulator Pkg.Desc=Android Emulator diff --git a/source.properties b/source.properties index e319ed551a..3f1db07be1 100644 --- a/source.properties +++ b/source.properties @@ -1,4 +1,4 @@ Pkg.UserSrc=false -Pkg.Revision=35.1.8 +Pkg.Revision=35.1.9 Pkg.Path=emulator Pkg.Desc=Android Emulator diff --git a/win.source.properties b/win.source.properties index e319ed551a..3f1db07be1 100644 --- a/win.source.properties +++ b/win.source.properties @@ -1,4 +1,4 @@ Pkg.UserSrc=false -Pkg.Revision=35.1.8 +Pkg.Revision=35.1.9 Pkg.Path=emulator Pkg.Desc=Android Emulator -- cgit v1.2.3