INativeDevice

public interface INativeDevice

com.android.tradefed.device.INativeDevice


ddmlib IDevice को एक विश्वसनीय और थोड़ा उच्च स्तरीय API प्रदान करता है।

एक कॉन्फ़िगर करने योग्य राशि के लिए डिवाइस कमांड को पुनः प्रयास करता है, और उन डिवाइसों के लिए एक डिवाइस पुनर्प्राप्ति इंटरफ़ेस प्रदान करता है जो अनुत्तरदायी हैं।

सारांश

स्थिरांक

int UNKNOWN_API_LEVEL

जब एपीआई स्तर का पता नहीं लगाया जा सकता तो डिफ़ॉल्ट मान

सार्वजनिक तरीके

abstract boolean checkApiLevelAgainstNextRelease (int strictMinLevel)

न्यूनतम समर्थित स्तर पर जांचें कि कोई सुविधा वर्तमान में समर्थित है या नहीं।

abstract void clearLogcat ()

किसी भी संचित लॉगकैट डेटा को हटा देता है।

abstract void deleteFile (String deviceFilePath)

डिवाइस पर किसी फ़ाइल या निर्देशिका को हटाने के लिए सहायक विधि।

abstract boolean deviceSoftRestarted ( ProcessInfo prevSystemServerProcess)

वर्तमान system_server की पिछले system_server ProcessInfo से तुलना करके यह जांचने के लिए सहायक विधि कि डिवाइस सॉफ्ट-रीस्टार्ट हुआ है या नहीं।

abstract boolean deviceSoftRestartedSince (long utcEpochTime, TimeUnit timeUnit)

यह जांचने के लिए सहायक विधि कि डिवाइस और उसके ERROR(/TimeUnit) से यूटीसी समय के बाद से डिवाइस सॉफ्ट-रीस्टार्ट हुआ है या नहीं।

abstract boolean disableAdbRoot ()

एडीबी रूट को बंद कर देता है।

abstract boolean doesFileExist (String deviceFilePath)

डिवाइस पर फ़ाइल मौजूद है या नहीं यह निर्धारित करने के लिए सहायक विधि।

abstract boolean enableAdbRoot ()

एडीबी रूट चालू करता है।

abstract String executeAdbCommand (long timeout, String... commandArgs)

हेल्पर विधि जो एक एडीबी कमांड को एक निर्दिष्ट टाइमआउट के साथ सिस्टम कमांड के रूप में निष्पादित करती है।

abstract String executeAdbCommand (String... commandArgs)

हेल्पर विधि जो एडीबी कमांड को सिस्टम कमांड के रूप में निष्पादित करती है।

abstract String executeAdbCommand (long timeout, envMap, String... commandArgs) executeAdbCommand (long timeout, envMap, String... commandArgs)

हेल्पर विधि जो एक एडीबी कमांड को एक निर्दिष्ट टाइमआउट के साथ सिस्टम कमांड के रूप में निष्पादित करती है।

abstract CommandResult executeFastbootCommand (long timeout, String... commandArgs)

हेल्पर विधि जो फास्टबूट कमांड को सिस्टम कमांड के रूप में निष्पादित करती है।

abstract CommandResult executeFastbootCommand (String... commandArgs)

हेल्पर विधि जो फास्टबूट कमांड को 2 मिनट के डिफ़ॉल्ट टाइमआउट के साथ सिस्टम कमांड के रूप में निष्पादित करती है।

abstract CommandResult executeLongFastbootCommand (String... commandArgs)

हेल्पर विधि जो लंबे समय तक चलने वाले फास्टबूट कमांड को सिस्टम कमांड के रूप में निष्पादित करती है।

abstract CommandResult executeLongFastbootCommand ( envVarMap, String... commandArgs) executeLongFastbootCommand ( envVarMap, String... commandArgs)

हेल्पर विधि जो सिस्टम वातावरण चर के साथ सिस्टम कमांड के रूप में लंबे समय तक चलने वाले फास्टबूट कमांड को निष्पादित करती है।

abstract String executeShellCommand (String command)

हेल्पर विधि जो एडीबी शेल कमांड निष्पादित करती है और String के रूप में आउटपुट लौटाती है।

abstract void executeShellCommand (String command, IShellOutputReceiver receiver, long maxTimeToOutputShellResponse, TimeUnit timeUnit, int retryAttempts)

कमांड व्यवहार को नियंत्रित करने के लिए अधिक मापदंडों के साथ एक एडीबी शेल कमांड निष्पादित करता है।

abstract void executeShellCommand (String command, IShellOutputReceiver receiver, long maxTimeoutForCommand, long maxTimeToOutputShellResponse, TimeUnit timeUnit, int retryAttempts)

कमांड व्यवहार को नियंत्रित करने के लिए अधिक मापदंडों के साथ एक एडीबी शेल कमांड निष्पादित करता है।

abstract void executeShellCommand (String command, IShellOutputReceiver receiver)

दिए गए एडीबी शेल कमांड को निष्पादित करता है, यदि कमांड विफल हो जाता है तो कई बार पुन: प्रयास करता है।

abstract CommandResult executeShellV2Command (String command)

हेल्पर विधि जो एडीबी शेल कमांड को निष्पादित करती है और कमांड स्टेटस आउटपुट, स्टडआउट और स्टडर के साथ उचित रूप से पॉप्युलेट किए गए CommandResult के रूप में परिणाम लौटाती है।

abstract CommandResult executeShellV2Command (String command, OutputStream pipeToOutput)

हेल्पर विधि जो एडीबी शेल कमांड को निष्पादित करती है और कमांड स्थिति आउटपुट और stderr के साथ उचित रूप से पॉप्युलेट किए गए CommandResult के रूप में परिणाम लौटाती है।

abstract CommandResult executeShellV2Command (String command, File pipeAsInput)

हेल्पर विधि जो एडीबी शेल कमांड को निष्पादित करती है और कमांड स्टेटस आउटपुट, स्टडआउट और स्टडर के साथ उचित रूप से पॉप्युलेट किए गए CommandResult के रूप में परिणाम लौटाती है।

abstract CommandResult executeShellV2Command (String command, long maxTimeoutForCommand, TimeUnit timeUnit, int retryAttempts)

कमांड व्यवहार को नियंत्रित करने के लिए अधिक मापदंडों के साथ एक एडीबी शेल कमांड निष्पादित करता है।

abstract CommandResult executeShellV2Command (String command, long maxTimeoutForCommand, TimeUnit timeUnit)

कमांड व्यवहार को नियंत्रित करने के लिए अधिक मापदंडों के साथ एक एडीबी शेल कमांड निष्पादित करता है।

abstract CommandResult executeShellV2Command (String command, File pipeAsInput, OutputStream pipeToOutput, long maxTimeoutForCommand, TimeUnit timeUnit, int retryAttempts)

कमांड व्यवहार को नियंत्रित करने के लिए अधिक मापदंडों के साथ एक एडीबी शेल कमांड निष्पादित करता है।

abstract CommandResult executeShellV2Command (String command, File pipeAsInput, OutputStream pipeToOutput, OutputStream pipeToError, long maxTimeoutForCommand, TimeUnit timeUnit, int retryAttempts)

कमांड व्यवहार को नियंत्रित करने के लिए अधिक मापदंडों के साथ एक एडीबी शेल कमांड निष्पादित करता है।

abstract CommandResult fastbootWipePartition (String partition)

सहायक विधि जो डिवाइस के लिए एक विभाजन को मिटा देती है।

abstract int getApiLevel ()

डिवाइस एपीआई स्तर प्राप्त करें।

abstract String getBasebandVersion ()

इस उपकरण का बेसबैंड (रेडियो) संस्करण प्राप्त करने की सुविधा विधि।

abstract Integer getBattery ()

डिवाइस का वर्तमान बैटरी स्तर लौटाता है या बैटरी स्तर अनुपलब्ध होने पर शून्य लौटाता है।

abstract boolean getBooleanProperty (String name, boolean defaultValue)

दी गई संपत्ति का बूलियन मान लौटाता है।

abstract getBootHistory ()

हेल्पर विधि बूट समय और बूट कारण के साथ बूट इतिहास मानचित्र एकत्र करती है।

abstract getBootHistorySince (long utcEpochTime, TimeUnit timeUnit)

हेल्पर विधि डिवाइस से युग के बाद से दिए गए समय और निर्दिष्ट समय इकाई के बाद से बूट इतिहास मानचित्र को बूट समय और बूट कारण के साथ एकत्र करती है।

abstract String getBootloaderVersion ()

इस डिवाइस का बूटलोडर संस्करण प्राप्त करने की सुविधा विधि।

abstract String getBuildAlias ()

उस बिल्ड का उपनाम पुनः प्राप्त करें जो डिवाइस वर्तमान में चल रहा है।

abstract String getBuildFlavor ()

डिवाइस के लिए बिल्ड फ्लेवर पुनः प्राप्त करें।

abstract String getBuildId ()

डिवाइस द्वारा वर्तमान में चल रहे बिल्ड को पुनः प्राप्त करें।

abstract String getBuildSigningKeys ()

डिवाइस छवि पर हस्ताक्षर करने के लिए उपयोग की जाने वाली कुंजी प्रकार लौटाता है

आमतौर पर एंड्रॉइड डिवाइस पर परीक्षण-कुंजी (जैसे एओएसपी में) या रिलीज़-कुंजी (व्यक्तिगत डिवाइस निर्माताओं द्वारा नियंत्रित) के साथ हस्ताक्षर किए जा सकते हैं।

abstract DeviceDescriptor getCachedDeviceDescriptor ()

यदि डिवाइस आवंटित किया गया है तो कैश्ड DeviceDescriptor लौटाता है, अन्यथा वर्तमान DeviceDescriptor लौटाता है।

abstract DeviceDescriptor getCachedDeviceDescriptor (boolean shortDescriptor)

यदि डिवाइस आवंटित किया गया है तो कैश्ड DeviceDescriptor लौटाता है, अन्यथा वर्तमान DeviceDescriptor लौटाता है।

abstract String[] getChildren (String deviceFilePath)

IFileEntry का उपयोग करने का विकल्प जो कभी-कभी अनुमतियों के कारण काम नहीं करेगा।

abstract AbstractConnection getConnection ()

डिवाइस से संबद्ध कनेक्शन लौटाता है.

abstract String getDeviceClass ()

डिवाइस क्लास प्राप्त करें.

abstract long getDeviceDate ()

युग के बाद से डिवाइस की तारीख मिलीसेकंड में लौटाएं।

abstract DeviceDescriptor getDeviceDescriptor ()

वास्तविक डिवाइस ऑब्जेक्ट को पास किए बिना इसके बारे में जानकारी प्राप्त करने के लिए डिवाइस जानकारी से DeviceDescriptor लौटाएँ।

abstract DeviceDescriptor getDeviceDescriptor (boolean shortDescriptor)

वास्तविक डिवाइस ऑब्जेक्ट को पास किए बिना इसके बारे में जानकारी प्राप्त करने के लिए डिवाइस जानकारी से DeviceDescriptor लौटाएँ।

abstract TestDeviceState getDeviceState ()

डिवाइस की स्थिति प्राप्त करें.

abstract long getDeviceTimeOffset (Date date)

डिवाइस और किसी दिए गए ERROR(/Date) के बीच समय का अंतर जानने में सहायक।

abstract InputStreamSource getEmulatorOutput ()

एम्यूलेटर stdout और stderr की स्ट्रीम प्राप्त करें

abstract long getExternalStoreFreeSpace ()

डिवाइस के बाह्य भंडारण पर खाली स्थान की मात्रा निर्धारित करने के लिए सहायक विधि।

abstract String getFastbootProductType ()

फास्टबूट मोड में इस डिवाइस का उत्पाद प्रकार प्राप्त करने की सुविधा विधि।

abstract String getFastbootProductVariant ()

फास्टबूट मोड में इस डिवाइस का उत्पाद प्रकार प्राप्त करने की सुविधा विधि।

abstract String getFastbootSerialNumber ()

फास्टबूट मोड सीरियल नंबर लौटाता है।

abstract String getFastbootVariable (String variableName)

डिवाइस से दिए गए फास्टबूट वैरिएबल मान को पुनः प्राप्त करें।

abstract IFileEntry getFileEntry (String path)

डिवाइस पर किसी दूरस्थ फ़ाइल का संदर्भ पुनः प्राप्त करें।

abstract IDevice getIDevice ()

संबंधित ddmlib IDevice का संदर्भ लौटाता है।

abstract long getIntProperty (String name, long defaultValue)

डिवाइस से दी गई संपत्ति का पूर्णांक मान लौटाता है।

abstract long getLastExpectedRebootTimeMillis ()

पिछली बार जब ट्रेडफेड एपीआई ने ईपीओसीएच के बाद से System.currentTimeMillis() द्वारा लौटाया गया था, तब से मिलीसेकंड में रीबूट ट्रिगर किया था।

