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 ()

受保护的方法

getDeviceUpdateImage

protected File getDeviceUpdateImage ()

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

返回
File

performDeviceUpdate

protected void performDeviceUpdate (File deviceUpdateImage, 
                ITestDevice device)

展开设备映像更新 ZIP 文件并调用封闭的刷写脚本

抛出
DeviceNotAvailableException
TargetSetupError

postUpdateActions

protected void postUpdateActions (File deviceUpdateImage, 
                ITestDevice device)

空操作

抛出
DeviceNotAvailableException
TargetSetupError

preUpdateActions

protected void preUpdateActions (File deviceUpdateImage, 
                ITestDevice device)

空操作

抛出
DeviceNotAvailableException
TargetSetupError