FastbootDeviceFlasher

public class FastbootDeviceFlasher
extends Object implements IDeviceFlasher

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


fastboot を使用して物理 Android ハードウェアにイメージを書き込むクラス。

概要

定数

String BASEBAND_IMAGE_NAME

パブリック コンストラクタ

FastbootDeviceFlasher()

パブリック メソッド

static String fetchImageVersion(IRunUtil runUtil, ITestDevice device, String imageName)

デバイスの現在のイメージ バージョンを取得するヘルパー メソッド。

void flash(ITestDevice device, IDeviceBuildInfo deviceBuild)

デバイスにビルドをフラッシュします。

CommandStatus getSystemFlashingStatus()

プライマリ システム パーティションのフラッシュのコマンド実行ステータスを取得します。

IDeviceFlasher.UserDataFlashOption getUserDataFlashOption()

ユーザーデータ イメージをフラッシュ、ワイプ、保持すべきかどうかを取得します。

void overrideDeviceOptions(ITestDevice device)

デバイスのオーバーライド オプション。

void preFlashOperations(ITestDevice device, IDeviceBuildInfo deviceBuild)

実際のフラッシュ処理の前に実行する必要があるすべてのセットアップ オペレーションとチェック。

void setDataWipeSkipList( dataWipeSkipList)

ITestsZipInstaller を使用するときにクリアされないように、/data の下のパスのリストを設定します。

スキップ リストの粒度は /data の直接の子です。

void setFlashOptions( flashOptions)

フラッシュ/更新コマンドで渡すオプションのリストを設定します。

void setFlashingResourcesRetriever(IFlashingResourcesRetriever retriever)

フラッシャーがフラッシュ用のリソース ファイルを取得するメカニズムを設定します。

void setForceSystemFlash(boolean forceSystemFlash)

現在のビルドを実行している場合でも、システムを常にフラッシュするかどうかを設定します。

void setIncrementalFlashing(IncrementalImageUtil incrementalUtil)
void setRamdiskPartition(String ramdiskPartition)

RAM ディスク パーティションを設定します。

void setShouldFlashRamdisk(boolean shouldFlashRamdisk)

イメージ zip を介してデバイスを更新した後に、追加の ramdisk をフラッシュするかどうかを設定します。

void setUserDataFlashOption(IDeviceFlasher.UserDataFlashOption flashOption)

ユーザーデータ イメージをフラッシュするか、ワイプするか、保持するかを切り替えます。

void setWipeTimeout(long timeout)

データを消去するタイムアウトを設定します。

boolean shouldFlashRamdisk()

イメージ zip を介してデバイスを更新した後に、追加の ramdisk をフラッシュするように flasher が設定されているかどうかを確認します。

boolean shouldSkipBootloaderVersionCheck()
static boolean stderrContainsFailed(String stderr, boolean skipBootloaderVersionCheck)
static boolean stderrContainsFailed(String stderr, boolean skipBootloaderVersionCheck, boolean skipFastbootFailedMessage)

保護されたメソッド

void checkAndFlashBaseband(ITestDevice device, IDeviceBuildInfo deviceBuild)

必要に応じて、デバイスにベースバンド イメージをフラッシュします。

boolean checkAndFlashBootloader(ITestDevice device, IDeviceBuildInfo deviceBuild)

必要に応じて、デバイスにブートローダー イメージをフラッシュします。

boolean checkAndFlashSystem(ITestDevice device, String systemBuildId, String systemBuildFlavor, IDeviceBuildInfo deviceBuild)

必要に応じて、デバイスにシステム イメージをフラッシュします。

boolean checkShouldFlashBaseband(ITestDevice device, IDeviceBuildInfo deviceBuild)

提供されたデバイスのベースバンドをフラッシュする必要があるかどうかを確認します。

IFlashingResourcesParser createFlashingResourcesParser(IDeviceBuildInfo localBuild, DeviceDescriptor descriptor)

IFlashingResourcesParser を作成するためのファクトリ メソッド。

void downloadExtraImageFiles(IFlashingResourcesParser resourceParser, IFlashingResourcesRetriever retriever, IDeviceBuildInfo localBuild)

必要に応じて、サブクラスが追加のカスタム イメージ ファイルをダウンロードできるようにするフック。