abstract int getLaunchApiLevel ()

डिवाइस का पहला लॉन्च किया गया एपीआई स्तर प्राप्त करें।

abstract InputStreamSource getLogcat ()

लॉगकैट डेटा का स्नैपशॉट स्ट्रीम पकड़ता है।

abstract InputStreamSource getLogcat (int maxBytes)

कैप्चर किए गए लॉगकैट डेटा के अंतिम maxBytes का स्नैपशॉट स्ट्रीम पकड़ता है।

abstract InputStreamSource getLogcatDump ()

डिवाइस के लिए वर्तमान लॉगकैट का डंप प्राप्त करें।

abstract InputStreamSource getLogcatSince (long date)

प्रदान की गई तारीख से प्रारंभ करते हुए कैप्चर किए गए लॉगकैट डेटा का एक स्नैपशॉट स्ट्रीम प्राप्त करता है।

abstract String getMountPoint (String mountName)

एक आरोह बिंदु लौटाता है.

abstract ITestDevice.MountPointInfo getMountPointInfo (String mountpoint)

निर्दिष्ट माउंटपॉइंट पथ के अनुरूप एक MountPointInfo लौटाता है, या यदि उस पथ में कुछ भी माउंट नहीं है तो null लौटाता है या अन्यथा /proc/mounts में माउंटपॉइंट के रूप में प्रकट नहीं होता है।

abstract getMountPointInfo ()

डिवाइस पर /proc/mounts में जानकारी का एक पार्स किया गया संस्करण लौटाता है

abstract long getPartitionFreeSpace (String partition)

डिवाइस विभाजन पर खाली स्थान की मात्रा निर्धारित करने के लिए सहायक विधि।

abstract ProcessInfo getProcessByName (String processName)

हेल्पर विधि "पिडोफ़" और "स्टेट" कमांड चलाती है और पीआईडी ​​​​के साथ ProcessInfo ऑब्जेक्ट लौटाती है और दी गई प्रक्रिया का प्रारंभ समय बताती है।

abstract String getProcessPid (String process)

यदि कुछ गलत हुआ तो सेवा का पीआईडी ​​लौटाता है या शून्य कर देता है।

abstract String getProductType ()

इस उपकरण का उत्पाद प्रकार प्राप्त करने की सुविधा विधि।

abstract String getProductVariant ()

इस उपकरण का उत्पाद संस्करण प्राप्त करने की सुविधाजनक विधि।

abstract String getProperty (String name)

डिवाइस से दिए गए संपत्ति मूल्य को पुनः प्राप्त करें।

abstract ITestDevice.RecoveryMode getRecoveryMode ()

डिवाइस के लिए उपयोग किया जाने वाला वर्तमान पुनर्प्राप्ति मोड प्राप्त करें।

abstract String getSerialNumber ()

इस उपकरण का क्रमांक प्राप्त करने की सुविधाजनक विधि।

abstract getTombstones ()

उपकरणों से समाधि के पत्थरों की सूची प्राप्त करें और लौटाएँ।

abstract long getTotalMemory ()

आंतरिक त्रुटि के मामले में कुल भौतिक मेमोरी आकार बाइट्स या -1 में लौटाता है

abstract boolean getUseFastbootErase ()

जानें कि डिवाइस पर विभाजन को मिटाने के लिए फास्टबूट इरेज़ या फास्टबूट प्रारूप का उपयोग करना है या नहीं।

abstract boolean isAdbRoot ()
abstract boolean isAdbTcp ()
abstract boolean isAppEnumerationSupported ()

जांचें कि डिवाइस पर प्लेटफ़ॉर्म ऐप गणना का समर्थन करता है या नहीं

abstract boolean isBypassLowTargetSdkBlockSupported ()

जांचें कि क्या डिवाइस पर प्लेटफ़ॉर्म ऐप इंस्टॉल पर कम लक्ष्य एसडीके ब्लॉक को बायपास करने का समर्थन करता है

abstract boolean isDeviceEncrypted ()

यदि डिवाइस एन्क्रिप्टेड है तो वापस आ जाता है।

abstract boolean isDirectory (String deviceFilePath)

यदि डिवाइस पर पथ एक निर्देशिका है तो सही लौटें, अन्यथा गलत लौटें।

abstract boolean isEncryptionSupported ()

यदि डिवाइस पर एन्क्रिप्शन समर्थित है तो वापस आ जाता है।

abstract boolean isExecutable (String fullPath)

यदि डिवाइस पर फ़ाइल पथ एक निष्पादन योग्य फ़ाइल है, तो सत्य लौटाता है, अन्यथा गलत लौटाता है।

abstract boolean isHeadless ()

यदि डिवाइस हेडलेस (कोई स्क्रीन नहीं) है तो सही लौटाएं, अन्यथा गलत लौटाएं।

abstract boolean isRuntimePermissionSupported ()

जांचें कि डिवाइस पर प्लेटफ़ॉर्म रनटाइम अनुमति देने का समर्थन करता है या नहीं

abstract boolean isStateBootloaderOrFastbootd ()

यदि डिवाइस TestDeviceState#FASTBOOT या TestDeviceState.FASTBOOTD में है तो सत्य लौटाता है।

abstract boolean logAnrs ( ITestLogger logger)

डिवाइस से ANR एकत्रित और लॉग करें।

abstract void logOnDevice (String tag, Log.LogLevel level, String format, Object... args)

डिवाइस के लॉगकैट में एक संदेश लॉग करें।

abstract void nonBlockingReboot ()

डिवाइस को रीबूट करने के लिए एक कमांड जारी करता है और कमांड पूरा होने पर और जब डिवाइस एडीबी को दिखाई नहीं देता है तो वापस लौटता है।

abstract void postBootSetup ()

प्रत्येक बूट के बाद परीक्षण के लिए डिवाइस को कॉन्फ़िगर करने के निर्देशों का पालन करें।

default void postInvocationTearDown ()

यह विधि अस्वीकृत है. इसके बजाय postInvocationTearDown(Throwable) उपयोग करें।

abstract void postInvocationTearDown (Throwable invocationException)

डिवाइस विशिष्ट आवश्यक सफ़ाई के लिए अतिरिक्त कदम जिन्हें आह्वान पूरा होने के बाद निष्पादित किया जाएगा।

default void preInvocationSetup ( IBuildInfo info, MultiMap <String, String> attributes)

डिवाइस विशिष्ट आवश्यक सेटअप के लिए अतिरिक्त चरण जिन्हें आमंत्रण प्रवाह से पहले डिवाइस पर निष्पादित किया जाएगा।

abstract boolean pullDir (String deviceFilePath, File localDir)

डिवाइस से निर्देशिका सामग्री को पुनरावर्ती रूप से खींचें।

abstract File pullFile (String remoteFilePath, int userId)

डिवाइस से फ़ाइल पुनर्प्राप्त करता है, इसे स्थानीय अस्थायी ERROR(/File) में संग्रहीत करता है, और उस File वापस कर देता है।

abstract File pullFile (String remoteFilePath)

डिवाइस से फ़ाइल पुनर्प्राप्त करता है, इसे स्थानीय अस्थायी ERROR(/File) में संग्रहीत करता है, और उस File वापस कर देता है।

abstract boolean pullFile (String remoteFilePath, File localFile)

डिवाइस से फ़ाइल पुनर्प्राप्त करता है।

abstract boolean pullFile (String remoteFilePath, File localFile, int userId)

डिवाइस से फ़ाइल पुनर्प्राप्त करता है।

abstract String pullFileContents (String remoteFilePath)

डिवाइस से फ़ाइल पुनर्प्राप्त करता है, और सामग्री लौटाता है।

abstract File pullFileFromExternal (String remoteFilePath)

डिवाइस के बाहरी स्टोरेज से किसी फ़ाइल को पुनर्प्राप्त करने की एक सुविधाजनक विधि, इसे स्थानीय अस्थायी ERROR(/File) में संग्रहीत करती है, और उस File का संदर्भ लौटाती है।

abstract boolean pushDir (File localDir, String deviceFilePath, excludedDirectories) pushDir (File localDir, String deviceFilePath, excludedDirectories)

फ़िल्टर की गई कुछ निर्देशिकाओं को बाहर करते हुए निर्देशिका सामग्री को डिवाइस पर पुनरावर्ती रूप से पुश करें।

abstract boolean pushDir (File localDir, String deviceFilePath)

डिवाइस पर निर्देशिका सामग्री को पुनरावर्ती रूप से पुश करें।

abstract boolean pushFile (File localFile, String deviceFilePath, boolean evaluateContentProviderNeeded)

pushFile(File, String) का वेरिएंट जो वैकल्पिक रूप से सामग्री प्रदाता की आवश्यकता का मूल्यांकन करने पर विचार कर सकता है।

abstract boolean pushFile (File localFile, String deviceFilePath)

किसी फ़ाइल को डिवाइस पर पुश करें.

abstract boolean pushString (String contents, String deviceFilePath)

एक स्ट्रिंग से डिवाइस पर बनाई गई पुश फ़ाइल

abstract void reboot ()

डिवाइस को एडीबी मोड में रीबूट करता है।

abstract void reboot (String reason)

रिबूट के दौरान दिए गए reason के साथ डिवाइस को एडीबी मोड में रिबूट करता है।

abstract void rebootIntoBootloader ()

डिवाइस को बूटलोडर मोड में रीबूट करता है।

abstract void rebootIntoFastbootd ()

डिवाइस को फास्टबूट मोड में रीबूट करता है।

abstract void rebootIntoRecovery ()

डिवाइस को एडीबी रिकवरी मोड में रीबूट करता है।

abstract void rebootIntoSideload (boolean autoReboot)

डिवाइस को एडीबी साइडलोड मोड में रीबूट करता है (ध्यान दें कि यह रिकवरी के तहत एक विशेष मोड है)

डिवाइस साइडलोड मोड में प्रवेश करने तक ब्लॉक रहता है

abstract void rebootIntoSideload ()

डिवाइस को एडीबी साइडलोड मोड में रीबूट करता है (ध्यान दें कि यह रिकवरी के तहत एक विशेष मोड है)

डिवाइस साइडलोड मोड में प्रवेश करने तक ब्लॉक रहता है

abstract void rebootUntilOnline ()

reboot() का एक विकल्प जो केवल तब तक ब्लॉक करता है जब तक कि डिवाइस ऑनलाइन न हो यानी एडीबी को दिखाई न दे।

abstract void rebootUntilOnline (String reason)

reboot() का एक विकल्प जो केवल तब तक ब्लॉक करता है जब तक कि डिवाइस ऑनलाइन न हो यानी एडीबी को दिखाई न दे।

abstract void rebootUserspace ()

डिवाइस के केवल यूजरस्पेस भाग को रीबूट करता है।

abstract void rebootUserspaceUntilOnline ()

rebootUserspace() ()} का एक विकल्प जो केवल तब तक ब्लॉक करता है जब तक डिवाइस ऑनलाइन न हो यानी एडीबी को दिखाई न दे।

abstract void remountSystemReadOnly ()

डिवाइस पर सिस्टम विभाजन को केवल पढ़ने योग्य बनाएं।

abstract void remountSystemWritable ()

डिवाइस पर सिस्टम विभाजन को लिखने योग्य बनाएं।

abstract void remountVendorReadOnly ()

डिवाइस पर विक्रेता विभाजन को केवल पढ़ने के लिए बनाएं।

abstract void remountVendorWritable ()

डिवाइस पर विक्रेता विभाजन को लिखने योग्य बनाएं।

abstract boolean runInstrumentationTests (IRemoteAndroidTestRunner runner, ITestLifeCycleReceiver... listeners)

