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) ไม่-op |
void | preUpdateActions (File deviceUpdateImage, ITestDevice device) ไม่-op |
ผู้สร้างสาธารณะ
DeviceImageZipFlashingTargetPreparer
public DeviceImageZipFlashingTargetPreparer ()
วิธีการป้องกัน
getDeviceUpdateImage
protected File getDeviceUpdateImage ()
จัดเตรียมอินสแตนซ์ ERROR(/File)
ที่แสดงไฟล์อิมเมจของอุปกรณ์ที่จะใช้สำหรับการอัปเดต
ส่งคืน | |
---|---|
File |
ดำเนินการอัปเดตอุปกรณ์
protected void performDeviceUpdate (File deviceUpdateImage, ITestDevice device)
ขยาย zip อัปเดตอิมเมจของอุปกรณ์และเรียกใช้สคริปต์การกะพริบที่แนบมา
พ่น | |
---|---|
DeviceNotAvailableException | |
TargetSetupError |
โพสต์อัปเดตการดำเนินการ
protected void postUpdateActions (File deviceUpdateImage, ITestDevice device)
ไม่-op
พ่น | |
---|---|
DeviceNotAvailableException | |
TargetSetupError |
preUpdateActions
protected void preUpdateActions (File deviceUpdateImage, ITestDevice device)
ไม่-op
พ่น | |
---|---|
DeviceNotAvailableException | |
TargetSetupError |