void downloadFlashingResources(ITestDevice device, IDeviceBuildInfo localBuild)

必要な追加のフラッシュ イメージ ファイルをダウンロードします。

String executeFastbootCmd(ITestDevice device, String... cmdArgs)

fastboot コマンドを実行するヘルパー メソッド。

String executeLongFastbootCmd(ITestDevice device, String... cmdArgs)

長時間実行される fastboot コマンドを実行するヘルパー メソッド。

String executeLongFastbootCmd(ITestDevice device, envVarMap, String... cmdArgs)

環境変数を使用して長時間実行される fastboot コマンドを実行するヘルパー メソッド。

void flashBaseband(ITestDevice device, File basebandImageFile)

指定されたベースバンド イメージをフラッシュし、再起動してブートローダーに戻ります。

void flashBootloader(ITestDevice device, File bootloaderImageFile)

指定されたブートローダー イメージをフラッシュし、再起動してブートローダーに戻ります。

void flashExtraImages(ITestDevice device, IDeviceBuildInfo deviceBuild)

システムを書き込んで再起動する前に、デバイス固有のパーティションを書き込みます。

void flashPartition(ITestDevice device, File imgFile, String partition)

デバイスの個々のパーティションをフラッシュする

void flashRamdiskIfNeeded(ITestDevice device, IDeviceBuildInfo deviceBuild)
void flashSystem(ITestDevice device, IDeviceBuildInfo deviceBuild)

デバイスにシステム イメージを書き込みます。

void flashUserData(ITestDevice device, IDeviceBuildInfo deviceBuild)

デバイスのユーザーデータ パーティションを書き込みます。

void flashUserDataFromDeviceImageFile(ITestDevice device, IDeviceBuildInfo deviceBuild)

デバイス イメージ ファイルから userdata.img を抽出し、デバイスにフラッシュします。

String getBootPartitionName()

このデバイス フラッシャーのブート パーティション名を取得します。

String getBootloaderFilePrefix(ITestDevice device)

ブートローダー ファイルの接頭辞を取得します。

String getCurrentSlot(ITestDevice device)

現在のスロットを取得するヘルパー メソッド(A/B 対応デバイスの場合)。

IFlashingResourcesRetriever getFlashingResourcesRetriever()
FuseUtil getFuseUtil()
String getImageVersion(ITestDevice device, String imageName)
IRunUtil getRunUtil()

テスト用に公開されています。

void handleUserDataFlashing(ITestDevice device, IDeviceBuildInfo deviceBuild)

userdata/cache パーティションのフラッシュを処理

boolean hasPartition(ITestDevice device, String partition)

指定されたパーティションが存在するかどうかをブートローダーに確認します。

void preFlashSetup(ITestDevice device, IDeviceBuildInfo deviceBuild)

必要な追加のフラッシュ前セットアップを行います。

void setSkipBootloaderVersionCheck(boolean skipBootloaderVersionCheck)
void setSkipFastbootFailedMessage(boolean skipFastbootFailedMessage)
void setSystemBuildInfo(String systemBuildId, String systemBuildFlavor)
void verifyRequiredBoards(ITestDevice device, IFlashingResourcesParser resourceParser, String deviceProductType)

デバイスのプロダクト タイプが、書き込むビルドをサポートしていることを確認します。

void wipeCache(ITestDevice device)

デバイスのキャッシュ パーティションをワイプします。

void wipePartition(ITestDevice device, String partition)

`fastboot erase <name>` で指定されたパーティションをワイプします。

定数

BASEBAND_IMAGE_NAME

public static final String BASEBAND_IMAGE_NAME

定数値: "radio"

パブリック コンストラクタ

FastbootDeviceFlasher

public FastbootDeviceFlasher ()

パブリック メソッド

fetchImageVersion

public static String fetchImageVersion (IRunUtil runUtil, 
                ITestDevice device, 
                String imageName)

デバイスの現在のイメージ バージョンを取得するヘルパー メソッド。

パラメータ
runUtil IRunUtil

device ITestDevice: コマンドを実行する ITestDevice

imageName String: 取得するイメージの名前。

戻り値
String コマンドの stdout 出力を文字列化する