पैरामीटर के रूप में पारित एक या अधिक श्रोताओं के साथ ERROR(/#runInstrumentationTests(com.android.ddmlib.testrunner.IRemoteAndroidTestRunner,Collection)) निष्पादित करने की सुविधाजनक विधि।

abstract boolean runInstrumentationTests (IRemoteAndroidTestRunner runner, listeners) runInstrumentationTests (IRemoteAndroidTestRunner runner, listeners)

इंस्ट्रुमेंटेशन परीक्षण चलाता है, और डिवाइस पुनर्प्राप्ति प्रदान करता है।

abstract boolean runInstrumentationTestsAsUser (IRemoteAndroidTestRunner runner, int userId, listeners) runInstrumentationTestsAsUser (IRemoteAndroidTestRunner runner, int userId, listeners)

ERROR(ITestDevice#runInstrumentationTests(IRemoteAndroidTestRunner, Collection)/com.android.tradefed.device.ITestDevice#runInstrumentationTests(com.android.ddmlib.testrunner.IRemoteAndroidTestRunner,Collection) ITestDevice#runInstrumentationTests(IRemoteAndroidTestRunner, Collection)) लेकिन परीक्षण चलाता है दिए गए उपयोगकर्ता के लिए.

abstract boolean runInstrumentationTestsAsUser (IRemoteAndroidTestRunner runner, int userId, ITestLifeCycleReceiver... listeners)

ITestDevice#runInstrumentationTests(IRemoteAndroidTestRunner, ITestLifeCycleReceiver...) के समान, लेकिन किसी दिए गए उपयोगकर्ता के लिए परीक्षण चलाता है।

abstract void setDate (Date date)

डिवाइस पर दिनांक सेट करता है

नोट: डिवाइस पर दिनांक सेट करने के लिए रूट की आवश्यकता होती है

abstract void setOptions ( TestDeviceOptions options)

डिवाइस के लिए TestDeviceOptions सेट करें

abstract boolean setProperty (String propKey, String propValue)

डिवाइस पर दिए गए प्रॉपर्टी मान को सेट करता है।

abstract void setRecovery ( IDeviceRecovery recovery)

इस डिवाइस के लिए उपयोग करने के लिए IDeviceRecovery सेट करें।

abstract void setRecoveryMode ( ITestDevice.RecoveryMode mode)

डिवाइस के लिए उपयोग करने के लिए वर्तमान पुनर्प्राप्ति मोड सेट करें।

abstract void setUseFastbootErase (boolean useFastbootErase)

सेट करें कि डिवाइस पर किसी पार्टीशन को वाइप करने के लिए फास्टबूट इरेज़ या फास्टबूट फॉर्मेट का उपयोग करना है या नहीं।

abstract void startLogcat ()

पृष्ठभूमि में डिवाइस से लॉगकैट आउटपुट कैप्चर करना प्रारंभ करें।

abstract void stopEmulatorOutput ()

एम्यूलेटर आउटपुट को बंद करें और हटाएं।

abstract void stopLogcat ()

डिवाइस से लॉगकैट आउटपुट कैप्चर करना बंद करें, और वर्तमान में सहेजे गए लॉगकैट डेटा को हटा दें।

abstract String switchToAdbTcp ()

डिवाइस को एडीबी-ओवर-टीसीपी मोड पर स्विच करें।

abstract boolean switchToAdbUsb ()

डिवाइस को यूएसबी मोड के बजाय एडीबी पर स्विच करें।

abstract boolean syncFiles (File localFileDir, String deviceFilePath)

स्थानीय फ़ाइल निर्देशिका की सामग्री को डिवाइस के साथ क्रमिक रूप से समन्वयित करता है।

abstract boolean unlockDevice ()

यदि डिवाइस एन्क्रिप्टेड स्थिति में है तो डिवाइस को अनलॉक कर देता है।

abstract boolean waitForBootComplete (long timeOut)

डिवाइस का बूट पूर्ण फ़्लैग सेट होने तक ब्लॉक रहता है।

abstract boolean waitForDeviceAvailable ()

डिवाइस के प्रतिक्रियाशील होने और परीक्षण के लिए उपलब्ध होने की प्रतीक्षा करता है।

abstract boolean waitForDeviceAvailable (long waitTime)

डिवाइस के प्रतिक्रियाशील होने और परीक्षण के लिए उपलब्ध होने की प्रतीक्षा करता है।

abstract boolean waitForDeviceAvailableInRecoverPath (long waitTime)

पुनर्प्राप्ति पथ पर विचार किए बिना डिवाइस के प्रतिक्रियाशील और उपलब्ध होने की प्रतीक्षा करता है।

abstract void waitForDeviceBootloader ()

फास्टबूट के माध्यम से डिवाइस दिखाई देने तक ब्लॉक रहता है।

abstract boolean waitForDeviceInRecovery (long waitTime)

डिवाइस के 'एडीबी रिकवरी' स्थिति में होने के लिए ब्लॉक (ध्यान दें कि यह IDeviceRecovery से अलग है)।

abstract boolean waitForDeviceInSideload (long waitTime)

डिवाइस को 'एडीबी साइडलोड' स्थिति में रखने के लिए ब्लॉक

abstract boolean waitForDeviceNotAvailable (long waitTime)

डिवाइस के लिए ब्लॉक उपलब्ध नहीं होना यानी एडीबी से गायब होना

abstract void waitForDeviceOnline ()

जब तक डिवाइस एडीबी के माध्यम से दिखाई न दे तब तक ब्लॉक रहता है।

abstract void waitForDeviceOnline (long waitTime)

जब तक डिवाइस एडीबी के माध्यम से दिखाई न दे तब तक ब्लॉक रहता है।

abstract boolean waitForDeviceShell (long waitTime)

डिवाइस के मूल एडीबी शेल कमांड के प्रति प्रतिक्रियाशील होने की प्रतीक्षा करता है।

स्थिरांक

अज्ञात_एपीआई_स्तर

public static final int UNKNOWN_API_LEVEL

जब एपीआई स्तर का पता नहीं लगाया जा सकता तो डिफ़ॉल्ट मान

स्थिर मान: -1 (0xffffffff)

सार्वजनिक तरीके

ApiLevelAgainstNextRelease को चेक करें

public abstract boolean checkApiLevelAgainstNextRelease (int strictMinLevel)

न्यूनतम समर्थित स्तर पर जांचें कि कोई सुविधा वर्तमान में समर्थित है या नहीं। एपीआई स्तर बढ़ाए जाने से पहले, यह विधि अभी तक अप्रकाशित सुविधाओं को ध्यान में रखती है।

पैरामीटर
strictMinLevel int : सख्त न्यूनतम संभव स्तर जो सुविधा का समर्थन करता है।

रिटर्न
boolean यदि स्तर समर्थित है तो सत्य है। अन्यथा मिथ्या।

फेंकता
com.android.tradefed.device.DeviceNotAvailableException
DeviceNotAvailableException

क्लियरलॉगकैट

public abstract void clearLogcat ()

किसी भी संचित लॉगकैट डेटा को हटा देता है।

यह उन मामलों के लिए उपयोगी है जब आप यह सुनिश्चित करना चाहते हैं कि ITestDevice#getLogcat() केवल एक निश्चित बिंदु के बाद उत्पन्न लॉग डेटा लौटाता है (जैसे कि एक नए डिवाइस बिल्ड को फ्लैश करने के बाद, आदि)।

फ़ाइल नष्ट करें

public abstract void deleteFile (String deviceFilePath)

डिवाइस पर किसी फ़ाइल या निर्देशिका को हटाने के लिए सहायक विधि।

पैरामीटर
deviceFilePath String : डिवाइस पर फ़ाइल का पूर्ण पथ।

फेंकता
com.android.tradefed.device.DeviceNotAvailableException
DeviceNotAvailableException

डिवाइससॉफ्टरीस्टार्ट

public abstract boolean deviceSoftRestarted (ProcessInfo prevSystemServerProcess)

वर्तमान system_server की पिछले system_server ProcessInfo से तुलना करके यह जांचने के लिए सहायक विधि कि डिवाइस सॉफ्ट-रीस्टार्ट हुआ है या नहीं। ProcessInfo प्राप्त करने के लिए getProcessByName(String) का उपयोग करें।

पैरामीटर
prevSystemServerProcess ProcessInfo : पिछली सिस्टम_सर्वर प्रक्रिया ProcessInfo

रिटर्न
boolean यदि डिवाइस सॉफ़्ट-रीस्टार्ट हुआ तो true

फेंकता
RuntimeException यदि डिवाइस में असामान्य बूट कारण है
com.android.tradefed.device.DeviceNotAvailableException
DeviceNotAvailableException

डिवाइससॉफ्टRestartedSince

public abstract boolean deviceSoftRestartedSince (long utcEpochTime, 
                TimeUnit timeUnit)

यह जांचने के लिए सहायक विधि कि डिवाइस और उसके ERROR(/TimeUnit) से यूटीसी समय के बाद से डिवाइस सॉफ्ट-रीस्टार्ट हुआ है या नहीं। सॉफ्ट-रीस्टार्ट से तात्पर्य डिवाइस के हार्ड रीबूट के बाहर सिस्टम_सर्वर को रीस्टार्ट करने से है (उदाहरण के लिए: रिबूट का अनुरोध किया गया)। milliseccond में वर्तमान डिवाइस utcEpochTime को getDeviceDate() विधि द्वारा प्राप्त किया जा सकता है।

पैरामीटर
utcEpochTime long : युग के बाद से दूसरे में डिवाइस का समय।

timeUnit TimeUnit : दिए गए utcEpochTime के लिए समय इकाई TimeUnit

रिटर्न
boolean यदि डिवाइस सॉफ़्ट-रीस्टार्ट हुआ तो true

फेंकता
RuntimeException यदि डिवाइस में असामान्य बूट कारण है
com.android.tradefed.device.DeviceNotAvailableException
DeviceNotAvailableException

AdbRoot को अक्षम करें

public abstract boolean disableAdbRoot ()

एडीबी रूट को बंद कर देता है।

एडीबी रूट को अक्षम करने से डिवाइस एडीबी से डिस्कनेक्ट हो सकता है। डिवाइस उपलब्ध होने तक यह विधि ब्लॉक रहेगी.

रिटर्न
boolean यदि सफल हो तो true

फेंकता
DeviceNotAvailableException यदि डिवाइस से कनेक्शन टूट गया है और उसे पुनर्प्राप्त नहीं किया जा सकता है।

फ़ाइल अस्तित्व में है

public abstract boolean doesFileExist (String deviceFilePath)

डिवाइस पर फ़ाइल मौजूद है या नहीं यह निर्धारित करने के लिए सहायक विधि।

पैरामीटर
deviceFilePath String : जांचने के लिए डिवाइस पर फ़ाइल का पूर्ण पथ

रिटर्न
boolean यदि फ़ाइल मौजूद है तो true , अन्यथा false

फेंकता
DeviceNotAvailableException यदि डिवाइस से कनेक्शन टूट गया है और उसे पुनर्प्राप्त नहीं किया जा सकता है।

EnableAdbRoot

public abstract boolean enableAdbRoot ()

एडीबी रूट चालू करता है। यदि "सक्षम-रूट" सेटिंग "गलत" है, तो एक संदेश लॉग हो जाएगा और रूट सक्षम किए बिना वापस आ जाएगा।

एडीबी रूट को सक्षम करने से डिवाइस एडीबी से डिस्कनेक्ट हो सकता है। डिवाइस उपलब्ध होने तक यह विधि ब्लॉक रहेगी.

रिटर्न
boolean यदि सफल हो तो true

फेंकता
DeviceNotAvailableException यदि डिवाइस से कनेक्शन टूट गया है और उसे पुनर्प्राप्त नहीं किया जा सकता है।

निष्पादितएडीबीकमांड

public abstract String executeAdbCommand (long timeout, 
                String... commandArgs)

हेल्पर विधि जो एक एडीबी कमांड को एक निर्दिष्ट टाइमआउट के साथ सिस्टम कमांड के रूप में निष्पादित करती है।

जहां भी संभव हो, executeShellCommand(String) उपयोग किया जाना चाहिए, क्योंकि यह विधि बेहतर विफलता का पता लगाने और प्रदर्शन प्रदान करती है।

पैरामीटर
timeout long : डिवाइस से पहले मिलीसेकंड में समय को अनुत्तरदायी माना जाता है, बिना किसी टाइमआउट के 0L

commandArgs String : एडीबी कमांड और चलाने के लिए तर्क

रिटर्न
String कमांड से स्टडआउट। यदि आदेश निष्पादित करने में विफल रहा तो null

फेंकता
DeviceNotAvailableException यदि डिवाइस से कनेक्शन टूट गया है और उसे पुनर्प्राप्त नहीं किया जा सकता है।

निष्पादितएडीबीकमांड

public abstract String executeAdbCommand (String... commandArgs)

हेल्पर विधि जो एडीबी कमांड को सिस्टम कमांड के रूप में निष्पादित करती है।

जहां भी संभव हो, executeShellCommand(String) उपयोग किया जाना चाहिए, क्योंकि यह विधि बेहतर विफलता का पता लगाने और प्रदर्शन प्रदान करती है।

पैरामीटर
commandArgs String : एडीबी कमांड और चलाने के लिए तर्क

रिटर्न
String कमांड से स्टडआउट। यदि आदेश निष्पादित करने में विफल रहा तो null

फेंकता
DeviceNotAvailableException यदि डिवाइस से कनेक्शन टूट गया है और उसे पुनर्प्राप्त नहीं किया जा सकता है।

निष्पादितएडीबीकमांड

public abstract String executeAdbCommand (long timeout, 
                 envMap, 
                String... commandArgs)

हेल्पर विधि जो एक एडीबी कमांड को एक निर्दिष्ट टाइमआउट के साथ सिस्टम कमांड के रूप में निष्पादित करती है।

जहां भी संभव हो, executeShellCommand(String) उपयोग किया जाना चाहिए, क्योंकि यह विधि बेहतर विफलता का पता लगाने और प्रदर्शन प्रदान करती है।

पैरामीटर
timeout long : डिवाइस से पहले मिलीसेकंड में समय को अनुत्तरदायी माना जाता है, बिना किसी टाइमआउट के 0L

envMap : कमांड के लिए सेट किया जाने वाला वातावरण

commandArgs String : एडीबी कमांड और चलाने के लिए तर्क

रिटर्न
String कमांड से स्टडआउट। यदि आदेश निष्पादित करने में विफल रहा तो null

फेंकता
DeviceNotAvailableException यदि डिवाइस से कनेक्शन टूट गया है और उसे पुनर्प्राप्त नहीं किया जा सकता है।

एक्ज़ीक्यूटफ़ास्टबूटकमांड

public abstract CommandResult executeFastbootCommand (long timeout, 
                String... commandArgs)

हेल्पर विधि जो फास्टबूट कमांड को सिस्टम कमांड के रूप में निष्पादित करती है।

जब डिवाइस पहले से ही फास्टबूट मोड में हो तो इसका उपयोग किए जाने की उम्मीद है।

पैरामीटर
timeout long : कमांड समाप्त होने से पहले मिलीसेकंड में समय

commandArgs String : फास्टबूट कमांड और चलाने के लिए तर्क

रिटर्न
CommandResult CommandResult में कमांड का आउटपुट शामिल है

फेंकता
DeviceNotAvailableException यदि डिवाइस से कनेक्शन टूट गया है और उसे पुनर्प्राप्त नहीं किया जा सकता है।

एक्ज़ीक्यूटफ़ास्टबूटकमांड

public abstract CommandResult executeFastbootCommand (String... commandArgs)

हेल्पर विधि जो फास्टबूट कमांड को 2 मिनट के डिफ़ॉल्ट टाइमआउट के साथ सिस्टम कमांड के रूप में निष्पादित करती है।

जब डिवाइस पहले से ही फास्टबूट मोड में हो तो इसका उपयोग किए जाने की उम्मीद है।

पैरामीटर
commandArgs String : फास्टबूट कमांड और चलाने के लिए तर्क

रिटर्न
CommandResult CommandResult में कमांड का आउटपुट शामिल है

फेंकता
DeviceNotAvailableException यदि डिवाइस से कनेक्शन टूट गया है और उसे पुनर्प्राप्त नहीं किया जा सकता है।

निष्पादितLongFastbootCommand

public abstract CommandResult executeLongFastbootCommand (String... commandArgs)

हेल्पर विधि जो लंबे समय तक चलने वाले फास्टबूट कमांड को सिस्टम कमांड के रूप में निष्पादित करती है।

executeFastbootCommand(String) के समान, लंबे टाइमआउट का उपयोग करने के अलावा।

पैरामीटर
commandArgs String : फास्टबूट कमांड और चलाने के लिए तर्क

रिटर्न
CommandResult CommandResult में कमांड का आउटपुट शामिल है

फेंकता
DeviceNotAvailableException यदि डिवाइस से कनेक्शन टूट गया है और उसे पुनर्प्राप्त नहीं किया जा सकता है।

निष्पादितLongFastbootCommand

public abstract CommandResult executeLongFastbootCommand ( envVarMap, 
                String... commandArgs)

हेल्पर विधि जो सिस्टम वातावरण चर के साथ सिस्टम कमांड के रूप में लंबे समय तक चलने वाले फास्टबूट कमांड को निष्पादित करती है।

executeFastbootCommand(String) के समान, लंबे टाइमआउट का उपयोग करने के अलावा।

पैरामीटर
envVarMap : सिस्टम वातावरण चर जिसके साथ फास्टबूट कमांड चलता है

commandArgs String : फास्टबूट कमांड और चलाने के लिए तर्क

रिटर्न
CommandResult CommandResult में कमांड का आउटपुट शामिल है

फेंकता
DeviceNotAvailableException यदि डिवाइस से कनेक्शन टूट गया है और उसे पुनर्प्राप्त नहीं किया जा सकता है।

एक्जीक्यूटशेलकमांड

public abstract String executeShellCommand (String command)

हेल्पर विधि जो एडीबी शेल कमांड निष्पादित करती है और String के रूप में आउटपुट लौटाती है।

पैरामीटर
command String : एडीबी शेल कमांड चलाने के लिए

रिटर्न
String शेल आउटपुट

फेंकता
DeviceNotAvailableException यदि डिवाइस से कनेक्शन टूट गया है और उसे पुनर्प्राप्त नहीं किया जा सकता है।

एक्जीक्यूटशेलकमांड

public abstract void executeShellCommand (String command, 
                IShellOutputReceiver receiver, 
                long maxTimeToOutputShellResponse, 
                TimeUnit timeUnit, 
                int retryAttempts)

कमांड व्यवहार को नियंत्रित करने के लिए अधिक मापदंडों के साथ एक एडीबी शेल कमांड निष्पादित करता है।

पैरामीटर
command String : एडीबी शेल कमांड चलाने के लिए

receiver IShellOutputReceiver : शेल आउटपुट को निर्देशित करने के लिए IShellOutputReceiver

maxTimeToOutputShellResponse long : अधिकतम समय अवधि जिसके दौरान कमांड को कोई प्रतिक्रिया नहीं देने की अनुमति होती है; timeUnit में निर्दिष्ट इकाई

timeUnit TimeUnit : maxTimeToOutputShellResponse के लिए इकाई

retryAttempts int : किसी अपवाद के कारण विफल होने पर कमांड को पुनः प्रयास करने की अधिकतम संख्या। यदि retryAttempts सफलता के बिना किया जाता है तो डिवाइस नॉट रेस्पॉन्सिव अपवाद फेंक दिया जाएगा।

फेंकता
DeviceNotAvailableException यदि डिवाइस से कनेक्शन टूट गया है और उसे पुनर्प्राप्त नहीं किया जा सकता है।

एक्जीक्यूटशेलकमांड

public abstract void executeShellCommand (String command, 
                IShellOutputReceiver receiver, 
                long maxTimeoutForCommand, 
                long maxTimeToOutputShellResponse, 
                TimeUnit timeUnit, 
                int retryAttempts)

कमांड व्यवहार को नियंत्रित करने के लिए अधिक मापदंडों के साथ एक एडीबी शेल कमांड निष्पादित करता है।

पैरामीटर
command String : एडीबी शेल कमांड चलाने के लिए

receiver IShellOutputReceiver : शेल आउटपुट को निर्देशित करने के लिए IShellOutputReceiver

maxTimeoutForCommand long : आदेश को पूरा करने के लिए अधिकतम समयबाह्य; timeUnit में निर्दिष्ट इकाई

maxTimeToOutputShellResponse long : अधिकतम समय अवधि जिसके दौरान कमांड को कोई प्रतिक्रिया नहीं देने की अनुमति होती है; timeUnit में निर्दिष्ट इकाई

timeUnit TimeUnit : maxTimeToOutputShellResponse के लिए इकाई

retryAttempts int : किसी अपवाद के कारण विफल होने पर कमांड को पुनः प्रयास करने की अधिकतम संख्या। यदि retryAttempts सफलता के बिना किया जाता है तो डिवाइस नॉट रेस्पॉन्सिव अपवाद फेंक दिया जाएगा।

फेंकता
DeviceNotAvailableException यदि डिवाइस से कनेक्शन टूट गया है और उसे पुनर्प्राप्त नहीं किया जा सकता है।

एक्जीक्यूटशेलकमांड

public abstract void executeShellCommand (String command, 
                IShellOutputReceiver receiver)

दिए गए एडीबी शेल कमांड को निष्पादित करता है, यदि कमांड विफल हो जाता है तो कई बार पुन: प्रयास करता है।

डिफ़ॉल्ट मानों के साथ executeShellCommand(String, com.android.ddmlib.IShellOutputReceiver, long, TimeUnit, int) का एक सरल रूप।

पैरामीटर
command String : एडीबी शेल कमांड चलाने के लिए

receiver IShellOutputReceiver : शेल आउटपुट को निर्देशित करने के लिए IShellOutputReceiver

फेंकता
DeviceNotAvailableException यदि डिवाइस से कनेक्शन टूट गया है और उसे पुनर्प्राप्त नहीं किया जा सकता है।

एक्जीक्यूटशेलV2कमांड

public abstract CommandResult executeShellV2Command (String command)

हेल्पर विधि जो एडीबी शेल कमांड को निष्पादित करती है और कमांड स्टेटस आउटपुट, स्टडआउट और स्टडर के साथ उचित रूप से पॉप्युलेट किए गए CommandResult के रूप में परिणाम लौटाती है।

पैरामीटर
command String : वह कमांड जो चलाया जाना चाहिए.

रिटर्न
CommandResult CommandResult में परिणाम।

फेंकता
DeviceNotAvailableException यदि डिवाइस से कनेक्शन टूट गया है और उसे पुनर्प्राप्त नहीं किया जा सकता है।

एक्जीक्यूटशेलV2कमांड

public abstract CommandResult executeShellV2Command (String command, 
                OutputStream pipeToOutput)

हेल्पर विधि जो एडीबी शेल कमांड को निष्पादित करती है और कमांड स्थिति आउटपुट और stderr के साथ उचित रूप से पॉप्युलेट किए गए CommandResult के रूप में परिणाम लौटाती है। stdout को निर्दिष्ट स्ट्रीम पर निर्देशित किया जाता है।

पैरामीटर
command String : वह कमांड जो चलाया जाना चाहिए.

pipeToOutput OutputStream : ERROR(/OutputStream) जहां एसटीडी आउटपुट रीडायरेक्ट किया जाएगा, या शून्य।

रिटर्न
CommandResult CommandResult में परिणाम।

फेंकता
DeviceNotAvailableException यदि डिवाइस से कनेक्शन टूट गया है और उसे पुनर्प्राप्त नहीं किया जा सकता है।

एक्जीक्यूटशेलV2कमांड

public abstract CommandResult executeShellV2Command (String command, 
                File pipeAsInput)

हेल्पर विधि जो एडीबी शेल कमांड को निष्पादित करती है और कमांड स्टेटस आउटपुट, स्टडआउट और स्टडर के साथ उचित रूप से पॉप्युलेट किए गए CommandResult के रूप में परिणाम लौटाती है।

पैरामीटर
command String : वह कमांड जो चलाया जाना चाहिए.

pipeAsInput File : एक ERROR(/File) जिसे कमांड में इनपुट के रूप में पाइप किया जाएगा, या शून्य।

रिटर्न
CommandResult CommandResult में परिणाम।

फेंकता
DeviceNotAvailableException यदि डिवाइस से कनेक्शन टूट गया है और उसे पुनर्प्राप्त नहीं किया जा सकता है।

एक्जीक्यूटशेलV2कमांड

public abstract CommandResult executeShellV2Command (String command, 
                long maxTimeoutForCommand, 
                TimeUnit timeUnit, 
                int retryAttempts)

कमांड व्यवहार को नियंत्रित करने के लिए अधिक मापदंडों के साथ एक एडीबी शेल कमांड निष्पादित करता है।

पैरामीटर
command String : एडीबी शेल कमांड चलाने के लिए

maxTimeoutForCommand long : आदेश को पूरा करने के लिए अधिकतम समयबाह्य; timeUnit में निर्दिष्ट इकाई

timeUnit TimeUnit : maxTimeToOutputShellResponse के लिए इकाई

retryAttempts int : किसी अपवाद के कारण विफल होने पर कमांड को पुनः प्रयास करने की अधिकतम संख्या। यदि retryAttempts सफलता के बिना किया जाता है तो डिवाइस नॉट रेस्पॉन्सिव अपवाद फेंक दिया जाएगा।

रिटर्न
CommandResult

फेंकता
DeviceNotAvailableException यदि डिवाइस से कनेक्शन टूट गया है और उसे पुनर्प्राप्त नहीं किया जा सकता है।

यह सभी देखें:

एक्जीक्यूटशेलV2कमांड

public abstract CommandResult executeShellV2Command (String command, 
                long maxTimeoutForCommand, 
                TimeUnit timeUnit)

कमांड व्यवहार को नियंत्रित करने के लिए अधिक मापदंडों के साथ एक एडीबी शेल कमांड निष्पादित करता है।

पैरामीटर
command String : एडीबी शेल कमांड चलाने के लिए

maxTimeoutForCommand long : आदेश को पूरा करने के लिए अधिकतम समयबाह्य; timeUnit में निर्दिष्ट इकाई

timeUnit TimeUnit : maxTimeToOutputShellResponse के लिए इकाई

रिटर्न
CommandResult

फेंकता
DeviceNotAvailableException यदि डिवाइस से कनेक्शन टूट गया है और उसे पुनर्प्राप्त नहीं किया जा सकता है।

यह सभी देखें:

एक्जीक्यूटशेलV2कमांड

public abstract CommandResult executeShellV2Command (String command, 
                File pipeAsInput, 
                OutputStream pipeToOutput, 
                long maxTimeoutForCommand, 
                TimeUnit timeUnit, 
                int retryAttempts)

कमांड व्यवहार को नियंत्रित करने के लिए अधिक मापदंडों के साथ एक एडीबी शेल कमांड निष्पादित करता है।

पैरामीटर
command String : एडीबी शेल कमांड चलाने के लिए

pipeAsInput File : एक ERROR(/File) जिसे कमांड में इनपुट के रूप में पाइप किया जाएगा, या शून्य।

pipeToOutput OutputStream : ERROR(/OutputStream) जहां एसटीडी आउटपुट रीडायरेक्ट किया जाएगा, या शून्य।

maxTimeoutForCommand long : आदेश को पूरा करने के लिए अधिकतम समयबाह्य; timeUnit में निर्दिष्ट इकाई

timeUnit TimeUnit : maxTimeToOutputShellResponse के लिए इकाई

retryAttempts int : किसी अपवाद के कारण विफल होने पर कमांड को पुनः प्रयास करने की अधिकतम संख्या। यदि retryAttempts सफलता के बिना किया जाता है तो डिवाइस नॉट रेस्पॉन्सिव अपवाद फेंक दिया जाएगा।

रिटर्न
CommandResult

फेंकता
DeviceNotAvailableException यदि डिवाइस से कनेक्शन टूट गया है और उसे पुनर्प्राप्त नहीं किया जा सकता है।

यह सभी देखें:

एक्जीक्यूटशेलV2कमांड

public abstract CommandResult executeShellV2Command (String command, 
                File pipeAsInput, 
                OutputStream pipeToOutput, 
                OutputStream pipeToError, 
                long maxTimeoutForCommand, 
                TimeUnit timeUnit, 
                int retryAttempts)

कमांड व्यवहार को नियंत्रित करने के लिए अधिक मापदंडों के साथ एक एडीबी शेल कमांड निष्पादित करता है।

पैरामीटर
command String : एडीबी शेल कमांड चलाने के लिए

pipeAsInput File : एक ERROR(/File) जिसे कमांड में इनपुट के रूप में पाइप किया जाएगा, या शून्य।

pipeToOutput OutputStream : ERROR(/OutputStream) जहां एसटीडी आउटपुट रीडायरेक्ट किया जाएगा, या शून्य।

pipeToError OutputStream : ERROR(/OutputStream) जहां एसटीडी त्रुटि पुनर्निर्देशित की जाएगी, या शून्य।

maxTimeoutForCommand long : आदेश को पूरा करने के लिए अधिकतम समयबाह्य; timeUnit में निर्दिष्ट इकाई

timeUnit TimeUnit : maxTimeToOutputShellResponse के लिए इकाई

retryAttempts int : किसी अपवाद के कारण विफल होने पर कमांड को पुनः प्रयास करने की अधिकतम संख्या। यदि retryAttempts सफलता के बिना किया जाता है तो डिवाइस नॉट रेस्पॉन्सिव अपवाद फेंक दिया जाएगा।

रिटर्न
CommandResult

फेंकता
DeviceNotAvailableException यदि डिवाइस से कनेक्शन टूट गया है और उसे पुनर्प्राप्त नहीं किया जा सकता है।

यह सभी देखें:

fastbootWipePartition

public abstract CommandResult fastbootWipePartition (String partition)

सहायक विधि जो डिवाइस के लिए एक विभाजन को मिटा देती है।

यदि getUseFastbootErase() true है, तो विभाजन को मिटाने के लिए फास्टबूट इरेज़ का उपयोग किया जाएगा। अगली बार डिवाइस बूट होने पर डिवाइस को एक फ़ाइल सिस्टम बनाना होगा। अन्यथा, फास्टबूट प्रारूप का उपयोग किया जाता है जो डिवाइस पर एक नया फाइल सिस्टम बनाएगा।

जब डिवाइस पहले से ही फास्टबूट मोड में हो तो इसका उपयोग किए जाने की उम्मीद है।

पैरामीटर
partition String : पोंछने के लिए विभाजन

रिटर्न
CommandResult CommandResult में कमांड का आउटपुट शामिल है

फेंकता
DeviceNotAvailableException यदि डिवाइस से कनेक्शन टूट गया है और उसे पुनर्प्राप्त नहीं किया जा सकता है।

एपीलेवल प्राप्त करें

public abstract int getApiLevel ()

डिवाइस एपीआई स्तर प्राप्त करें। डिफ़ॉल्ट UNKNOWN_API_LEVEL पर।

रिटर्न
int डिवाइस के एपीआई स्तर को दर्शाने वाला एक पूर्णांक

फेंकता
com.android.tradefed.device.DeviceNotAvailableException
DeviceNotAvailableException

getBasebandVersion

public abstract String getBasebandVersion ()

इस उपकरण का बेसबैंड (रेडियो) संस्करण प्राप्त करने की सुविधा विधि। रेडियो संस्करण प्राप्त करना डिवाइस विशिष्ट है, इसलिए यह सभी डिवाइसों के लिए सही जानकारी नहीं लौटा सकता है। यह विधि सही संस्करण जानकारी वापस करने के लिए gsm.version.baseband प्रॉपर्टी पर निर्भर करती है। यह कुछ सीडीएमए उपकरणों के लिए सटीक नहीं है और यहां लौटाया गया संस्करण फास्टबूट से रिपोर्ट किए गए संस्करण से मेल नहीं खा सकता है और सीडीएमए रेडियो के लिए संस्करण वापस नहीं कर सकता है। टीएल;डीआर यह विधि केवल सटीक संस्करण की रिपोर्ट करती है यदि gsm.version.baseband संपत्ति fastboot getvar version-baseband द्वारा लौटाए गए संस्करण के समान है।

रिटर्न
String String बेसबैंड संस्करण या null यदि इसे निर्धारित नहीं किया जा सकता है (डिवाइस में कोई रेडियो नहीं है या संस्करण स्ट्रिंग को पढ़ा नहीं जा सकता है)

फेंकता
DeviceNotAvailableException यदि डिवाइस से कनेक्शन टूट गया है और उसे पुनर्प्राप्त नहीं किया जा सकता है।

बैटरी प्राप्त करें

public abstract Integer getBattery ()

डिवाइस का वर्तमान बैटरी स्तर लौटाता है या बैटरी स्तर अनुपलब्ध होने पर शून्य लौटाता है।

रिटर्न
Integer

बूलियनप्रॉपर्टी प्राप्त करें

public abstract boolean getBooleanProperty (String name, 
                boolean defaultValue)

दी गई संपत्ति का बूलियन मान लौटाता है।

पैरामीटर
name String : संपत्ति का नाम

defaultValue boolean : यदि संपत्ति खाली है या मौजूद नहीं है तो लौटाने के लिए डिफ़ॉल्ट मान।

रिटर्न
boolean यदि संपत्ति का मान "1" , "y" , "yes" , "on" , या "true" है तो false , यदि संपत्ति का मान "0" , "n" , "no" , "off" true"false" , या defaultValue अन्यथा।

फेंकता
DeviceNotAvailableException

getBootHistory

public abstract  getBootHistory ()

हेल्पर विधि बूट समय और बूट कारण के साथ बूट इतिहास मानचित्र एकत्र करती है।

रिटर्न
बूट समय का मानचित्र (युग के बाद से दूसरे में यूटीसी समय) और बूट कारण

फेंकता
DeviceNotAvailableException

getBootHistorySince

public abstract  getBootHistorySince (long utcEpochTime, 
                TimeUnit timeUnit)

हेल्पर विधि डिवाइस से युग के बाद से दिए गए समय और निर्दिष्ट समय इकाई के बाद से बूट इतिहास मानचित्र को बूट समय और बूट कारण के साथ एकत्र करती है। मिलिसेकंड में वर्तमान डिवाइस utcEpochTime को getDeviceDate() विधि द्वारा प्राप्त किया जा सकता है।

पैरामीटर
utcEpochTime long : युग के बाद से डिवाइस का समय।

timeUnit TimeUnit : समय इकाई TimeUnit

रिटर्न
बूट समय का मानचित्र (युग के बाद से दूसरे में यूटीसी समय) और बूट कारण

फेंकता
DeviceNotAvailableException

बूटलोडर संस्करण प्राप्त करें

public abstract String getBootloaderVersion ()

इस डिवाइस का बूटलोडर संस्करण प्राप्त करने की सुविधा विधि।

डिवाइस की वर्तमान स्थिति से बूटलोडर संस्करण को पुनः प्राप्त करने का प्रयास किया जाएगा। (यानी यदि डिवाइस फास्टबूट मोड में है, तो यह फास्टबूट से संस्करण पुनर्प्राप्त करने का प्रयास करेगा)

रिटर्न
String String बूटलोडर संस्करण या null यदि यह नहीं पाया जा सकता है

फेंकता
DeviceNotAvailableException यदि डिवाइस से कनेक्शन टूट गया है और उसे पुनर्प्राप्त नहीं किया जा सकता है।

getBuildAlias

public abstract String getBuildAlias ()

उस बिल्ड का उपनाम पुनः प्राप्त करें जो डिवाइस वर्तमान में चल रहा है।

बिल्ड उपनाम आमतौर पर बिल्ड आईडी (आमतौर पर नेक्सस बिल्ड के लिए एक संख्या) की तुलना में अधिक पठनीय स्ट्रिंग है। उदाहरण के लिए, अंतिम Android 4.2 रिलीज़ में बिल्ड उपनाम JDQ39 और बिल्ड आईडी 573038 है

रिटर्न
String यदि इसे पुनर्प्राप्त नहीं किया जा सका तो बिल्ड उपनाम या बिल्ड आईडी पर वापस आ जाएं

फेंकता
com.android.tradefed.device.DeviceNotAvailableException
DeviceNotAvailableException

बिल्डबिल्डफ्लेवर प्राप्त करें

public abstract String getBuildFlavor ()

डिवाइस के लिए बिल्ड फ्लेवर पुनः प्राप्त करें।

रिटर्न
String यदि इसे पुनर्प्राप्त नहीं किया जा सका तो बिल्ड फ्लेवर या शून्य

फेंकता
com.android.tradefed.device.DeviceNotAvailableException
DeviceNotAvailableException

getBuildId

public abstract String getBuildId ()

डिवाइस द्वारा वर्तमान में चल रहे बिल्ड को पुनः प्राप्त करें।

रिटर्न
String यदि इसे पुनर्प्राप्त नहीं किया जा सका तो बिल्ड आईडी या IBuildInfo#UNKNOWN_BUILD_ID

फेंकता
com.android.tradefed.device.DeviceNotAvailableException
DeviceNotAvailableException

getBuildSigningKeys

public abstract String getBuildSigningKeys ()

डिवाइस छवि पर हस्ताक्षर करने के लिए उपयोग की जाने वाली कुंजी प्रकार लौटाता है

आमतौर पर एंड्रॉइड डिवाइस पर परीक्षण-कुंजी (जैसे एओएसपी में) या रिलीज़-कुंजी (व्यक्तिगत डिवाइस निर्माताओं द्वारा नियंत्रित) के साथ हस्ताक्षर किए जा सकते हैं।

रिटर्न
String यदि हस्ताक्षर कुंजी मिलती है, अन्यथा शून्य।

फेंकता
com.android.tradefed.device.DeviceNotAvailableException
DeviceNotAvailableException

getCachedDeviceDescriptor

public abstract DeviceDescriptor getCachedDeviceDescriptor ()

यदि डिवाइस आवंटित किया गया है तो कैश्ड DeviceDescriptor लौटाता है, अन्यथा वर्तमान DeviceDescriptor लौटाता है।

रिटर्न
DeviceDescriptor

getCachedDeviceDescriptor

public abstract DeviceDescriptor getCachedDeviceDescriptor (boolean shortDescriptor)

यदि डिवाइस आवंटित किया गया है तो कैश्ड DeviceDescriptor लौटाता है, अन्यथा वर्तमान DeviceDescriptor लौटाता है।

पैरामीटर
shortDescriptor boolean : डिस्क्रिप्टर को न्यूनतम जानकारी तक सीमित करना है या नहीं

रिटर्न
DeviceDescriptor

बच्चे प्राप्त करें

public abstract String[] getChildren (String deviceFilePath)

IFileEntry का उपयोग करने का विकल्प जो कभी-कभी अनुमतियों के कारण काम नहीं करेगा।

पैरामीटर
deviceFilePath String : डिवाइस पर वह पथ है जहां खोज करनी है

रिटर्न
String[] डिवाइस पर पथ की सभी फ़ाइलों वाली स्ट्रिंग की सारणी।

फेंकता
com.android.tradefed.device.DeviceNotAvailableException
DeviceNotAvailableException

कनेक्शन प्राप्त करें

public abstract AbstractConnection getConnection ()

डिवाइस से संबद्ध कनेक्शन लौटाता है.

रिटर्न
AbstractConnection

getDeviceClass

public abstract String getDeviceClass ()

डिवाइस क्लास प्राप्त करें.

रिटर्न
String String डिवाइस क्लास.

getDeviceDate

public abstract long getDeviceDate ()

युग के बाद से डिवाइस की तारीख मिलीसेकंड में लौटाएं।

रिटर्न
long युग प्रारूप में डिवाइस की तारीख।

फेंकता
com.android.tradefed.device.DeviceNotAvailableException
DeviceNotAvailableException

getDeviceDescriptor

public abstract DeviceDescriptor getDeviceDescriptor ()

वास्तविक डिवाइस ऑब्जेक्ट को पास किए बिना इसके बारे में जानकारी प्राप्त करने के लिए डिवाइस जानकारी से DeviceDescriptor लौटाएँ।

रिटर्न
DeviceDescriptor

getDeviceDescriptor

public abstract DeviceDescriptor getDeviceDescriptor (boolean shortDescriptor)

वास्तविक डिवाइस ऑब्जेक्ट को पास किए बिना इसके बारे में जानकारी प्राप्त करने के लिए डिवाइस जानकारी से DeviceDescriptor लौटाएँ।

पैरामीटर
shortDescriptor boolean : डिस्क्रिप्टर को न्यूनतम जानकारी तक सीमित करना है या नहीं

रिटर्न
DeviceDescriptor

getDeviceState

public abstract TestDeviceState getDeviceState ()

डिवाइस की स्थिति प्राप्त करें.

रिटर्न
TestDeviceState

getDeviceTimeOffset

public abstract long getDeviceTimeOffset (Date date)

डिवाइस और किसी दिए गए ERROR(/Date) के बीच समय का अंतर जानने में सहायक। युग समय का आंतरिक रूप से उपयोग करें।

पैरामीटर
date Date

रिटर्न
long मिलीसेकंड में अंतर

फेंकता
DeviceNotAvailableException

getEmulatorOutput

public abstract InputStreamSource getEmulatorOutput ()

एम्यूलेटर stdout और stderr की स्ट्रीम प्राप्त करें

रिटर्न
InputStreamSource एमुलेटर आउटपुट

गेटएक्सटर्नलस्टोरफ्रीस्पेस

public abstract long getExternalStoreFreeSpace ()

डिवाइस के बाह्य भंडारण पर खाली स्थान की मात्रा निर्धारित करने के लिए सहायक विधि।

रिटर्न
long KB में खाली स्थान की मात्रा

फेंकता
DeviceNotAvailableException यदि डिवाइस से कनेक्शन टूट गया है और उसे पुनर्प्राप्त नहीं किया जा सकता है।

GetFastbootProductType

public abstract String getFastbootProductType ()

फास्टबूट मोड में इस डिवाइस का उत्पाद प्रकार प्राप्त करने की सुविधा विधि।

इस विधि का उपयोग केवल तभी किया जाना चाहिए जब डिवाइस फास्टबूट में हो। इस मामले में यह सामान्य getProductType() विधि की तुलना में थोड़ा अधिक सुरक्षित संस्करण है, क्योंकि यदि डिवाइस गलत स्थिति में है या अनुत्तरदायी है तो ITestDevice डिवाइस को फास्टबूट में पुनर्प्राप्त करना जान लेगा।

रिटर्न
String यदि यह निर्धारित नहीं किया जा सकता है तो String उत्पाद प्रकार का नाम या null

फेंकता
DeviceNotAvailableException यदि डिवाइस से कनेक्शन टूट गया है और उसे पुनर्प्राप्त नहीं किया जा सकता है।

getFastbootProductVariant

public abstract String getFastbootProductVariant ()

फास्टबूट मोड में इस डिवाइस का उत्पाद प्रकार प्राप्त करने की सुविधा विधि।

इस विधि का उपयोग केवल तभी किया जाना चाहिए जब डिवाइस फास्टबूट में हो। इस मामले में यह सामान्य getProductType() विधि की तुलना में थोड़ा अधिक सुरक्षित संस्करण है, क्योंकि यदि डिवाइस गलत स्थिति में है या अनुत्तरदायी है तो ITestDevice डिवाइस को फास्टबूट में पुनर्प्राप्त करना जान लेगा।

रिटर्न
String यदि यह निर्धारित नहीं किया जा सकता है तो String उत्पाद प्रकार का नाम या null

फेंकता
DeviceNotAvailableException यदि डिवाइस से कनेक्शन टूट गया है और उसे पुनर्प्राप्त नहीं किया जा सकता है।

getFastbootSerialNumber

public abstract String getFastbootSerialNumber ()

फास्टबूट मोड सीरियल नंबर लौटाता है।

रिटर्न
String

getFastbootVariable

public abstract String getFastbootVariable (String variableName)

डिवाइस से दिए गए फास्टबूट वैरिएबल मान को पुनः प्राप्त करें।

पैरामीटर
variableName String : परिवर्तनीय नाम

रिटर्न
String यदि संपत्ति मौजूद नहीं है तो संपत्ति का मूल्य या null

फेंकता
असमर्थितऑपरेशन अपवाद
DeviceNotAvailableException

getFileEntry

public abstract IFileEntry getFileEntry (String path)

डिवाइस पर किसी दूरस्थ फ़ाइल का संदर्भ पुनः प्राप्त करें।

पैरामीटर
path String : पुनर्प्राप्त करने के लिए फ़ाइल पथ। '/' के सापेक्ष एक पूर्ण पथ या पथ हो सकता है। (अर्थात "/system" और "system" सिंटैक्स दोनों समर्थित हैं)

रिटर्न
IFileEntry यदि दिए गए path पर फ़ाइल नहीं मिल पाती है तो IFileEntry या null

फेंकता
com.android.tradefed.device.DeviceNotAvailableException
DeviceNotAvailableException

getIDevice

public abstract IDevice getIDevice ()

संबंधित ddmlib IDevice का संदर्भ लौटाता है।

हर बार जब डिवाइस एडीबी से डिस्कनेक्ट और पुनः कनेक्ट होता है तो डीडीएमएस द्वारा एक नया IDevice आवंटित किया जा सकता है। इस प्रकार कॉल करने वालों को IDevice का संदर्भ नहीं रखना चाहिए, क्योंकि वह संदर्भ पुराना हो सकता है।

रिटर्न
IDevice IDevice

getIntProperty

public abstract long getIntProperty (String name, 
                long defaultValue)

डिवाइस से दी गई संपत्ति का पूर्णांक मान लौटाता है।

पैरामीटर
name String : संपत्ति का नाम

defaultValue long : default value to return if property is empty or doesn't exist.

रिटर्न
long the property value or defaultValue if the property is empty, doesn't exist, or doesn't have an integer value.

Throws
DeviceNotAvailableException

getLastExpectedRebootTimeMillis

public abstract long getLastExpectedRebootTimeMillis ()

Returns the last time Tradefed APIs triggered a reboot in milliseconds since EPOCH as returned by System.currentTimeMillis() .

रिटर्न
long

getLaunchApiLevel

public abstract int getLaunchApiLevel ()

Get the device's first launched API Level. Defaults to UNKNOWN_API_LEVEL .

रिटर्न
int an integer indicating the first launched API Level of device

Throws
com.android.tradefed.device.DeviceNotAvailableException
DeviceNotAvailableException

getLogcat

public abstract InputStreamSource getLogcat ()

Grabs a snapshot stream of the logcat data.

Works in two modes:

  • If the logcat is currently being captured in the background, will return up to TestDeviceOptions.getMaxLogcatDataSize() bytes of the current contents of the background logcat capture
  • Otherwise, will return a static dump of the logcat data if device is currently responding

    रिटर्न
    InputStreamSource

  • getLogcat

    public abstract InputStreamSource getLogcat (int maxBytes)

    Grabs a snapshot stream of the last maxBytes of captured logcat data.

    Useful for cases when you want to capture frequent snapshots of the captured logcat data without incurring the potentially big disk space penalty of getting the entire getLogcat() snapshot.

    पैरामीटर
    maxBytes int : the maximum amount of data to return. Should be an amount that can comfortably fit in memory

    रिटर्न
    InputStreamSource

    getLogcatDump

    public abstract InputStreamSource getLogcatDump ()

    Get a dump of the current logcat for device. Unlike getLogcat() , this method will always return a static dump of the logcat.

    Has the disadvantage that nothing will be returned if device is not reachable.

    रिटर्न
    InputStreamSource a InputStreamSource of the logcat data. An empty stream is returned if fail to capture logcat data.

    getLogcatSince

    public abstract InputStreamSource getLogcatSince (long date)

    Grabs a snapshot stream of captured logcat data starting the date provided. The time on the device should be used getDeviceDate() .

    पैरामीटर
    date long : in millisecond since epoch format of when to start the snapshot until present. (can be be obtained using 'date +%s')

    रिटर्न
    InputStreamSource

    getMountPoint

    public abstract String getMountPoint (String mountName)

    Returns a mount point.

    Queries the device directly if the cached info in IDevice is not available.

    TODO: move this behavior to IDevice#getMountPoint(String)

    पैरामीटर
    mountName String : the name of the mount point

    रिटर्न
    String the mount point or null

    getMountPointInfo

    public abstract ITestDevice.MountPointInfo getMountPointInfo (String mountpoint)

    Returns a MountPointInfo corresponding to the specified mountpoint path, or null if that path has nothing mounted or otherwise does not appear in /proc/mounts as a mountpoint.

    पैरामीटर
    mountpoint String

    रिटर्न
    ITestDevice.MountPointInfo A ERROR(/List) of MountPointInfo containing the information in "/proc/mounts"

    Throws
    DeviceNotAvailableException

    getMountPointInfo

    public abstract  getMountPointInfo ()

    Returns a parsed version of the information in /proc/mounts on the device

    रिटर्न
    A ERROR(/List) of MountPointInfo containing the information in "/proc/mounts"

    Throws
    DeviceNotAvailableException

    getPartitionFreeSpace

    public abstract long getPartitionFreeSpace (String partition)

    Helper method to determine amount of free space on device partition.

    पैरामीटर
    partition String

    रिटर्न
    long the amount of free space in KB

    Throws
    DeviceNotAvailableException if connection with device is lost and cannot be recovered.

    getProcessByName

    public abstract ProcessInfo getProcessByName (String processName)

    Helper method runs the "pidof" and "stat" command and returns ProcessInfo object with PID and process start time of the given process.

    पैरामीटर
    processName String : the proces name String.

    रिटर्न
    ProcessInfo ProcessInfo of given processName

    Throws
    DeviceNotAvailableException

    getProcessPid

    public abstract String getProcessPid (String process)

    Returns the pid of the service or null if something went wrong.

    पैरामीटर
    process String : The proces name String.

    रिटर्न
    String

    Throws
    DeviceNotAvailableException

    getProductType

    public abstract String getProductType ()

    Convenience method to get the product type of this device.

    This method will work if device is in either adb or fastboot mode.

    रिटर्न
    String the String product type name. Will not be null

    Throws
    DeviceNotAvailableException if connection with device is lost and cannot be recovered, or if product type can not be determined

    getProductVariant

    public abstract String getProductVariant ()

    Convenience method to get the product variant of this device.

    This method will work if device is in either adb or fastboot mode.

    रिटर्न
    String the String product variant name or null if it cannot be determined

    Throws
    DeviceNotAvailableException if connection with device is lost and cannot be recovered.

    getProperty

    public abstract String getProperty (String name)

    Retrieve the given property value from the device.

    पैरामीटर
    name String : the property name

    रिटर्न
    String the property value or null if it does not exist

    Throws
    com.android.tradefed.device.DeviceNotAvailableException
    DeviceNotAvailableException

    getRecoveryMode

    public abstract ITestDevice.RecoveryMode getRecoveryMode ()

    Get the current recovery mode used for the device.

    रिटर्न
    ITestDevice.RecoveryMode the current recovery mode used for the device.

    getSerialNumber

    public abstract String getSerialNumber ()

    Convenience method to get serial number of this device.

    रिटर्न
    String the String serial number

    getTombstones

    public abstract  getTombstones ()

    Fetch and return the list of tombstones from the devices. Requires root.

    method is best-effort so if one tombstone fails to be pulled for any reason it will be missing from the list. Only a DeviceNotAvailableException will terminate the method early.

    रिटर्न
    A list of tombstone files, empty if no tombstone.

    Throws
    DeviceNotAvailableException

    getTotalMemory

    public abstract long getTotalMemory ()

    Returns total physical memory size in bytes or -1 in case of internal error

    रिटर्न
    long

    getUseFastbootErase

    public abstract boolean getUseFastbootErase ()

    Get whether to use fastboot erase or fastboot format to wipe a partition on the device.

    रिटर्न
    boolean true if fastboot erase will be used or false if fastboot format will be used.

    isAdbRoot

    public abstract boolean isAdbRoot ()

    रिटर्न
    boolean true if device currently has adb root, false otherwise.

    Throws
    DeviceNotAvailableException if connection with device is lost and cannot be recovered.

    isAdbTcp

    public abstract boolean isAdbTcp ()

    रिटर्न
    boolean true if device is connected to adb-over-tcp, false otherwise.

    isAppEnumerationSupported

    public abstract boolean isAppEnumerationSupported ()

    Check whether platform on device supports app enumeration

    रिटर्न
    boolean True if app enumeration is supported, false otherwise

    Throws
    com.android.tradefed.device.DeviceNotAvailableException
    DeviceNotAvailableException

    isBypassLowTargetSdkBlockSupported

    public abstract boolean isBypassLowTargetSdkBlockSupported ()

    Check whether platform on device supports bypassing low target sdk block on app installs

    रिटर्न
    boolean True if bypass low target sdk block is supported, false otherwise

    Throws
    com.android.tradefed.device.DeviceNotAvailableException
    DeviceNotAvailableException

    isDeviceEncrypted

    public abstract boolean isDeviceEncrypted ()

    Returns if the device is encrypted.

    रिटर्न
    boolean true if the device is encrypted.

    Throws
    DeviceNotAvailableException if connection with device is lost and cannot be recovered.

    isDirectory

    public abstract boolean isDirectory (String deviceFilePath)

    Return True if the path on the device is a directory, false otherwise.

    पैरामीटर
    deviceFilePath String

    रिटर्न
    boolean

    Throws
    com.android.tradefed.device.DeviceNotAvailableException
    DeviceNotAvailableException

    isEncryptionSupported

    public abstract boolean isEncryptionSupported ()

    Returns if encryption is supported on the device.

    रिटर्न
    boolean true if the device supports encryption.

    Throws
    com.android.tradefed.device.DeviceNotAvailableException
    DeviceNotAvailableException

    isExecutable

    public abstract boolean isExecutable (String fullPath)

    Returns True if the file path on the device is an executable file, false otherwise.

    पैरामीटर
    fullPath String

    रिटर्न
    boolean

    Throws
    com.android.tradefed.device.DeviceNotAvailableException
    DeviceNotAvailableException

    isHeadless

    public abstract boolean isHeadless ()

    Return true if the device is headless (no screen), false otherwise.

    रिटर्न
    boolean

    Throws
    DeviceNotAvailableException

    isRuntimePermissionSupported

    public abstract boolean isRuntimePermissionSupported ()

    Check whether platform on device supports runtime permission granting

    रिटर्न
    boolean True if runtime permission are supported, false otherwise.

    Throws
    com.android.tradefed.device.DeviceNotAvailableException
    DeviceNotAvailableException

    isStateBootloaderOrFastbootd

    public abstract boolean isStateBootloaderOrFastbootd ()

    Returns true if device is in TestDeviceState#FASTBOOT or TestDeviceState.FASTBOOTD .

    रिटर्न
    boolean

    logAnrs

    public abstract boolean logAnrs (ITestLogger logger)

    Collects and log ANRs from the device.

    पैरामीटर
    logger ITestLogger : an ITestLogger to log the ANRs.

    रिटर्न
    boolean True if the logging was successful, false otherwise.

    Throws
    DeviceNotAvailableException

    logOnDevice

    public abstract void logOnDevice (String tag, 
                    Log.LogLevel level, 
                    String format, 
                    Object... args)

    Log a message in the logcat of the device. This is a safe call that will not throw even if the logging fails.

    पैरामीटर
    tag String : The tag under which we log our message in the logcat.

    level Log.LogLevel : The debug level of the message in the logcat.

    format String : The message format.

    args Object : the args to be replaced via String.format().

    nonBlockingReboot

    public abstract void nonBlockingReboot ()

    Issues a command to reboot device and returns on command complete and when device is no longer visible to adb.

    Throws
    com.android.tradefed.device.DeviceNotAvailableException
    DeviceNotAvailableException

    postBootSetup

    public abstract void postBootSetup ()

    Perform instructions to configure device for testing that after every boot.

    Should be called after device is fully booted/available

    In normal circumstances this method doesn't need to be called explicitly, as implementations should perform these steps automatically when performing a reboot.

    Where it may need to be called is when device reboots due to other events (eg when a fastboot update command has completed)

    Throws
    DeviceNotAvailableException if connection with device is lost and cannot be recovered.

    postInvocationTearDown

    public void postInvocationTearDown ()

    This method is deprecated.
    Use postInvocationTearDown(Throwable) instead.

    Extra steps for device specific required clean up that will be executed after the invocation is done.

    postInvocationTearDown

    public abstract void postInvocationTearDown (Throwable invocationException)

    Extra steps for device specific required clean up that will be executed after the invocation is done.

    पैरामीटर
    invocationException Throwable : if any, the final exception raised by the invocation failure.

    preInvocationSetup

    public void preInvocationSetup (IBuildInfo info, 
                    MultiMap<String, String> attributes)

    Extra steps for device specific required setup that will be executed on the device prior to the invocation flow.

    पैरामीटर
    info IBuildInfo : The IBuildInfo of the device.

    attributes MultiMap : The attributes stored in the invocation context

    Throws
    com.android.tradefed.targetprep.TargetSetupError
    com.android.tradefed.device.DeviceNotAvailableException
    DeviceNotAvailableException
    TargetSetupError

    pullDir

    public abstract boolean pullDir (String deviceFilePath, 
                    File localDir)

    Recursively pull directory contents from device.

    पैरामीटर
    deviceFilePath String : the absolute file path of the remote source

    localDir File : the local directory to pull files into

    रिटर्न
    boolean true if file was pulled successfully. false otherwise.

    Throws
    DeviceNotAvailableException if connection with device is lost and cannot be recovered.

    pullFile

    public abstract File pullFile (String remoteFilePath, 
                    int userId)

    Retrieves a file off device, stores it in a local temporary ERROR(/File) , and returns that File .

    पैरामीटर
    remoteFilePath String : the absolute path to file on device.

    userId int : The user id to pull from

    रिटर्न
    File A ERROR(/File) containing the contents of the device file, or null if the copy failed for any reason (including problems with the host filesystem)

    Throws
    DeviceNotAvailableException if connection with device is lost and cannot be recovered.

    pullFile

    public abstract File pullFile (String remoteFilePath)

    Retrieves a file off device, stores it in a local temporary ERROR(/File) , and returns that File .

    पैरामीटर
    remoteFilePath String : the absolute path to file on device.

    रिटर्न
    File A ERROR(/File) containing the contents of the device file, or null if the copy failed for any reason (including problems with the host filesystem)

    Throws
    DeviceNotAvailableException if connection with device is lost and cannot be recovered.

    pullFile

    public abstract boolean pullFile (String remoteFilePath, 
                    File localFile)

    Retrieves a file off device.

    पैरामीटर
    remoteFilePath String : the absolute path to file on device.

    localFile File : the local file to store contents in. If non-empty, contents will be replaced.

    रिटर्न
    boolean true if file was retrieved successfully. false otherwise.

    Throws
    DeviceNotAvailableException if connection with device is lost and cannot be recovered.

    pullFile

    public abstract boolean pullFile (String remoteFilePath, 
                    File localFile, 
                    int userId)

    Retrieves a file off device.

    पैरामीटर
    remoteFilePath String : the absolute path to file on device.

    localFile File : the local file to store contents in. If non-empty, contents will be replaced.

    userId int : The user id to pull from

    रिटर्न
    boolean true if file was retrieved successfully. false otherwise.

    Throws
    DeviceNotAvailableException if connection with device is lost and cannot be recovered.

    pullFileContents

    public abstract String pullFileContents (String remoteFilePath)

    Retrieves a file off device, and returns the contents.

    पैरामीटर
    remoteFilePath String : the absolute path to file on device.

    रिटर्न
    String A String containing the contents of the device file, or null if the copy failed for any reason (including problems with the host filesystem)

    Throws
    DeviceNotAvailableException

    pullFileFromExternal

    public abstract File pullFileFromExternal (String remoteFilePath)

    A convenience method to retrieve a file from the device's external storage, stores it in a local temporary ERROR(/File) , and return a reference to that File .

    पैरामीटर
    remoteFilePath String : the path to file on device, relative to the device's external storage mountpoint

    रिटर्न
    File A ERROR(/File) containing the contents of the device file, or null if the copy failed for any reason (including problems with the host filesystem)

    Throws
    DeviceNotAvailableException if connection with device is lost and cannot be recovered.

    pushDir

    public abstract boolean pushDir (File localDir, 
                    String deviceFilePath, 
                     excludedDirectories)

    Recursively push directory contents to device while excluding some directories that are filtered.

    पैरामीटर
    localDir File : the local directory to push

    deviceFilePath String : the absolute file path of the remote destination

    excludedDirectories : Set of excluded directories names that shouldn't be pushed.

    रिटर्न
    boolean true if file was pushed successfully. false otherwise.

    Throws
    DeviceNotAvailableException if connection with device is lost and cannot be recovered.

    pushDir

    public abstract boolean pushDir (File localDir, 
                    String deviceFilePath)

    Recursively push directory contents to device.

    पैरामीटर
    localDir File : the local directory to push

    deviceFilePath String : the absolute file path of the remote destination

    रिटर्न
    boolean true if file was pushed successfully. false otherwise.

    Throws
    DeviceNotAvailableException if connection with device is lost and cannot be recovered.

    pushFile

    public abstract boolean pushFile (File localFile, 
                    String deviceFilePath, 
                    boolean evaluateContentProviderNeeded)

    Variant of pushFile(File, String) which can optionally consider evaluating the need for the content provider.

    पैरामीटर
    localFile File : the local file to push

    deviceFilePath String : the remote destination absolute file path

    evaluateContentProviderNeeded boolean : whether to check if we need the content provider

    रिटर्न
    boolean true if file was pushed successfully. false otherwise.

    Throws
    DeviceNotAvailableException if connection with device is lost and cannot be recovered.

    pushFile

    public abstract boolean pushFile (File localFile, 
                    String deviceFilePath)

    Push a file to device. By default using a content provider.

    पैरामीटर
    localFile File : the local file to push

    deviceFilePath String : the remote destination absolute file path

    रिटर्न
    boolean true if file was pushed successfully. false otherwise.

    Throws
    DeviceNotAvailableException if connection with device is lost and cannot be recovered.

    pushString

    public abstract boolean pushString (String contents, 
                    String deviceFilePath)

    Push file created from a string to device

    पैरामीटर
    contents String : the contents of the file to push

    deviceFilePath String : the remote destination absolute file path

    रिटर्न
    boolean true if string was pushed successfully. false otherwise.

    Throws
    DeviceNotAvailableException if connection with device is lost and cannot be recovered.

    reboot

    public abstract void reboot ()

    Reboots the device into adb mode.

    Blocks until device becomes available.

    Throws
    DeviceNotAvailableException if device is not available after reboot

    reboot

    public abstract void reboot (String reason)

    Reboots the device into adb mode with given reason to be persisted across reboot.

    Blocks until device becomes available.

    Last reboot reason can be obtained by querying sys.boot.reason propety.

    पैरामीटर
    reason String : a reason for this reboot, or null if no reason is specified.

    Throws
    DeviceNotAvailableException if device is not available after reboot

    rebootIntoBootloader

    public abstract void rebootIntoBootloader ()

    Reboots the device into bootloader mode.

    Blocks until device is in bootloader mode.

    Throws
    DeviceNotAvailableException if connection with device is lost and cannot be recovered.

    rebootIntoFastbootd

    public abstract void rebootIntoFastbootd ()

    Reboots the device into fastbootd mode.

    Blocks until device is in fastbootd mode.

    Throws
    DeviceNotAvailableException if connection with device is lost and cannot be recovered.

    rebootIntoRecovery

    public abstract void rebootIntoRecovery ()

    Reboots the device into adb recovery mode.

    Blocks until device enters recovery

    Throws
    DeviceNotAvailableException if device is not available after reboot

    rebootIntoSideload

    public abstract void rebootIntoSideload (boolean autoReboot)

    Reboots the device into adb sideload mode (note that this is a special mode under recovery)

    Blocks until device enters sideload mode

    पैरामीटर
    autoReboot boolean : whether to automatically reboot the device after sideload

    Throws
    DeviceNotAvailableException if device is not in sideload after reboot

    rebootIntoSideload

    public abstract void rebootIntoSideload ()

    Reboots the device into adb sideload mode (note that this is a special mode under recovery)

    Blocks until device enters sideload mode

    Throws
    DeviceNotAvailableException if device is not in sideload after reboot

    rebootUntilOnline

    public abstract void rebootUntilOnline ()

    An alternate to reboot() that only blocks until device is online ie visible to adb.

    Throws
    DeviceNotAvailableException if device is not available after reboot

    rebootUntilOnline

    public abstract void rebootUntilOnline (String reason)

    An alternate to reboot() that only blocks until device is online ie visible to adb.

    पैरामीटर
    reason String : a reason for this reboot, or null if no reason is specified.

    Throws
    DeviceNotAvailableException if device is not available after reboot

    See also:

    rebootUserspace

    public abstract void rebootUserspace ()

    Reboots only userspace part of device.

    Blocks until device becomes available.

    WARNING. Userspace reboot is currently under active development, use it on your own risk.

    Throws
    DeviceNotAvailableException if device is not available after reboot

    rebootUserspaceUntilOnline

    public abstract void rebootUserspaceUntilOnline ()

    An alternate to rebootUserspace() ()} that only blocks until device is online ie visible to adb.

    Throws
    DeviceNotAvailableException if device is not available after reboot

    remountSystemReadOnly

    public abstract void remountSystemReadOnly ()

    Make the system partition on the device read-only. May reboot the device.

    Throws
    com.android.tradefed.device.DeviceNotAvailableException
    DeviceNotAvailableException

    remountSystemWritable

    public abstract void remountSystemWritable ()

    Make the system partition on the device writable. May reboot the device.

    Throws
    com.android.tradefed.device.DeviceNotAvailableException
    DeviceNotAvailableException

    remountVendorReadOnly

    public abstract void remountVendorReadOnly ()

    Make the vendor partition on the device read-only. May reboot the device.

    Throws
    com.android.tradefed.device.DeviceNotAvailableException
    DeviceNotAvailableException

    remountVendorWritable

    public abstract void remountVendorWritable ()

    Make the vendor partition on the device writable. May reboot the device.

    Throws
    com.android.tradefed.device.DeviceNotAvailableException
    DeviceNotAvailableException

    runInstrumentationTests

    public abstract boolean runInstrumentationTests (IRemoteAndroidTestRunner runner, 
                    ITestLifeCycleReceiver... listeners)

    Convenience method for performing ERROR(/#runInstrumentationTests(com.android.ddmlib.testrunner.IRemoteAndroidTestRunner,Collection)) with one or more listeners passed as parameters.

    पैरामीटर
    runner IRemoteAndroidTestRunner : the IRemoteAndroidTestRunner which runs the tests

    listeners ITestLifeCycleReceiver : the test result listener(s)

    रिटर्न
    boolean true if test command completed. false if it failed to complete, but recovery succeeded

    Throws
    DeviceNotAvailableException if connection with device is lost and cannot be recovered. ie test command failed to complete and recovery failed.

    runInstrumentationTests

    public abstract boolean runInstrumentationTests (IRemoteAndroidTestRunner runner, 
                     listeners)

    Runs instrumentation tests, and provides device recovery.

    If connection with device is lost before test run completes, and recovery succeeds, all listeners will be informed of testRunFailed and "false" will be returned. The test command will not be rerun. It is left to callers to retry if necessary.

    If connection with device is lost before test run completes, and recovery fails, all listeners will be informed of testRunFailed and DeviceNotAvailableException will be thrown.

    पैरामीटर
    runner IRemoteAndroidTestRunner : the IRemoteAndroidTestRunner which runs the tests

    listeners : the test result listeners

    रिटर्न
    boolean true if test command completed. false if it failed to complete due to device communication exception, but recovery succeeded

    Throws
    DeviceNotAvailableException if connection with device is lost and cannot be recovered. ie test command failed to complete and recovery failed.

    runInstrumentationTestsAsUser

    public abstract boolean runInstrumentationTestsAsUser (IRemoteAndroidTestRunner runner, 
                    int userId, 
                     listeners)

    Same as ERROR(ITestDevice#runInstrumentationTests(IRemoteAndroidTestRunner, Collection)/com.android.tradefed.device.ITestDevice#runInstrumentationTests(com.android.ddmlib.testrunner.IRemoteAndroidTestRunner,Collection) ITestDevice#runInstrumentationTests(IRemoteAndroidTestRunner, Collection)) but runs the test for the given user.

    पैरामीटर
    runner IRemoteAndroidTestRunner

    userId int

    listeners

    रिटर्न
    boolean

    Throws
    DeviceNotAvailableException

    runInstrumentationTestsAsUser

    public abstract boolean runInstrumentationTestsAsUser (IRemoteAndroidTestRunner runner, 
                    int userId, 
                    ITestLifeCycleReceiver... listeners)

    Same as ITestDevice#runInstrumentationTests(IRemoteAndroidTestRunner, ITestLifeCycleReceiver...) but runs the test for a given user.

    पैरामीटर
    runner IRemoteAndroidTestRunner

    userId int

    listeners ITestLifeCycleReceiver

    रिटर्न
    boolean

    Throws
    DeviceNotAvailableException

    setDate

    public abstract void setDate (Date date)

    Sets the date on device

    Note: setting date on device requires root

    पैरामीटर
    date Date : specify a particular date; will use host date if null

    Throws
    com.android.tradefed.device.DeviceNotAvailableException
    DeviceNotAvailableException

    setOptions

    public abstract void setOptions (TestDeviceOptions options)

    Set the TestDeviceOptions for the device

    पैरामीटर
    options TestDeviceOptions

    setProperty

    public abstract boolean setProperty (String propKey, 
                    String propValue)

    Sets the given property value on the device. Requires adb root is true.

    पैरामीटर
    propKey String : The key targeted to be set.

    propValue String : The property value to be set.

    रिटर्न
    boolean returns True if the setprop command was successful, False otherwise.

    Throws
    com.android.tradefed.device.DeviceNotAvailableException
    DeviceNotAvailableException

    setRecovery

    public abstract void setRecovery (IDeviceRecovery recovery)

    Set the IDeviceRecovery to use for this device. Should be set when device is first allocated.

    पैरामीटर
    recovery IDeviceRecovery : the IDeviceRecovery

    setRecoveryMode

    public abstract void setRecoveryMode (ITestDevice.RecoveryMode mode)

    Set the current recovery mode to use for the device.

    Used to control what recovery method to use when a device communication problem is encountered. Its recommended to only use this method sparingly when needed (for example, when framework is down, etc

    पैरामीटर
    mode ITestDevice.RecoveryMode : whether 'recover till online only' mode should be on or not.

    setUseFastbootErase

    public abstract void setUseFastbootErase (boolean useFastbootErase)

    Set whether to use fastboot erase or fastboot format to wipe a partition on the device.

    पैरामीटर
    useFastbootErase boolean : true if fastboot erase should be used or false if fastboot format should be used.

    startLogcat

    public abstract void startLogcat ()

    Start capturing logcat output from device in the background.

    Will have no effect if logcat output is already being captured. Data can be later retrieved via getLogcat.

    When the device is no longer in use, stopLogcat() must be called.

    startLogcat() and stopLogcat() do not normally need to be called when within a TF invocation context, as the TF framework will start and stop logcat.

    stopEmulatorOutput

    public abstract void stopEmulatorOutput ()

    Close and delete the emulator output.

    stopLogcat

    public abstract void stopLogcat ()

    Stop capturing logcat output from device, and discard currently saved logcat data.

    Will have no effect if logcat output is not being captured.

    switchToAdbTcp

    public abstract String switchToAdbTcp ()

    Switch device to adb-over-tcp mode.

    रिटर्न
    String the tcp serial number or null if device could not be switched

    Throws
    com.android.tradefed.device.DeviceNotAvailableException
    DeviceNotAvailableException

    switchToAdbUsb

    public abstract boolean switchToAdbUsb ()

    Switch device to adb over usb mode.

    रिटर्न
    boolean true if switch was successful, false otherwise.

    Throws
    com.android.tradefed.device.DeviceNotAvailableException
    DeviceNotAvailableException

    syncFiles

    public abstract boolean syncFiles (File localFileDir, 
                    String deviceFilePath)

    Incrementally syncs the contents of a local file directory to device.

    Decides which files to push by comparing timestamps of local files with their remote equivalents. Only 'newer' or non-existent files will be pushed to device. Thus overhead should be relatively small if file set on device is already up to date.

    Hidden files (with names starting with ".") will be ignored.

    Example usage: syncFiles("/tmp/files", "/sdcard") will created a /sdcard/files directory if it doesn't already exist, and recursively push the /tmp/files contents to /sdcard/files.

    पैरामीटर
    localFileDir File : the local file directory containing files to recursively push.

    deviceFilePath String : the remote destination absolute file path root. All directories in thos file path must be readable. ie pushing to /data/local/tmp when adb is not root will fail

    रिटर्न
    boolean true if files were synced successfully. false otherwise.

    Throws
    DeviceNotAvailableException if connection with device is lost and cannot be recovered.

    unlockDevice

    public abstract boolean unlockDevice ()

    Unlocks the device if the device is in an encrypted state.

    This method may restart the framework but will not call postBootSetup() . Therefore, the device might not be fully ready to be tested when this method returns.

    रिटर्न
    boolean true if successful or if the device is unencrypted.

    Throws
    DeviceNotAvailableException if connection with device is lost and cannot be recovered.
    UnsupportedOperationException if encryption is not supported on the device.

    waitForBootComplete

    public abstract boolean waitForBootComplete (long timeOut)

    Blocks until the device's boot complete flag is set.

    पैरामीटर
    timeOut long : time in msecs to wait for the flag to be set

    रिटर्न
    boolean true if device's boot complete flag is set within the timeout

    Throws
    com.android.tradefed.device.DeviceNotAvailableException
    DeviceNotAvailableException

    waitForDeviceAvailable

    public abstract boolean waitForDeviceAvailable ()

    Waits for the device to be responsive and available for testing. Uses default timeout.

    रिटर्न
    boolean True if device is available, False if recovery is disabled and unavailable.

    Throws
    DeviceNotAvailableException if connection with device is lost and cannot be recovered.

    waitForDeviceAvailable

    public abstract boolean waitForDeviceAvailable (long waitTime)

    Waits for the device to be responsive and available for testing.

    पैरामीटर
    waitTime long : the time in ms to wait

    रिटर्न
    boolean True if device is available, False if recovery is disabled and unavailable.

    Throws
    DeviceNotAvailableException if device is still unresponsive after waitTime expires.

    waitForDeviceAvailableInRecoverPath

    public abstract boolean waitForDeviceAvailableInRecoverPath (long waitTime)

    Waits for the device to be responsive and available without considering recovery path.

    पैरामीटर
    waitTime long

    रिटर्न
    boolean True if device is available, False if unavailable.

    Throws
    DeviceNotAvailableException if connection with device is lost and cannot be recovered.

    waitForDeviceBootloader

    public abstract void waitForDeviceBootloader ()

    Blocks until device is visible via fastboot. Use default timeout.

    Throws
    DeviceNotAvailableException if connection with device is lost and cannot be recovered.

    waitForDeviceInRecovery

    public abstract boolean waitForDeviceInRecovery (long waitTime)

    Blocks for the device to be in the 'adb recovery' state (note this is distinct from IDeviceRecovery ).

    पैरामीटर
    waitTime long : the time in ms to wait

    रिटर्न
    boolean true if device boots into recovery before time expires. false otherwise

    waitForDeviceInSideload

    public abstract boolean waitForDeviceInSideload (long waitTime)

    Blocks for the device to be in the 'adb sideload' state

    पैरामीटर
    waitTime long : the time in ms to wait

    रिटर्न
    boolean true if device boots into sideload before time expires. false otherwise

    waitForDeviceNotAvailable

    public abstract boolean waitForDeviceNotAvailable (long waitTime)

    Blocks for the device to be not available ie missing from adb

    पैरामीटर
    waitTime long : the time in ms to wait

    रिटर्न
    boolean true if device becomes not available before time expires. false otherwise

    waitForDeviceOnline

    public abstract void waitForDeviceOnline ()

    Blocks until device is visible via adb. Uses default timeout

    Note the device may not necessarily be responsive to commands on completion. Use waitForDeviceAvailable() instead.

    Throws
    DeviceNotAvailableException if connection with device is lost and cannot be recovered.

    waitForDeviceOnline

    public abstract void waitForDeviceOnline (long waitTime)

    Blocks until device is visible via adb.

    Note the device may not necessarily be responsive to commands on completion. Use waitForDeviceAvailable() instead.

    पैरामीटर
    waitTime long : the time in ms to wait

    Throws
    DeviceNotAvailableException if connection with device is lost and cannot be recovered.

    waitForDeviceShell

    public abstract boolean waitForDeviceShell (long waitTime)

    Waits for device to be responsive to a basic adb shell command.

    पैरामीटर
    waitTime long : the time in ms to wait

    रिटर्न
    boolean true if device becomes responsive before waitTime elapses.