A partir de 27 de março de 2025, recomendamos usar android-latest-release
em vez de aosp-main
para criar e contribuir com o AOSP. Para mais informações, consulte Mudanças no AOSP.
Mantenha tudo organizado com as coleções
Salve e categorize o conteúdo com base nas suas preferências.
BootstrapBuildProvider
public
class
BootstrapBuildProvider
extends Object
implements
IDeviceBuildProvider
java.lang.Object
|
↳ |
com.android.tradefed.build.BootstrapBuildProvider
|
Um IDeviceBuildProvider
que inicia as informações do build do dispositivo de teste
Isso geralmente é usado para dispositivos com um build fornecido externamente, ou seja, não gerado pelo
sistema de build interno. Algumas informações, especificamente a ramificação, não estão disponíveis
no dispositivo, portanto, são geradas artificialmente.
Todas as informações de metadados do build vêm de vários campos de propriedade ro.* no dispositivo
No momento, esse provedor de build gera metadados da seguinte maneira:
- branch:
$(ro.product.brand)-$(ro.product.name)-$(ro.product.device)-$(ro.build.version.release),
por exemplo:
- para a edição do Google Play Samsung S4 com Android 4.2: samsung-jgedlteue-jgedlte-4.2
- para Nexus 7 com Android 4.2: google-nakasi-grouper-4.2
- build flavor: as provided by
ITestDevice.getBuildFlavor()
- build alias: as provided by
ITestDevice.getBuildAlias()
- ID do build: conforme fornecido por
ITestDevice.getBuildId()
Resumo
Construtores públicos
BootstrapBuildProvider
public BootstrapBuildProvider ()
Métodos públicos
cleanUp
public void cleanUp (IBuildInfo info)
Limpe todos os arquivos de build temporários.
Parâmetros |
info |
IBuildInfo |
getBuild
public IBuildInfo getBuild ()
Extrair os dados do build em teste.
Retorna |
IBuildInfo |
o IBuildInfo para a versão em teste ou null se nenhuma versão estiver
disponível para teste |
getBuild
public IBuildInfo getBuild (ITestDevice device)
Extrair os dados do build em teste
Parâmetros |
device |
ITestDevice : o ITestDevice alocado para teste |
Retorna |
IBuildInfo |
o IBuildInfo para o build em teste ou null se nenhum build estiver
disponível para teste |
getTestsDir
public final File getTestsDir ()
O conteúdo e os exemplos de código nesta página estão sujeitos às licenças descritas na Licença de conteúdo. Java e OpenJDK são marcas registradas da Oracle e/ou suas afiliadas.
Última atualização 2025-07-27 UTC.
[[["Fácil de entender","easyToUnderstand","thumb-up"],["Meu problema foi resolvido","solvedMyProblem","thumb-up"],["Outro","otherUp","thumb-up"]],[["Não contém as informações de que eu preciso","missingTheInformationINeed","thumb-down"],["Muito complicado / etapas demais","tooComplicatedTooManySteps","thumb-down"],["Desatualizado","outOfDate","thumb-down"],["Problema na tradução","translationIssue","thumb-down"],["Problema com as amostras / o código","samplesCodeIssue","thumb-down"],["Outro","otherDown","thumb-down"]],["Última atualização 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 |"]]