to top
public class

CdmaDeviceFlasher

extends FastbootDeviceFlasher
java.lang.Object
   ↳ com.android.tradefed.targetprep.FastbootDeviceFlasher
     ↳ com.android.tradefed.targetprep.CdmaDeviceFlasher

Class Overview

A class that flashes an image on a physical Android device with a CDMA radio.

This class is required because a special flashing sequence is needed to properly update the radio baseband, since it is typically the case that the radio and bootloader can't communicate directly. Typically, they use the RIL (which runs in userspace) as a proxy.

Summary

Constants
int BASEBAND_FLASH_TIMEOUT Time to allow for baseband to flash (in recovery mode), in ms
[Expand]
Inherited Constants
From class com.android.tradefed.targetprep.FastbootDeviceFlasher
Public Constructors
CdmaDeviceFlasher()
Public Methods
void flash(ITestDevice device, IDeviceBuildInfo deviceBuild)
Flashes build on device.

If the baseband is up-to-date, this flasher behaves identically to the DeviceFlasher superclass.

Protected Methods
File extractSystemZip(IDeviceBuildInfo deviceBuild)
Extract the updater zip to a directory and return the path of that directory

Exposed for unit testing

void flashBaseband(ITestDevice device, File basebandImageFile)
Flashes the given baseband image and does not reboot the device afterward.
void flashSystem(ITestDevice device, IDeviceBuildInfo deviceBuild)
Flash the system image on device.
String getBootPartitionName()
Get the boot partition name for this device flasher.
IRunUtil getRunUtil()
Get the RunUtil instance to use.
[Expand]
Inherited Methods
From class com.android.tradefed.targetprep.FastbootDeviceFlasher
From class java.lang.Object
From interface com.android.tradefed.targetprep.IDeviceFlasher

Constants

protected static final int BASEBAND_FLASH_TIMEOUT

Time to allow for baseband to flash (in recovery mode), in ms

Constant Value: 600000 (0x000927c0)

Public Constructors

public CdmaDeviceFlasher ()

Public Methods

public void flash (ITestDevice device, IDeviceBuildInfo deviceBuild)

Flashes build on device.

Returns immediately after flashing is complete. Callers should wait for device to be online and available before proceeding with testing.

If the baseband is up-to-date, this flasher behaves identically to the DeviceFlasher superclass. If the baseband needs to be updated, it does the following:

  1. Flash the bootloader as normal
  2. Unpack the updater.zip
  3. Flash the new baseband, but don't reboot afterward
  4. Flash the boot, recovery, and system partitions
  5. Reboot (device comes up in Recovery to actually flash baseband)
  6. Reboot again
  7. Flash userdata
  8. Reboot into userspace

Parameters
device the ITestDevice to flash
deviceBuild the IDeviceBuildInfo to flash

Protected Methods

protected File extractSystemZip (IDeviceBuildInfo deviceBuild)

Extract the updater zip to a directory and return the path of that directory

Exposed for unit testing

Throws
IOException

protected void flashBaseband (ITestDevice device, File basebandImageFile)

Flashes the given baseband image and does not reboot the device afterward.

Parameters
device the ITestDevice to flash
basebandImageFile the baseband image File
Throws
DeviceNotAvailableException if device is not available
TargetSetupError if failed to flash baseband

protected void flashSystem (ITestDevice device, IDeviceBuildInfo deviceBuild)

Flash the system image on device.

Parameters
device the ITestDevice to flash
deviceBuild the IDeviceBuildInfo to flash

protected String getBootPartitionName ()

Get the boot partition name for this device flasher.

Defaults to 'hboot'. Subclasses should override if necessary.

protected IRunUtil getRunUtil ()

Get the RunUtil instance to use.

Exposed for unit testing.