อุปกรณ์ImageZipFlashingTargetPreparer
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) No-op |
void | preUpdateActions (File deviceUpdateImage, ITestDevice device) No-op |
ผู้สร้างสาธารณะ
อุปกรณ์ImageZipFlashingTargetPreparer
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)
No-op
ขว้าง | |
---|---|
DeviceNotAvailableException | |
TargetSetupError |
preUpdateActions
protected void preUpdateActions (File deviceUpdateImage, ITestDevice device)
No-op
ขว้าง | |
---|---|
DeviceNotAvailableException | |
TargetSetupError |