FlashingResourcesParser

public class FlashingResourcesParser
extends Object implements IFlashingResourcesParser

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


這個類別會剖析刷寫裝置所需的輔助映像檔必要版本。 (例如系統啟動載入程式、基頻等)

摘要

巢狀類別

class FlashingResourcesParser.AndroidInfo

Map<String, MultiMap<String, String>> 的 typedef。 

interface FlashingResourcesParser.Constraint

篩選介面,可讓 FlashingResourcesParser 忽略某些可能使用的資源。

常數

String BASEBAND_VERSION_KEY

String BOARD_KEY

String BOOTLOADER_VERSION_KEY

String PRODUCT_KEY

公用建構函式

FlashingResourcesParser(BufferedReader infoReader)

Constructs a FlashingResourcesParser with the supplied AndroidInfo Reader

公開以供單元測試

FlashingResourcesParser(BufferedReader infoReader, c)

Constructs a FlashingResourcesParser with the supplied AndroidInfo Reader

公開以供單元測試

FlashingResourcesParser(File deviceImgZipFile)

建立 FlashingResourcesParser,並讓其剖析指定裝置映像檔的刷機需求。

FlashingResourcesParser(File deviceImgZipFile, c)

建立 FlashingResourcesParser,並讓其剖析指定裝置映像檔的刷機需求。

公用方法

String getRequiredBasebandVersion()

取得裝置映像檔 ZIP 中指定的必要基頻版本。

如果列出多個版本,請取得最新版本,假設版本是依字母順序從舊到新排序。

getRequiredBoards()

取得裝置映像檔 ZIP 中指定的必要主機板類型。

String getRequiredBootloaderVersion()

取得裝置映像檔 zip 中指定的必要系統啟動載入程式版本。

如果列出多個版本,請取得最新版本,假設版本是依字母順序從舊到新排序。

String getRequiredImageVersion(String imageVersionKey)

取得裝置映像檔 ZIP 檔案中指定的必要自訂映像檔版本。

如果列出多個版本,請取得最新版本,假設版本是依字母順序從舊到新排序。

String getRequiredImageVersion(String imageVersionKey, String productName)

取得裝置映像檔 ZIP 中指定的必要自訂映像檔版本。

如果列出多個版本,請取得最新版本,假設版本是依字母順序從舊到新排序。

常數

BASEBAND_VERSION_KEY

public static final String BASEBAND_VERSION_KEY

常數值: "version-baseband"

BOARD_KEY

public static final String BOARD_KEY

常數值: "board"

BOOTLOADER_VERSION_KEY

public static final String BOOTLOADER_VERSION_KEY

常數值: "version-bootloader"

PRODUCT_KEY

public static final String PRODUCT_KEY

常數值: "product"

公用建構函式

FlashingResourcesParser

public FlashingResourcesParser (BufferedReader infoReader)

Constructs a FlashingResourcesParser with the supplied AndroidInfo Reader

公開以進行單元測試

參數
infoReader BufferedReader:包含 android-info.txt 等效項的 ERROR(/BufferedReader),用於剖析

FlashingResourcesParser

public FlashingResourcesParser (BufferedReader infoReader, 
                 c)

Constructs a FlashingResourcesParser with the supplied AndroidInfo Reader

公開以進行單元測試

參數
infoReader BufferedReader:包含 android-info.txt 等效項的 ERROR(/BufferedReader),用於剖析

c :從鍵名到 Constraint 的對應。系統會根據適當的限制 (如有) 檢查圖片名稱,確認符合新增條件。如要停用篩選功能,可以設為空值。

FlashingResourcesParser

public FlashingResourcesParser (File deviceImgZipFile)

建立 FlashingResourcesParser,並讓其剖析指定裝置映像檔的刷機需求。

參數
deviceImgZipFile File:要刷入的 updater.zip 檔案

擲回
TargetSetupError

FlashingResourcesParser

public FlashingResourcesParser (File deviceImgZipFile, 
                 c)

建立 FlashingResourcesParser,並讓其剖析指定裝置映像檔的刷機需求。閃爍需求必須通過適當的限制 (如有),才能新增。系統會自動捨棄遭拒的要求。

參數
deviceImgZipFile File:要刷入的 updater.zip 檔案

c :從鍵名到 Constraint 的對應。系統會根據適當的限制 (如有) 檢查圖片名稱,確認符合新增條件。如要停用篩選功能,可以設為空值。

擲回
TargetSetupError

公用方法

getRequiredBasebandVersion

public String getRequiredBasebandVersion ()

取得裝置映像檔 ZIP 中指定的必要基頻版本。

如果列出多個版本,請取得最新版本,假設版本是依字母順序從舊到新排序。

傳回
String 基頻版本,如未指定則為 null

getRequiredBoards

public  getRequiredBoards ()

取得裝置映像檔 ZIP 中指定的必要主機板類型。

傳回
板類型,或如未指定則為 null

getRequiredBootloaderVersion

public String getRequiredBootloaderVersion ()

取得裝置映像檔 zip 中指定的必要系統啟動載入程式版本。

如果列出多個版本,請取得最新版本,假設版本是依字母順序從舊到新排序。

傳回
String 啟動載入程式版本,或未指定時為 null

getRequiredImageVersion

public String getRequiredImageVersion (String imageVersionKey)

取得裝置映像檔 ZIP 檔案中指定的必要自訂映像檔版本。

如果列出多個版本,請取得最新版本,假設版本是依字母順序從舊到新排序。

參數
imageVersionKey String:圖片版本資訊的預期 ID

傳回
String 指定映像檔或 null 的必要版本 (如未指定)

getRequiredImageVersion

public String getRequiredImageVersion (String imageVersionKey, 
                String productName)

取得裝置映像檔 zip 中指定的必要自訂映像檔版本。如果 productName 不是 null,這個方法會檢查 (並傳回,如果有的話) 為該特定產品指定的圖片規定。如果沒有特定產品的規定,系統會改為傳回全域規定,如果該特定 versionKey 沒有任何規定,則會傳回 null

如果列出多個版本,請取得最新版本,假設版本是依字母順序從舊到新排序。

參數
imageVersionKey String:圖片版本資訊的預期 ID

productName String:要檢查的特定產品名稱

傳回
String 指定映像檔或 null 的必要版本 (如未指定)