自 2025 年 3 月 27 日起,我们建议您使用 android-latest-release
而非 aosp-main
构建 AOSP 并为其做出贡献。如需了解详情,请参阅 AOSP 的变更。
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
IDeviceFlasher.UserDataFlashOption
public
static
final
enum
IDeviceFlasher.UserDataFlashOption
extends Enum<IDeviceFlasher.UserDataFlashOption>
用于处理 userdata 映像的选项枚举
摘要
枚举值
公共方法
本页面上的内容和代码示例受内容许可部分所述许可的限制。Java 和 OpenJDK 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-27。
[[["易于理解","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"]],["最后更新时间 (UTC):2025-07-27。"],[],[],null,["# IDeviceFlasher.UserDataFlashOption\n==================================\n\n\n`\npublic\nstatic\nfinal\n\nenum\nIDeviceFlasher.UserDataFlashOption\n`\n\n\n`\n\n\n`\n\n`\n\nextends Enum\u003c`[IDeviceFlasher.UserDataFlashOption](../../../../../../reference/tradefed/com/android/tradefed/targetprep/IDeviceFlasher.UserDataFlashOption.html)`\u003e\n\n\n`\n\n`\n\n\n`\n\n|---|---|--------------------------------------------------------------------|\n| java.lang.Object |||\n| ↳ | java.lang.Enum\\\u003c[com.android.tradefed.targetprep.IDeviceFlasher.UserDataFlashOption](../../../../../../reference/tradefed/com/android/tradefed/targetprep/IDeviceFlasher.UserDataFlashOption.html)\\\u003e ||\n| | ↳ | com.android.tradefed.targetprep.IDeviceFlasher.UserDataFlashOption |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nEnum of options for handling the userdata image\n\nSummary\n-------\n\n| ### Enum values ||\n|----------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------|\n| [IDeviceFlasher.UserDataFlashOption](../../../../../../reference/tradefed/com/android/tradefed/targetprep/IDeviceFlasher.UserDataFlashOption.html) | `FLASH` flash the given userdata image on device |\n| [IDeviceFlasher.UserDataFlashOption](../../../../../../reference/tradefed/com/android/tradefed/targetprep/IDeviceFlasher.UserDataFlashOption.html) | `FLASH_IMG_ZIP` flash the userdata image included in device image zip |\n| [IDeviceFlasher.UserDataFlashOption](../../../../../../reference/tradefed/com/android/tradefed/targetprep/IDeviceFlasher.UserDataFlashOption.html) | `FORCE_WIPE` wipe the device's userdata partition using fastboot erase, even if it's unadvised |\n| [IDeviceFlasher.UserDataFlashOption](../../../../../../reference/tradefed/com/android/tradefed/targetprep/IDeviceFlasher.UserDataFlashOption.html) | `RETAIN` leave the userdata partition as is |\n| [IDeviceFlasher.UserDataFlashOption](../../../../../../reference/tradefed/com/android/tradefed/targetprep/IDeviceFlasher.UserDataFlashOption.html) | `TESTS_ZIP` push the contents of the tests zip file onto the device's userdata partition |\n| [IDeviceFlasher.UserDataFlashOption](../../../../../../reference/tradefed/com/android/tradefed/targetprep/IDeviceFlasher.UserDataFlashOption.html) | `WIPE` wipe the device's userdata partition using fastboot erase, if supported by device |\n| [IDeviceFlasher.UserDataFlashOption](../../../../../../reference/tradefed/com/android/tradefed/targetprep/IDeviceFlasher.UserDataFlashOption.html) | `WIPE_RM` delete content from the device's /data partition using adb shell rm |\n\n| ### Public methods ||\n|--------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` static `[IDeviceFlasher.UserDataFlashOption](../../../../../../reference/tradefed/com/android/tradefed/targetprep/IDeviceFlasher.UserDataFlashOption.html) | ` `[valueOf](../../../../../../reference/tradefed/com/android/tradefed/targetprep/IDeviceFlasher.UserDataFlashOption.html#valueOf(java.lang.String))`(String name) ` |\n| ` static final `[UserDataFlashOption[]](../../../../../../reference/tradefed/com/android/tradefed/targetprep/IDeviceFlasher.UserDataFlashOption.html) | ` `[values](../../../../../../reference/tradefed/com/android/tradefed/targetprep/IDeviceFlasher.UserDataFlashOption.html#values())`() ` |\n\nEnum values\n-----------\n\n### FLASH\n\n```\npublic static final IDeviceFlasher.UserDataFlashOption FLASH\n```\n\nflash the given userdata image on device\n\n\u003cbr /\u003e\n\n### FLASH_IMG_ZIP\n\n```\npublic static final IDeviceFlasher.UserDataFlashOption FLASH_IMG_ZIP\n```\n\nflash the userdata image included in device image zip\n\n\u003cbr /\u003e\n\n### FORCE_WIPE\n\n```\npublic static final IDeviceFlasher.UserDataFlashOption FORCE_WIPE\n```\n\nwipe the device's userdata partition using fastboot erase, even if it's unadvised\n\n\u003cbr /\u003e\n\n### RETAIN\n\n```\npublic static final IDeviceFlasher.UserDataFlashOption RETAIN\n```\n\nleave the userdata partition as is\n\n\u003cbr /\u003e\n\n### TESTS_ZIP\n\n```\npublic static final IDeviceFlasher.UserDataFlashOption TESTS_ZIP\n```\n\npush the contents of the tests zip file onto the device's userdata partition\n\n\u003cbr /\u003e\n\n### WIPE\n\n```\npublic static final IDeviceFlasher.UserDataFlashOption WIPE\n```\n\nwipe the device's userdata partition using fastboot erase, if supported by device\n\n\u003cbr /\u003e\n\n### WIPE_RM\n\n```\npublic static final IDeviceFlasher.UserDataFlashOption WIPE_RM\n```\n\ndelete content from the device's /data partition using adb shell rm\n\n\u003cbr /\u003e\n\nPublic methods\n--------------\n\n### valueOf\n\n```\npublic static IDeviceFlasher.UserDataFlashOption valueOf (String name)\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Parameters ||\n|--------|-----------------|\n| `name` | `String` \u003cbr /\u003e |\n\n| Returns ||\n|----------------------------------------------------------------------------------------------------------------------------------------------------|--------|\n| [IDeviceFlasher.UserDataFlashOption](../../../../../../reference/tradefed/com/android/tradefed/targetprep/IDeviceFlasher.UserDataFlashOption.html) | \u003cbr /\u003e |\n\n### values\n\n```\npublic static final UserDataFlashOption[] values ()\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ||\n|---------------------------------------------------------------------------------------------------------------------------------------|--------|\n| [UserDataFlashOption[]](../../../../../../reference/tradefed/com/android/tradefed/targetprep/IDeviceFlasher.UserDataFlashOption.html) | \u003cbr /\u003e |"]]