例外
DeviceNotAvailableException デバイスが利用できない場合
TargetSetupError fastboot コマンドが失敗した場合、またはバージョンを特定できなかった場合

フラッシュ

public void flash (ITestDevice device, 
                IDeviceBuildInfo deviceBuild)

デバイスにビルドをフラッシュします。

フラッシュが完了するとすぐに戻ります。呼び出し元は、テストに進む前にデバイスがオンラインになり、利用可能になるまで待つ必要があります。

パラメータ
device ITestDevice: フラッシュする ITestDevice

deviceBuild IDeviceBuildInfo: フラッシュする IDeviceBuildInfo

例外
DeviceNotAvailableException
TargetSetupError

getSystemFlashingStatus

public CommandStatus getSystemFlashingStatus ()

プライマリ システム パーティションのフラッシュのコマンド実行ステータスを取得します。

システム パーティションがフラッシュされない場合(システムにすでにフラッシュされるビルドがある場合)、コマンドのステータスは null になることがあります。

戻り値
CommandStatus

getUserDataFlashOption

public IDeviceFlasher.UserDataFlashOption getUserDataFlashOption ()

ユーザーデータ イメージをフラッシュ、ワイプ、保持のいずれにすべきかを取得します

戻り値
IDeviceFlasher.UserDataFlashOption ユーザーデータ イメージをフラッシュ、ワイプ、保持のいずれにするか

overrideDeviceOptions

public void overrideDeviceOptions (ITestDevice device)

デバイスのオーバーライド オプション。特定のデバイスでデフォルトがサポートされていない場合に、デフォルトのオプション値をオーバーライドするために使用されます。

preFlashOperations

public void preFlashOperations (ITestDevice device, 
                IDeviceBuildInfo deviceBuild)

クリティカル セクションの実際のフラッシュの前に発生する必要があるすべてのセットアップ オペレーションとチェック。これらのオペレーションは、同時実行制御されたクリティカル セクションには含まれません。

パラメータ
device ITestDevice: フラッシュする ITestDevice

deviceBuild IDeviceBuildInfo: フラッシュする IDeviceBuildInfo

例外
DeviceNotAvailableException
TargetSetupError

setDataWipeSkipList

public void setDataWipeSkipList ( dataWipeSkipList)

ITestsZipInstaller を使用するときにクリアされないように、/data の下のパスのリストを設定します。

スキップ リストの粒度は /data の直接の子です。

パラメータ
dataWipeSkipList

setFlashOptions

public void setFlashOptions ( flashOptions)

フラッシュ/更新コマンドで渡すオプションのリストを設定します。

setFlashingResourcesRetriever

public void setFlashingResourcesRetriever (IFlashingResourcesRetriever retriever)

フラッシャーがフラッシュ用のリソース ファイルを取得するメカニズムを設定します。

パラメータ
retriever IFlashingResourcesRetriever: 使用する IFlashingResourcesRetriever

setForceSystemFlash

public void setForceSystemFlash (boolean forceSystemFlash)

現在のビルドを実行している場合でも、システムを常にフラッシュするかどうかを設定します

setIncrementalFlashing

public void setIncrementalFlashing (IncrementalImageUtil incrementalUtil)

パラメータ
incrementalUtil IncrementalImageUtil

setRamdiskPartition

public void setRamdiskPartition (String ramdiskPartition)

RAM ディスク パーティションを設定する

setShouldFlashRamdisk

public void setShouldFlashRamdisk (boolean shouldFlashRamdisk)

イメージ zip を介してデバイスを更新した後に、追加の ramdisk をフラッシュするかどうかを設定します

setUserDataFlashOption

public void setUserDataFlashOption (IDeviceFlasher.UserDataFlashOption flashOption)

ユーザーデータ イメージをフラッシュ、ワイプ、保持するかどうかを切り替えます

setWipeTimeout

public void setWipeTimeout (long timeout)

データをワイプするタイムアウトを設定します。

パラメータ
timeout long

shouldFlashRamdisk

public boolean shouldFlashRamdisk ()

イメージ zip を介してデバイスを更新した後に、追加の ramdisk をフラッシュするように flasher が設定されているかどうかを確認します

戻り値
boolean

shouldSkipBootloaderVersionCheck

