增量映像檔公用程式
public
class
IncrementalImageUtil
extends Object
java.lang.Object | |
↳ | com.android.tradefed.util.image.IncrementalImageUtil |
可用來利用增量映像檔和裝置更新的工具。
摘要
欄位 | |
---|---|
public
static
final
|
DYNAMIC_PARTITIONS_TO_DIFF
|
公用建構函式 | |
---|---|
IncrementalImageUtil(ITestDevice device, File deviceImage, File bootloader, File baseband, File targetImage, File createSnapshot, boolean applySnapshot, boolean wipeAfterApply, boolean newFlow, SnapuserdWaitPhase waitPhase)
|
公用方法 | |
---|---|
void
|
allowSameBuildFlashing()
|
void
|
allowUnzipBaseline()
|
void
|
cleanAfterSetup()
執行部分套用邏輯時,可在設定完成後立即清除檔案。 |
File
|
getExtractedTargetDirectory()
|
static
IncrementalImageUtil
|
initialize(ITestDevice device, IDeviceBuildInfo build, File createSnapshot, boolean isIsolatedSetup, boolean allowCrossRelease, MultiMap<String, String> allowedbranchTransition, boolean applySnapshot, boolean wipeAfterApply, boolean newFlow, SnapuserdWaitPhase waitPhase)
|
boolean
|
isSameBuildFlashingAllowed()
|
static
boolean
|
isSnapshotInUse(ITestDevice device)
傳回裝置目前是否使用快照。 |
static
boolean
|
isSnapshotSupported(ITestDevice device, boolean applySnapshot)
會傳回是否可以使用快照邏輯更新裝置 |
void
|
notifyBasebadNeedsRevert()
|
void
|
notifyBootloaderNeedsRevert()
|
void
|
teardownDevice(TestInformation testInfo)
|
boolean
|
updateCompleted()
傳回更新是否已完成。 |
void
|
updateDevice(File currentBootloader, File currentRadio)
使用快照邏輯更新裝置。 |
void
|
updateDeviceWithNewFlow(File currentBootloader, File currentRadio)
|
boolean
|
useUpdatedFlow()
|
欄位
DYNAMIC_PARTITIONS_TO_DIFF
public static finalDYNAMIC_PARTITIONS_TO_DIFF
公用建構函式
增量映像檔公用程式
public IncrementalImageUtil (ITestDevice device, File deviceImage, File bootloader, File baseband, File targetImage, File createSnapshot, boolean applySnapshot, boolean wipeAfterApply, boolean newFlow, SnapuserdWaitPhase waitPhase)
參數 | |
---|---|
device |
ITestDevice |
deviceImage |
File |
bootloader |
File |
baseband |
File |
targetImage |
File |
createSnapshot |
File |
applySnapshot |
boolean |
wipeAfterApply |
boolean |
newFlow |
boolean |
waitPhase |
SnapuserdWaitPhase |
公用方法
allowSameBuildFlashing
public void allowSameBuildFlashing ()
allowUnzipBaseline
public void allowUnzipBaseline ()
cleanAfterSetup
public void cleanAfterSetup ()
執行部分套用邏輯時,可在設定完成後立即清除檔案。
getExtractedTargetDirectory
public File getExtractedTargetDirectory ()
傳回 | |
---|---|
File |
初始化
public static IncrementalImageUtil initialize (ITestDevice device, IDeviceBuildInfo build, File createSnapshot, boolean isIsolatedSetup, boolean allowCrossRelease, MultiMap<String, String> allowedbranchTransition, boolean applySnapshot, boolean wipeAfterApply, boolean newFlow, SnapuserdWaitPhase waitPhase)
參數 | |
---|---|
device |
ITestDevice |
build |
IDeviceBuildInfo |
createSnapshot |
File |
isIsolatedSetup |
boolean |
allowCrossRelease |
boolean |
allowedbranchTransition |
MultiMap |
applySnapshot |
boolean |
wipeAfterApply |
boolean |
newFlow |
boolean |
waitPhase |
SnapuserdWaitPhase |
傳回 | |
---|---|
IncrementalImageUtil |
擲回 | |
---|---|
DeviceNotAvailableException |
isSameBuildFlashingAllowed
public boolean isSameBuildFlashingAllowed ()
傳回 | |
---|---|
boolean |
isSnapshotInUse
public static boolean isSnapshotInUse (ITestDevice device)
傳回裝置目前是否使用快照。
參數 | |
---|---|
device |
ITestDevice |
傳回 | |
---|---|
boolean |
擲回 | |
---|---|
DeviceNotAvailableException |
支援快照
public static boolean isSnapshotSupported (ITestDevice device, boolean applySnapshot)
傳回是否可使用快照邏輯更新裝置
參數 | |
---|---|
device |
ITestDevice |
applySnapshot |
boolean |
傳回 | |
---|---|
boolean |
擲回 | |
---|---|
DeviceNotAvailableException |
notifyBasebadNeedsRevert
public void notifyBasebadNeedsRevert ()
notifyBootloaderNeedsRevert
public void notifyBootloaderNeedsRevert ()
teardownDevice
public void teardownDevice (TestInformation testInfo)
參數 | |
---|---|
testInfo |
TestInformation |
擲回 | |
---|---|
DeviceNotAvailableException |
更新完成
public boolean updateCompleted ()
傳回更新是否完成的結果。
傳回 | |
---|---|
boolean |
updateDevice
public void updateDevice (File currentBootloader, File currentRadio)
使用快照邏輯更新裝置。
參數 | |
---|---|
currentBootloader |
File |
currentRadio |
File |
擲回 | |
---|---|
DeviceNotAvailableException |
|
TargetSetupError |
updateDeviceWithNewFlow (更新裝置與新流程)
public void updateDeviceWithNewFlow (File currentBootloader, File currentRadio)
參數 | |
---|---|
currentBootloader |
File |
currentRadio |
File |
擲回 | |
---|---|
DeviceNotAvailableException |
|
TargetSetupError |
useUpdatedFlow
public boolean useUpdatedFlow ()
傳回 | |
---|---|
boolean |