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
เป็นหมายเลขซีเรียลของอุปกรณ์เป็นส่วนหนึ่งของสภาพแวดล้อมการดําเนินการ - สคริปต์อาจถือว่ามี
adb
และfastboot
ใน PATH
flash-
all.sh
ที่แนบมาภายใต้ข้อสมมติที่ระบุไว้ในข้อกำหนดข้างต้น
สรุป
ตัวสร้างแบบสาธารณะ | |
---|---|
DeviceImageZipFlashingTargetPreparer()
|
วิธีการที่มีการป้องกัน | |
---|---|
File
|
getDeviceUpdateImage()
ระบุอินสแตนซ์ |
void
|
performDeviceUpdate(File deviceUpdateImage, ITestDevice device)
ขยายไฟล์ ZIP การอัปเดตรูปภาพอุปกรณ์และเรียกใช้สคริปต์การแฟลชที่แนบมา |
void
|
postUpdateActions(File deviceUpdateImage, ITestDevice device)
ไม่มีการดำเนินการ |
void
|
preUpdateActions(File deviceUpdateImage, ITestDevice device)
ไม่มีการดำเนินการ |
ตัวสร้างแบบสาธารณะ
DeviceImageZipFlashingTargetPreparer
public DeviceImageZipFlashingTargetPreparer ()
วิธีการที่มีการป้องกัน
getDeviceUpdateImage
protected File getDeviceUpdateImage ()
ระบุอินสแตนซ์ ERROR(/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 |