public boolean shouldSkipBootloaderVersionCheck ()

戻り値
boolean

stderrContainsFailed

public static boolean stderrContainsFailed (String stderr, 
                boolean skipBootloaderVersionCheck)

パラメータ
stderr String

skipBootloaderVersionCheck boolean

戻り値
boolean

stderrContainsFailed

public static boolean stderrContainsFailed (String stderr, 
                boolean skipBootloaderVersionCheck, 
                boolean skipFastbootFailedMessage)

パラメータ
stderr String

skipBootloaderVersionCheck boolean

skipFastbootFailedMessage boolean

戻り値
boolean

保護されたメソッド

checkAndFlashBaseband

protected void checkAndFlashBaseband (ITestDevice device, 
                IDeviceBuildInfo deviceBuild)

必要に応じて、デバイスにベースバンド イメージをフラッシュします。デバイスの現在のバージョンが必須バージョンと異なる場合にのみベースバンドをフラッシュします

パラメータ
device ITestDevice: フラッシュする ITestDevice

deviceBuild IDeviceBuildInfo: フラッシュするベースバンド イメージを含む IDeviceBuildInfo

例外
DeviceNotAvailableException デバイスが利用できない場合
TargetSetupError ベースバンドの書き込みに失敗した場合

checkAndFlashBootloader

protected boolean checkAndFlashBootloader (ITestDevice device, 
                IDeviceBuildInfo deviceBuild)

必要に応じて、デバイスにブートローダー イメージをフラッシュします。

デバイスの現在のバージョンが必須バージョンと異なる場合にのみ、ブートローダーをフラッシュします。

パラメータ
device ITestDevice: フラッシュする ITestDevice

deviceBuild IDeviceBuildInfo: 書き込むブートローダー イメージを含む IDeviceBuildInfo

戻り値
boolean ブートローダーがフラッシュされた場合は true、スキップされた場合は false

例外
DeviceNotAvailableException デバイスが利用できない場合
TargetSetupError ブートローダーのフラッシュに失敗した場合

checkAndFlashSystem

protected boolean checkAndFlashSystem (ITestDevice device, 
                String systemBuildId, 
                String systemBuildFlavor, 
                IDeviceBuildInfo deviceBuild)

必要に応じて、デバイスにシステム イメージをフラッシュします。

