DeviceImageZipFlashingTargetPreparer

public class DeviceImageZipFlashingTargetPreparer
extends DeviceUpdateTargetPreparer

java.lang.Object
com.android.tradefed.targetprep.BaseTargetPreparer
com.android.tradefed.targetprep.DeviceBuildInfoBootStrapper
com.android.tradefed.targetprep.DeviceUpdateTargetPreparer
com.android.tradefed.targetprep.DeviceImageZipFlashingTargetPreparer


目标准备器,使用通过特定格式提供的设备图像来刷新设备。

对设备镜像格式的高要求:

  • 设备镜像文件必须是zip文件
  • zip 文件的根目录必须包含 flash-all.sh 脚本
  • 该脚本必须假设设备位于adb devices可见的用户空间中
  • zip 文件的其余部分将被提取到与具有相同目录布局的脚本相同的位置,并且脚本可以通过相对路径引用 zip 中打包的任何文件
  • 刷新后,脚本必须将设备返回到相同状态
  • 作为执行环境的一部分,环境变量ANDROID_SERIAL将设置为设备序列号
  • 该脚本可能假设它在 PATH 上有adbfastboot
该目标准备器将解压设备映像 zip 文件,并根据上述要求中概述的假设执行随附的flash- all.sh

概括

公共构造函数

DeviceImageZipFlashingTargetPreparer ()

受保护的方法

File getDeviceUpdateImage ()

提供一个ERROR(/File)实例,表示用于更新的设备映像文件

void performDeviceUpdate (File deviceUpdateImage, ITestDevice device)

展开设备映像更新 zip 并调用随附的刷新脚本

void postUpdateActions (File deviceUpdateImage, ITestDevice device)

无操作

void preUpdateActions (File deviceUpdateImage, ITestDevice device)

无操作

公共构造函数

DeviceImageZipFlashingTargetPreparer

public DeviceImageZipFlashingTargetPreparer ()

受保护的方法

获取设备更新图像

protected File getDeviceUpdateImage ()

提供一个ERROR(/File)实例,表示用于更新的设备映像文件

退货
File

执行设备更新

protected void performDeviceUpdate (File deviceUpdateImage, 
                ITestDevice device)

展开设备映像更新 zip 并调用随附的刷新脚本

投掷
DeviceNotAvailableException
TargetSetupError

更新后操作

protected void postUpdateActions (File deviceUpdateImage, 
                ITestDevice device)

无操作

投掷
DeviceNotAvailableException
TargetSetupError

更新前动作

protected void preUpdateActions (File deviceUpdateImage, 
                ITestDevice device)

无操作

投掷
DeviceNotAvailableException
TargetSetupError