CdmaDeviceFlasher
public
class
CdmaDeviceFlasher
extends FastbootDeviceFlasher
java.lang.Object | ||
↳ | com.android.tradefed.targetprep.FastbootDeviceFlasher | |
↳ | com.android.tradefed.targetprep.CdmaDeviceFlasher |
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 |
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 |
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 |
Constants
BASEBAND_FLASH_TIMEOUT
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
CdmaDeviceFlasher
public CdmaDeviceFlasher ()
Public methods
flash
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:- Flash the bootloader as normal
- Unpack the updater.zip
- Flash the new baseband, but
don't reboot afterward - Flash the boot, recovery, and system partitions
- Reboot (device comes up in Recovery to actually flash baseband)
- Reboot again
- Flash userdata
- Reboot into userspace
Parameters | |
---|---|
device |
ITestDevice : the ITestDevice to flash |
deviceBuild |
IDeviceBuildInfo : the IDeviceBuildInfo to flash |
Throws | |
---|---|
DeviceNotAvailableException |
|
TargetSetupError |
Protected methods
extractSystemZip
protected File extractSystemZip (IDeviceBuildInfo deviceBuild)
Extract the updater zip to a directory and return the path of that directory
Exposed for unit testingParameters | |
---|---|
deviceBuild |
IDeviceBuildInfo |
Returns | |
---|---|
File |
flashBaseband
protected void flashBaseband (ITestDevice device, File basebandImageFile)
Flashes the given baseband image and
Parameters | |
---|---|
device |
ITestDevice : the ITestDevice to flash |
basebandImageFile |
File : the baseband image ERROR(/File) |
Throws | |
---|---|
DeviceNotAvailableException |
if device is not available |
TargetSetupError |
if failed to flash baseband |
flashSystem
protected void flashSystem (ITestDevice device, IDeviceBuildInfo deviceBuild)
Flash the system image on device.
Parameters | |
---|---|
device |
ITestDevice : the ITestDevice to flash |
deviceBuild |
IDeviceBuildInfo : the IDeviceBuildInfo to flash |
Throws | |
---|---|
DeviceNotAvailableException |
|
TargetSetupError |
getBootPartitionName
protected String getBootPartitionName ()
Get the boot partition name for this device flasher.
Defaults to 'bootloader'. Subclasses should override if necessary.
Returns | |
---|---|
String |