Testowanie za pomocą konfigurowalnego emulatora
Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
Aby emulować niektóre konfiguracje stosowane przez różnych producentów OEM, niektóre profile sprzętowe obsługują konfigurowalność w czasie wykonywania.
Te konfiguracje są implementowane za pomocą nakładek zasobów w czasie wykonywania (RRO). Można nimi zarządzać za pomocą polecenia adb shell cmd overlay
.
Aby włączyć lub wyłączyć RRO, użyj tych poleceń:
adb shell cmd overlay enable NAME
adb shell cmd overlay disable NAME
Zmienianie pozycji paska systemu
Domyślnie konfigurowalny emulator ma 2 paski systemowe: pasek stanu u góry ekranu i pasek nawigacyjny u dołu ekranu. Chociaż wiele samochodów ma ten sam układ, niektóre mają inny. Należy pamiętać, że w niektórych samochodach paski systemowe znajdują się na poziomych krawędziach ekranu, a nie na krawędziach pionowych, co może powodować odstępstwa od założeń przyjętych podczas tworzenia aplikacji na urządzenia mobilne. Więcej informacji i wskazówki techniczne znajdziesz w artykule Pasek systemowych, trybu pełnoekranowego i renderowania od krawędzi do krawędzi.
Do modyfikowania pasków systemu można używać tych RRO:
com.android.systemui.rro.bottom
com.android.systemui.rro.bottom.rounded
com.android.systemui.rro.left
com.android.systemui.rro.right
Emulowanie wycięć w ekranie
Niektóre samochody mają ekrany z wycięciami, które różnią się od tych widocznych na urządzeniach mobilnych. Zamiast wycięć na aparat lub otworów na obiektyw niektóre pojazdy z systemem Android Automotive mają zakrzywione ekrany, które nie są prostokątne. Więcej informacji i wskazówki techniczne znajdziesz w artykule Dostosowanie do wyświetlaczy o nieregularnym kształcie.
Aby emulować wycięcia na wyświetlaczu, możesz użyć tych RRO:
com.android.internal.display.cutout.emulation.top_and_right
com.android.internal.display.cutout.emulation.free_form
com.android.internal.emulation.automotive_ultrawide_cutout
Zalecane konfiguracje testowe
Ponieważ łączna liczba konfiguracji, które można utworzyć, łącząc te recenzje, jest dość duża, zalecamy przetestowanie aplikacji przy użyciu tych kombinacji profilów sprzętowych i recenzji, które są podobne do niektórych pojazdów dostępnych obecnie na rynku.
- Motoryzacja (1080p w orientacji poziomej) z
com.android.systemui.rro.left
lub com.android.systemui.rro.right
- Automotive Ultrawide z
com.android.systemui.rro.left
i com.android.internal.emulation.automotive_ultrawide_cutout
Treść strony i umieszczone na niej fragmenty kodu podlegają licencjom opisanym w Licencji na treści. Java i OpenJDK są znakami towarowymi lub zastrzeżonymi znakami towarowymi należącymi do firmy Oracle lub jej podmiotów stowarzyszonych.
Ostatnia aktualizacja: 2025-07-27 UTC.
[[["Łatwo zrozumieć","easyToUnderstand","thumb-up"],["Rozwiązało to mój problem","solvedMyProblem","thumb-up"],["Inne","otherUp","thumb-up"]],[["Brak potrzebnych mi informacji","missingTheInformationINeed","thumb-down"],["Zbyt skomplikowane / zbyt wiele czynności do wykonania","tooComplicatedTooManySteps","thumb-down"],["Nieaktualne treści","outOfDate","thumb-down"],["Problem z tłumaczeniem","translationIssue","thumb-down"],["Problem z przykładami/kodem","samplesCodeIssue","thumb-down"],["Inne","otherDown","thumb-down"]],["Ostatnia aktualizacja: 2025-07-27 UTC."],[],[],null,["# Test using the configurable emulator\n\nTo help emulate some of the configurations seen across OEMs, certain [hardware\nprofiles](/training/cars/testing/emulator#bundled-profiles) support runtime\nconfigurability.\n\nThese configurations are implemented using [Runtime Resource\nOverlays](https://source.android.com/docs/core/runtime/rros) (RROs)\nand can be managed using the `adb shell cmd overlay` command.\n\nUse the following commands to enable or disable a RRO: \n\n adb shell cmd overlay enable \u003cvar translate=\"no\"\u003eNAME\u003c/var\u003e\n adb shell cmd overlay disable \u003cvar translate=\"no\"\u003eNAME\u003c/var\u003e\n\nModify system bar position\n--------------------------\n\nBy default, the configurable emulator has two system bars -- a status bar on the\ntop of the screen and a navigation bar at the bottom of the screen. Though many\ncars share this layout, some don't. Of particular note is that some cars have\ntheir system bar(s) on the horizontal sides of the screen and not the vertical\nsides, which may break assumptions made when developing apps for mobile form\nfactors. See [System bars, immersive mode, and\nedge-to-edge rendering](/training/cars/parked/automotive-os#bars-immersive-edge)\nfor more details and technical guidance.\n\nThe following RROs can be used to modify the system bars:\n\n- `com.android.systemui.rro.bottom`\n- `com.android.systemui.rro.bottom.rounded`\n- `com.android.systemui.rro.left`\n- `com.android.systemui.rro.right`\n\nEmulate display cutouts\n-----------------------\n\nSome cars have screens with display cutouts that are very different when\ncompared to those seen on mobile devices. Instead of the notches or pinhole\ncamera cutouts, some Android Automotive OS vehicles have curved screens that\nmake the screen non-rectangular. See [Adapt to irregularly shaped displays](/training/cars/parked/automotive-os#irregular-displays)\nfor more details and technical guidance.\n\nThe following RROs can be used to emulate display cutouts:\n\n- `com.android.internal.display.cutout.emulation.top_and_right`\n- `com.android.internal.display.cutout.emulation.free_form`\n- `com.android.internal.emulation.automotive_ultrawide_cutout`\n\nRecommended testing configurations\n----------------------------------\n\nSince the total number of configurations that can be created by combining these\nRROs is quite large, we recommend testing your app using the following\ncombinations of [hardware profiles](/training/cars/testing/emulator#bundled-profiles)\nand RROs, which are similar to some vehicles on the road today.\n\n- *Automotive (1080p landscape)* with `com.android.systemui.rro.left` or `com.android.systemui.rro.right`\n- *Automotive Ultrawide* with `com.android.systemui.rro.left` and `com.android.internal.emulation.automotive_ultrawide_cutout`"]]