ตั้งแต่วันที่ 27 มีนาคม 2025 เป็นต้นไป เราขอแนะนำให้ใช้ android-latest-release
แทน aosp-main
เพื่อสร้างและมีส่วนร่วมใน AOSP โปรดดูข้อมูลเพิ่มเติมที่หัวข้อการเปลี่ยนแปลงใน 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),
ตัวอย่างเช่น
- สำหรับ Samsung S4 รุ่น Google Play ที่ใช้ Android 4.2: samsung-jgedlteue-jgedlte-4.2
- สำหรับ Nexus 7 ที่ใช้ Android 4.2: google-nakasi-grouper-4.2
- build flavor: ตามข้อมูลของ
ITestDevice.getBuildFlavor()
- ชื่อแทนของบิลด์: ตามที่ได้มาจาก
ITestDevice.getBuildAlias()
- รหัสบิลด์: ตามข้อมูลของ
ITestDevice.getBuildId()
สรุป
ตัวสร้างแบบสาธารณะ
BootstrapBuildProvider
public BootstrapBuildProvider ()
เมธอดสาธารณะ
cleanUp
public void cleanUp (IBuildInfo info)
ล้างไฟล์บิลด์ชั่วคราว
พารามิเตอร์ |
info |
IBuildInfo |
getBuild
public IBuildInfo getBuild ()
ดึงข้อมูลสําหรับบิลด์ที่ทดสอบ
คิกรีเทิร์น |
IBuildInfo |
IBuildInfo สำหรับบิลด์ที่อยู่ระหว่างการทดสอบ หรือ null หากไม่มีบิลด์ที่พร้อมทดสอบ |
getBuild
public IBuildInfo getBuild (ITestDevice device)
ดึงข้อมูลสําหรับบิลด์ที่ทดสอบ
พารามิเตอร์ |
device |
ITestDevice : ITestDevice ที่จัดสรรไว้สําหรับการทดสอบ |
คิกรีเทิร์น |
IBuildInfo |
IBuildInfo สำหรับบิลด์ที่อยู่ระหว่างการทดสอบ หรือ null หากไม่มีบิลด์ที่พร้อมทดสอบ |
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 |"]]