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 に
adbとfastbootがあることを前提としている場合があります。
flash-
all.sh を実行します。
概要
パブリック コンストラクタ | |
|---|---|
DeviceImageZipFlashingTargetPreparer()
|
|
保護されたメソッド | |
|---|---|
File
|
getDeviceUpdateImage()
アップデートに使用されるデバイス イメージ ファイルを表す |
void
|
performDeviceUpdate(File deviceUpdateImage, ITestDevice device)
デバイス イメージ アップデートの zip を展開し、含まれているフラッシュ スクリプトを呼び出します。 |
void
|
postUpdateActions(File deviceUpdateImage, ITestDevice device)
No-op |
void
|
preUpdateActions(File deviceUpdateImage, ITestDevice device)
No-op |
パブリック コンストラクタ
DeviceImageZipFlashingTargetPreparer
public DeviceImageZipFlashingTargetPreparer ()
保護されたメソッド
getDeviceUpdateImage
protected File getDeviceUpdateImage ()
更新に使用するデバイス イメージ ファイルを表す 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 |
|