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 फ़ाइल में रूट में flash-all.sh स्क्रिप्ट शामिल होनी चाहिए
  • स्क्रिप्ट को यह मानना चाहिए कि डिवाइस, adb devices को दिखने वाले यूज़रस्पेस में है
  • बाकी zip फ़ाइल को स्क्रिप्ट के साथ उसी जगह पर निकाला जाएगा जहां स्क्रिप्ट मौजूद है. साथ ही, स्क्रिप्ट में रिलेटिव पाथ के ज़रिए, zip में पैकेज की गई किसी भी फ़ाइल का रेफ़रंस दिया जा सकता है
  • फ़्लैश करने के बाद, स्क्रिप्ट को डिवाइस को उसी स्थिति में वापस लाना चाहिए
  • एनवायरमेंट वैरिएबल ANDROID_SERIAL को डिवाइस के सीरियल नंबर पर सेट किया जाएगा, क्योंकि यह एक्ज़ीक्यूशन एनवायरमेंट का हिस्सा है
  • स्क्रिप्ट यह मान सकती है कि PATH में adb और fastboot मौजूद हैं
टारगेट तैयार करने वाला यह टूल, डिवाइस की इमेज की ज़िप फ़ाइल को अनपैक करेगा. साथ ही, ऊपर दी गई ज़रूरी शर्तों के तहत, उसमें शामिल flash- all.sh को लागू करेगा.

खास जानकारी

पब्लिक कंस्ट्रक्टर

DeviceImageZipFlashingTargetPreparer()

सुरक्षित तरीके

File getDeviceUpdateImage()

अपडेट करने के लिए इस्तेमाल की जाने वाली डिवाइस इमेज फ़ाइल को दिखाने वाला ERROR(/File) इंस्टेंस उपलब्ध कराता है

void performDeviceUpdate(File deviceUpdateImage, ITestDevice device)

डिवाइस की इमेज अपडेट करने वाली ज़िप फ़ाइल को बड़ा करता है और उसमें शामिल फ़्लैश करने की स्क्रिप्ट को कॉल करता है

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)

डिवाइस की इमेज अपडेट करने वाली ज़िप फ़ाइल को बड़ा करता है और उसमें शामिल फ़्लैश करने की स्क्रिप्ट को कॉल करता है

थ्रो
DeviceNotAvailableException
TargetSetupError

postUpdateActions

protected void postUpdateActions (File deviceUpdateImage, 
                ITestDevice device)

कोई कार्रवाई नहीं

थ्रो
DeviceNotAvailableException
TargetSetupError

preUpdateActions

protected void preUpdateActions (File deviceUpdateImage, 
                ITestDevice device)

कोई कार्रवाई नहीं

थ्रो
DeviceNotAvailableException
TargetSetupError