2025 年 3 月 27 日より、AOSP のビルドとコントリビューションには aosp-main
ではなく android-latest-release
を使用することをおすすめします。詳細については、AOSP の変更をご覧ください。
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
BootstrapBuildProvider
public
class
BootstrapBuildProvider
extends Object
implements
IDeviceBuildProvider
java.lang.Object
|
↳ |
com.android.tradefed.build.BootstrapBuildProvider
|
テストデバイスからビルド情報をブートストラップする IDeviceBuildProvider
これは通常、社内ビルドシステムによって生成されていない、外部から提供されたビルドが搭載されているデバイスに使用されます。特定の情報(特にブランチ)はデバイスから実際に取得できないため、人為的に生成されます。
ビルドのメタデータ情報はすべて、デバイス上のさまざまな ro.* プロパティ フィールドから取得されます。
現在、このビルド プロバイダは次のようにメタデータを生成します。
- branch:
$(ro.product.brand)-$(ro.product.name)-$(ro.product.device)-$(ro.build.version.release)(例:
- Android 4.2 を搭載した Google Play エディションの Samsung S4: samsung-jgedlteue-jgedlte-4.2
- Android 4.2 を搭載した Nexus 7 の場合: google-nakasi-grouper-4.2
- ビルド フレーバー:
ITestDevice.getBuildFlavor()
によって提供される - ビルド エイリアス:
ITestDevice.getBuildAlias()
によって提供されます - build id:
ITestDevice.getBuildId()
で指定された値
概要
パブリック コンストラクタ
BootstrapBuildProvider
public BootstrapBuildProvider ()
パブリック メソッド
cleanUp
public void cleanUp (IBuildInfo info)
一時的なビルドファイルをクリーンアップします。
getBuild
public IBuildInfo getBuild ()
テスト対象のビルドのデータを取得します。
getTestsDir
public final File getTestsDir ()
このページのコンテンツやコードサンプルは、コンテンツ ライセンスに記載のライセンスに従います。Java および OpenJDK は Oracle および関連会社の商標または登録商標です。
最終更新日 2025-07-27 UTC。
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["必要な情報がない","missingTheInformationINeed","thumb-down"],["複雑すぎる / 手順が多すぎる","tooComplicatedTooManySteps","thumb-down"],["最新ではない","outOfDate","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["サンプル / コードに問題がある","samplesCodeIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 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 |"]]