ERROR(/#shouldFlashSystem(String,String,com.android.tradefed.build.IDeviceBuildInfo)) をご覧ください。

選択したパスに関係なく、メソッド実行後、デバイスはユーザースペースに起動する必要があります。

パラメータ
device ITestDevice: フラッシュする ITestDevice

systemBuildId String: デバイスで実行されている現在のビルド ID

systemBuildFlavor String: デバイスで実行されている現在のビルド フレーバー

deviceBuild IDeviceBuildInfo: 書き込むシステム イメージを含む IDeviceBuildInfo

戻り値
boolean システムがフラッシュされた場合は true、スキップされた場合は false

例外
DeviceNotAvailableException デバイスが利用できない場合
TargetSetupError ブートローダーのフラッシュに失敗した場合

checkShouldFlashBaseband

protected boolean checkShouldFlashBaseband (ITestDevice device, 
                IDeviceBuildInfo deviceBuild)

提供されたデバイスのベースバンドをフラッシュする必要があるかどうかを確認します。

パラメータ
device ITestDevice: 確認する ITestDevice

deviceBuild IDeviceBuildInfo: チェックするベースバンド イメージを含む IDeviceBuildInfo

戻り値
boolean

例外
DeviceNotAvailableException デバイスが利用できない場合
TargetSetupError ベースバンドの書き込みに失敗した場合

createFlashingResourcesParser

protected IFlashingResourcesParser createFlashingResourcesParser (IDeviceBuildInfo localBuild, 
                DeviceDescriptor descriptor)

IFlashingResourcesParser を作成するためのファクトリ メソッド。

単体テスト用に公開されています。

パラメータ
localBuild IDeviceBuildInfo: 解析する IDeviceBuildInfo

descriptor DeviceDescriptor: フラッシュされるデバイスの記述子。

戻り値
IFlashingResourcesParser ファクトリ メソッドで作成された IFlashingResourcesParser

例外
com.android.tradefed.targetprep.TargetSetupError
TargetSetupError

downloadExtraImageFiles

protected void downloadExtraImageFiles (IFlashingResourcesParser resourceParser, 
                IFlashingResourcesRetriever retriever, 
                IDeviceBuildInfo localBuild)

必要に応じて、サブクラスが追加のカスタム イメージ ファイルをダウンロードできるようにするフック。

パラメータ
resourceParser IFlashingResourcesParser: IFlashingResourcesParser

retriever IFlashingResourcesRetriever: IFlashingResourcesRetriever

localBuild IDeviceBuildInfo: IDeviceBuildInfo

例外
com.android.tradefed.targetprep.TargetSetupError
TargetSetupError

downloadFlashingResources

protected void downloadFlashingResources (ITestDevice device, 
                IDeviceBuildInfo localBuild)

必要な追加のフラッシュ イメージ ファイルをダウンロードします

パラメータ
device ITestDevice: リソースをダウンロードする ITestDevice

localBuild IDeviceBuildInfo: 入力する IDeviceBuildInfo。デバイス イメージ ファイルがすでに設定されていることを前提とします

例外
DeviceNotAvailableException デバイスが利用できない場合
TargetSetupError リソースの取得に失敗した場合

executeFastbootCmd

protected String executeFastbootCmd (ITestDevice device, 
                String... cmdArgs)

fastboot コマンドを実行するヘルパー メソッド。

パラメータ
device ITestDevice: コマンドを実行する ITestDevice

cmdArgs String: fastboot に提供する引数

戻り値
String stderr 出力が空でない場合は、コマンドから文字列を取得します。それ以外の場合は stdout を返します。一部の fastboot コマンドは、成功した場合に stderr に出力をダンプするという奇妙な動作をします。

例外
DeviceNotAvailableException デバイスが利用できない場合
TargetSetupError fastboot コマンドが失敗した場合

executeLongFastbootCmd

protected String executeLongFastbootCmd (ITestDevice device, 
                String... cmdArgs)

長時間実行される fastboot コマンドを実行するヘルパー メソッド。

注: ほとんどの fastboot コマンドは通常、INativeDevice.executeFastbootCommand(String) で許可されているタイムアウト内で実行されます。ただし、複数のデバイスを同時にフラッシュしている場合、fastboot コマンドの実行に通常より時間がかかることがあります。

パラメータ
device ITestDevice: コマンドを実行する ITestDevice

cmdArgs String: fastboot に提供する引数

戻り値
String stderr 出力が空でない場合は、コマンドから文字列を取得します。それ以外の場合は stdout を返します。一部の fastboot コマンドは、成功した場合に stderr に出力をダンプするという奇妙な動作をします。

例外
DeviceNotAvailableException デバイスが利用できない場合
TargetSetupError fastboot コマンドが失敗した場合

executeLongFastbootCmd

protected String executeLongFastbootCmd (ITestDevice device, 
                 envVarMap, 
                String... cmdArgs)

環境変数を使用して長時間実行される fastboot コマンドを実行するヘルパー メソッド。

注: ほとんどの fastboot コマンドは通常、INativeDevice.executeFastbootCommand(String) で許可されているタイムアウト内で実行されます。ただし、複数のデバイスを同時にフラッシュしている場合、fastboot コマンドの実行に通常より時間がかかることがあります。

パラメータ
device ITestDevice: コマンドを実行する ITestDevice

envVarMap : fastboot コマンドを実行する前に設定する必要がある環境変数を保持するマップ

cmdArgs String: fastboot に提供する引数

戻り値
String stderr 出力が空でない場合は、コマンドから文字列を取得します。それ以外の場合は stdout を返します。一部の fastboot コマンドは、成功した場合に stderr に出力をダンプするという奇妙な動作をします。

例外
DeviceNotAvailableException デバイスが利用できない場合
TargetSetupError fastboot コマンドが失敗した場合

flashBaseband

protected void flashBaseband (ITestDevice device, 
                File basebandImageFile)

指定されたベースバンド イメージをフラッシュし、再起動してブートローダーに戻ります

パラメータ
device ITestDevice: フラッシュする ITestDevice

basebandImageFile File: ベースバンド イメージ ERROR(/File)

例外
DeviceNotAvailableException デバイスが利用できない場合
TargetSetupError ベースバンドの書き込みに失敗した場合

flashBootloader

protected void flashBootloader (ITestDevice device, 
                File bootloaderImageFile)

指定されたブートローダー イメージをフラッシュし、再起動してブートローダーに戻ります

パラメータ
device ITestDevice: フラッシュする ITestDevice

bootloaderImageFile File: ブートローダー イメージ ERROR(/File)

例外
DeviceNotAvailableException デバイスが利用できない場合
TargetSetupError フラッシュに失敗した場合

flashExtraImages

protected void flashExtraImages (ITestDevice device, 
                IDeviceBuildInfo deviceBuild)

システムを書き込んで再起動する前に、デバイス固有のパーティションを書き込みます。オーバーライドされない限り、処理は行われません。

パラメータ
device ITestDevice: フラッシュする ITestDevice

deviceBuild IDeviceBuildInfo: ビルドファイルを含む IDeviceBuildInfo

例外
com.android.tradefed.device.DeviceNotAvailableException
com.android.tradefed.targetprep.TargetSetupError
DeviceNotAvailableException
TargetSetupError

flashPartition

protected void flashPartition (ITestDevice device, 
                File imgFile, 
                String partition)

デバイスの個々のパーティションをフラッシュする

パラメータ
device ITestDevice: フラッシュする ITestDevice

imgFile File: フラッシュするイメージを指す ERROR(/File)

partition String: フラッシュするパーティションの名前

例外
DeviceNotAvailableException
TargetSetupError

flashRamdiskIfNeeded

protected void flashRamdiskIfNeeded (ITestDevice device, 
                IDeviceBuildInfo deviceBuild)

パラメータ
device ITestDevice

deviceBuild IDeviceBuildInfo

例外
DeviceNotAvailableException
TargetSetupError

flashSystem

protected void flashSystem (ITestDevice device, 
                IDeviceBuildInfo deviceBuild)

デバイスにシステム イメージを書き込みます。

パラメータ
device ITestDevice: フラッシュする ITestDevice

deviceBuild IDeviceBuildInfo: フラッシュする IDeviceBuildInfo

例外
DeviceNotAvailableException デバイスが利用できない場合
TargetSetupError fastboot コマンドが失敗した場合

flashUserData

protected void flashUserData (ITestDevice device, 
                IDeviceBuildInfo deviceBuild)

デバイスの userdata パーティションを書き込みます。

パラメータ
device ITestDevice: フラッシュする ITestDevice

deviceBuild IDeviceBuildInfo: フラッシュするファイルを含む IDeviceBuildInfo

例外
DeviceNotAvailableException デバイスが利用できない場合
TargetSetupError ユーザーデータの書き込みに失敗した場合

flashUserDataFromDeviceImageFile

protected void flashUserDataFromDeviceImageFile (ITestDevice device, 
                IDeviceBuildInfo deviceBuild)

デバイス イメージ ファイルから userdata.img を抽出し、デバイスにフラッシュします

パラメータ
device ITestDevice: フラッシュする ITestDevice

deviceBuild IDeviceBuildInfo: フラッシュするファイルを含む IDeviceBuildInfo

例外
DeviceNotAvailableException デバイスが利用できない場合
TargetSetupError ユーザーデータの抽出またはフラッシュに失敗した場合

getBootPartitionName

protected String getBootPartitionName ()

このデバイス フラッシャーのブート パーティション名を取得します。

デフォルトは「bootloader」です。サブクラスは必要に応じてオーバーライドする必要があります。

戻り値
String

getBootloaderFilePrefix

protected String getBootloaderFilePrefix (ITestDevice device)

ブートローダー ファイルの接頭辞を取得します。

デフォルトは getBootPartitionName() です。サブクラスは必要に応じてオーバーライドする必要があります。

パラメータ
device ITestDevice: フラッシュする ITestDevice

戻り値
String

例外
DeviceNotAvailableException デバイスが利用できない場合
TargetSetupError 接頭辞の取得に失敗した場合

getCurrentSlot

protected String getCurrentSlot (ITestDevice device)

現在のスロットを取得するヘルパー メソッド(A/B 対応デバイスの場合)。

パラメータ
device ITestDevice: コマンドを実行する ITestDevice

戻り値
String 「a」、「b」、または null(デバイスが A/B 対応でない場合)

例外
com.android.tradefed.device.DeviceNotAvailableException
com.android.tradefed.targetprep.TargetSetupError
DeviceNotAvailableException
TargetSetupError

getFlashingResourcesRetriever

protected IFlashingResourcesRetriever getFlashingResourcesRetriever ()

戻り値
IFlashingResourcesRetriever

getFuseUtil

protected FuseUtil getFuseUtil ()

戻り値
FuseUtil

getImageVersion

protected String getImageVersion (ITestDevice device, 
                String imageName)

パラメータ
device ITestDevice

imageName String

戻り値
String

例外
DeviceNotAvailableException
TargetSetupError

getRunUtil

protected IRunUtil getRunUtil ()

テスト用に公開されています。

戻り値
IRunUtil

handleUserDataFlashing

protected void handleUserDataFlashing (ITestDevice device, 
                IDeviceBuildInfo deviceBuild)

userdata/cache パーティションのフラッシュを処理

パラメータ
device ITestDevice: フラッシュする ITestDevice

deviceBuild IDeviceBuildInfo: フラッシュするファイルを含む IDeviceBuildInfo

例外
com.android.tradefed.device.DeviceNotAvailableException
com.android.tradefed.targetprep.TargetSetupError
DeviceNotAvailableException
TargetSetupError

hasPartition

protected boolean hasPartition (ITestDevice device, 
                String partition)

指定されたパーティションが存在するかどうかをブートローダーに確認します

パラメータ
device ITestDevice: 操作する ITestDevice

partition String: チェックするパーティションの名前

戻り値
boolean

例外
DeviceNotAvailableException

preFlashSetup

protected void preFlashSetup (ITestDevice device, 
                IDeviceBuildInfo deviceBuild)

必要な追加のフラッシュ前設定を行います。オーバーライドされない限り、処理は行われません。

パラメータ
device ITestDevice: 準備する ITestDevice

deviceBuild IDeviceBuildInfo: ビルドファイルを含む IDeviceBuildInfo

例外
com.android.tradefed.device.DeviceNotAvailableException
com.android.tradefed.targetprep.TargetSetupError
DeviceNotAvailableException
TargetSetupError

setSkipBootloaderVersionCheck

protected void setSkipBootloaderVersionCheck (boolean skipBootloaderVersionCheck)

パラメータ
skipBootloaderVersionCheck boolean

setSkipFastbootFailedMessage

protected void setSkipFastbootFailedMessage (boolean skipFastbootFailedMessage)

パラメータ
skipFastbootFailedMessage boolean

setSystemBuildInfo

protected void setSystemBuildInfo (String systemBuildId, 
                String systemBuildFlavor)

パラメータ
systemBuildId String

systemBuildFlavor String

verifyRequiredBoards

protected void verifyRequiredBoards (ITestDevice device, 
                IFlashingResourcesParser resourceParser, 
                String deviceProductType)

デバイスのプロダクト タイプが、書き込むビルドをサポートしていることを確認します。

ベース実装では、deviceProductType が IFlashingResourcesParser.getRequiredBoards() コレクションに含まれていることを検証します。サブクラスは必要に応じてオーバーライドできます。

パラメータ
device ITestDevice: フラッシュする ITestDevice

resourceParser IFlashingResourcesParser: IFlashingResourcesParser

deviceProductType String: device のプロダクト タイプ

例外
TargetSetupError ビルドの必須ボード情報がデバイスと一致しなかった場合

wipeCache

protected void wipeCache (ITestDevice device)

デバイスのキャッシュ パーティションをワイプします。

パラメータ
device ITestDevice: フラッシュする ITestDevice

例外
DeviceNotAvailableException デバイスが利用できない場合
TargetSetupError キャッシュのフラッシュに失敗した場合

wipePartition

protected void wipePartition (ITestDevice device, 
                String partition)

`fastboot erase <name>` で指定されたパーティションをワイプします。

パラメータ
device ITestDevice: 操作する ITestDevice

partition String: ワイプするパーティションの名前

例外
DeviceNotAvailableException
TargetSetupError