SideloadOtaTargetPreparer

public class SideloadOtaTargetPreparer
extends DeviceUpdateTargetPreparer

java.lang.Object
   ↳ com.android.tradefed.targetprep.BaseTargetPreparer
     ↳ com.android.tradefed.targetprep.DeviceBuildInfoBootStrapper
       ↳ com.android.tradefed.targetprep.DeviceUpdateTargetPreparer
         ↳ com.android.tradefed.targetprep.SideloadOtaTargetPreparer


A target preparer that performs sideload of a specified OTA package, applies the package, waits for device to boot up, and injects the device build properties to use as build info

This target preparer assumes that the device will be in regular adb mode when started, and will ensure that the device exits in the same mode but with the newer build applied. Any unexpected device state transition during the process will be reported as TargetSetupError, and same applies to any OTA sideload error detected.

Summary

Public constructors

SideloadOtaTargetPreparer()

Protected methods

File getDeviceUpdateImage()

Provides a ERROR(/File) instance representing the device image file to be used for updating

void performDeviceUpdate(File deviceUpdateImage, ITestDevice device)

Performs the sideload of OTA package

void postUpdateActions(File deviceUpdateImage, ITestDevice device)

Waits for device to transition from sideload to recovery, then reboot to userspace

void preUpdateActions(File deviceUpdateImage, ITestDevice device)

Reboots the device into sideload mode in preparation

Public constructors

SideloadOtaTargetPreparer

public SideloadOtaTargetPreparer ()

Protected methods

getDeviceUpdateImage

protected File getDeviceUpdateImage ()

Provides a ERROR(/File) instance representing the device image file to be used for updating

Returns
File

performDeviceUpdate

protected void performDeviceUpdate (File deviceUpdateImage, 
                ITestDevice device)

Performs the sideload of OTA package

Throws
DeviceNotAvailableException
TargetSetupError

postUpdateActions

protected void postUpdateActions (File deviceUpdateImage, 
                ITestDevice device)

Waits for device to transition from sideload to recovery, then reboot to userspace

Throws
DeviceNotAvailableException
TargetSetupError

preUpdateActions

protected void preUpdateActions (File deviceUpdateImage, 
                ITestDevice device)

Reboots the device into sideload mode in preparation

Throws
DeviceNotAvailableException
TargetSetupError