Od 27 marca 2025 r. zalecamy używanie android-latest-release
zamiast aosp-main
do kompilowania i wspołtworzenia AOSP. Więcej informacji znajdziesz w artykule o zmianach w AOSP.
Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
BootstrapBuildProvider
public
class
BootstrapBuildProvider
extends Object
implements
IDeviceBuildProvider
java.lang.Object
|
↳ |
com.android.tradefed.build.BootstrapBuildProvider
|
IDeviceBuildProvider
, który inicjalizuje informacje o kompilacji z urządzenia testowego.
Jest to zwykle używane w przypadku urządzeń z kompilacją dostarczoną z zewnątrz, czyli nie wygenerowaną przez wewnętrzny system kompilacji. Niektóre informacje, w szczególności gałąź, nie są dostępne na urządzeniu, dlatego są generowane sztucznie.
Wszystkie metadane kompilacji pochodzą z różnych pól usługi ro.* na urządzeniu
Obecnie dostawca pakietu generuje metadane w ten sposób:
- gałąź:
$(ro.product.brand)-$(ro.product.name)-$(ro.product.device)-$(ro.build.version.release),
np.:
- w przypadku Samsunga S4 z Google Play i Androidem 4.2: samsung-jgedlteue-jgedlte-4.2
- Nexus 7 z Androidem 4.2: google-nakasi-grouper-4.2
- build flavor: jak podano w
ITestDevice.getBuildFlavor()
- build alias: as provided by
ITestDevice.getBuildAlias()
- build id: zgodnie z danymi użytkownika
ITestDevice.getBuildId()
Podsumowanie
Konstruktory publiczne
BootstrapBuildProvider
public BootstrapBuildProvider ()
Metody publiczne
cleanUp
public void cleanUp (IBuildInfo info)
Usuń tymczasowe pliki kompilacji.
Parametry |
info |
IBuildInfo |
getBuild
public IBuildInfo getBuild ()
Pobierz dane dotyczące wersji, która jest testowana.
Zwroty |
IBuildInfo |
IBuildInfo dla wersji, która jest testowana, lub null , jeśli nie ma wersji do przetestowania |
getBuild
public IBuildInfo getBuild (ITestDevice device)
Pobieranie danych wersji testowanej
Parametry |
device |
ITestDevice : ITestDevice przypisane do testu |
Zwroty |
IBuildInfo |
IBuildInfo w przypadku kompilacji testowanej lub null , jeśli nie ma kompilacji do przetestowania |
getTestsDir
public final File getTestsDir ()
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,["# BootstrapBuildProvider\n======================\n\n\n`\npublic\n\n\nclass\nBootstrapBuildProvider\n`\n\n\n`\n\nextends Object\n\n\n`\n\n`\n\n\nimplements\n\n`[IDeviceBuildProvider](../../../../../../reference/tradefed/com/android/tradefed/build/IDeviceBuildProvider.html)`\n\n\n`\n\n|---|---------------------------------------------------|\n| java.lang.Object ||\n| ↳ | com.android.tradefed.build.BootstrapBuildProvider |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nA [IDeviceBuildProvider](../../../../../../reference/tradefed/com/android/tradefed/build/IDeviceBuildProvider.html) that bootstraps build info from the test device\n\n\nThis is typically used for devices with an externally supplied build, i.e. not generated by\nin-house build system. Certain information, specifically the branch, is not actually available\nfrom the device, therefore it's artificially generated.\n\nAll build meta data info comes from various ro.\\* property fields on device\n\nCurrently this build provider generates meta data as follows:\n\n- branch: $(ro.product.brand)-$(ro.product.name)-$(ro.product.device)-$(ro.build.version.release), for example:\n - for Google Play edition Samsung S4 running Android 4.2: samsung-jgedlteue-jgedlte-4.2\n - for Nexus 7 running Android 4.2: google-nakasi-grouper-4.2\n- build flavor: as provided by [ITestDevice.getBuildFlavor()](../../../../../../reference/tradefed/com/android/tradefed/device/INativeDevice.html#getBuildFlavor())\n- build alias: as provided by [ITestDevice.getBuildAlias()](../../../../../../reference/tradefed/com/android/tradefed/device/INativeDevice.html#getBuildAlias())\n- build id: as provided by [ITestDevice.getBuildId()](../../../../../../reference/tradefed/com/android/tradefed/device/INativeDevice.html#getBuildId())\n\n \u003cbr /\u003e\n\n Summary\n -------\n\n | ### Public constructors ||\n |--------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n | ` `[BootstrapBuildProvider](../../../../../../reference/tradefed/com/android/tradefed/build/BootstrapBuildProvider.html#BootstrapBuildProvider())`() ` |\n\n | ### Public methods ||\n |--------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n | ` void` | ` `[cleanUp](../../../../../../reference/tradefed/com/android/tradefed/build/BootstrapBuildProvider.html#cleanUp(com.android.tradefed.build.IBuildInfo))`(`[IBuildInfo](../../../../../../reference/tradefed/com/android/tradefed/build/IBuildInfo.html)` info) ` Clean up any temporary build files. |\n | ` `[IBuildInfo](../../../../../../reference/tradefed/com/android/tradefed/build/IBuildInfo.html) | ` `[getBuild](../../../../../../reference/tradefed/com/android/tradefed/build/BootstrapBuildProvider.html#getBuild())`() ` Retrieve the data for build under test. |\n | ` `[IBuildInfo](../../../../../../reference/tradefed/com/android/tradefed/build/IBuildInfo.html) | ` `[getBuild](../../../../../../reference/tradefed/com/android/tradefed/build/BootstrapBuildProvider.html#getBuild(com.android.tradefed.device.ITestDevice))`(`[ITestDevice](../../../../../../reference/tradefed/com/android/tradefed/device/ITestDevice.html)` device) ` Retrieve the data for build under test |\n | ` final File` | ` `[getTestsDir](../../../../../../reference/tradefed/com/android/tradefed/build/BootstrapBuildProvider.html#getTestsDir())`() ` |\n\n Public constructors\n -------------------\n\n ### BootstrapBuildProvider\n\n ```\n public BootstrapBuildProvider ()\n ```\n\n \u003cbr /\u003e\n\n \u003cbr /\u003e\n\n Public methods\n --------------\n\n ### cleanUp\n\n ```\n public void cleanUp (IBuildInfo info)\n ```\n\n Clean up any temporary build files.\n\n \u003cbr /\u003e\n\n | Parameters ||\n |--------|---------------------|\n | `info` | `IBuildInfo` \u003cbr /\u003e |\n\n ### getBuild\n\n ```\n public IBuildInfo getBuild ()\n ```\n\n Retrieve the data for build under test.\n\n \u003cbr /\u003e\n\n | Returns ||\n |-----------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n | [IBuildInfo](../../../../../../reference/tradefed/com/android/tradefed/build/IBuildInfo.html) | the [IBuildInfo](../../../../../../reference/tradefed/com/android/tradefed/build/IBuildInfo.html) for build under test or `null` if no build is available for testing \u003cbr /\u003e |\n\n | Throws ||\n |-----------------------------------------------------------------------------------------------------------------|---|\n | [BuildRetrievalError](../../../../../../reference/tradefed/com/android/tradefed/build/BuildRetrievalError.html) | |\n\n ### getBuild\n\n ```\n public IBuildInfo getBuild (ITestDevice device)\n ```\n\n Retrieve the data for build under test\n\n \u003cbr /\u003e\n\n | Parameters ||\n |----------|-----------------------------------------------------------------------------------------------------------------------------------------------|\n | `device` | `ITestDevice`: the [ITestDevice](../../../../../../reference/tradefed/com/android/tradefed/device/ITestDevice.html) allocated for test \u003cbr /\u003e |\n\n | Returns ||\n |-----------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n | [IBuildInfo](../../../../../../reference/tradefed/com/android/tradefed/build/IBuildInfo.html) | the [IBuildInfo](../../../../../../reference/tradefed/com/android/tradefed/build/IBuildInfo.html) for build under test or `null` if no build is available for testing \u003cbr /\u003e |\n\n | Throws ||\n |----------------------------------------------------------------------------------------------------------------------------------|---|\n | [BuildRetrievalError](../../../../../../reference/tradefed/com/android/tradefed/build/BuildRetrievalError.html) | |\n | [DeviceNotAvailableException](../../../../../../reference/tradefed/com/android/tradefed/device/DeviceNotAvailableException.html) | |\n\n ### getTestsDir\n\n ```\n public final File getTestsDir ()\n ```\n\n \u003cbr /\u003e\n\n \u003cbr /\u003e\n\n | Returns ||\n |--------|--------|\n | `File` | \u003cbr /\u003e |"]]