NativeDevice

public class NativeDevice
extends Object implements IManagedTestDevice, IConfigurationReceiver

java.lang.Object
   ↳ com.android.tradefed.device.NativeDevice


ITestDevice ऐसे Android डिवाइसों के लिए डिफ़ॉल्ट तौर पर लागू किया गया जो फ़ुल स्टैक नहीं हैं.

खास जानकारी

नेस्ट की गई क्लास

class NativeDevice.AdbAction

ओएस 'adb ....' कमांड चलाने के लिए DeviceAction

class NativeDevice.AdbShellAction

 

class NativeDevice.RebootDeviceAction

DeviceAction का इस्तेमाल करके डिवाइस को रीबूट करें. 

enum NativeDevice.RebootMode

रीबूट करने का मोड. 

कॉन्स्टेंट

int INVALID_USER_ID

अमान्य या न मिलने वाले उपयोगकर्ता आईडी के लिए दिखाई गई वैल्यू: UserHandle ने -10,000 वैल्यू तय की है

long MAX_HOST_DEVICE_TIME_OFFSET

int MAX_RETRY_ATTEMPTS

डिफ़ॉल्ट रूप से, कमांड को दोबारा चलाने की कोशिश करने की संख्या

फ़ील्ड्स की फ़िल्में

protected static final String SD_CARD

protected static final String STORAGE_EMULATED

protected TestDeviceOptions mOptions

protected final IDeviceStateMonitor mStateMonitor

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

NativeDevice(IDevice device, IDeviceStateMonitor stateMonitor, IDeviceMonitor allocationMonitor)

TestDevice बनाता है.

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

boolean checkApiLevelAgainstNextRelease(int strictMinLevel)

boolean checkConnectivity()

boolean clearErrorDialogs()

void clearLastConnectedWifiNetwork()

void clearLogcat()

boolean connectToWifiNetwork(String wifiSsid, String wifiPsk)

boolean connectToWifiNetwork(String wifiSsid, String wifiPsk, boolean scanSsid)

boolean connectToWifiNetworkIfNeeded(String wifiSsid, String wifiPsk, boolean scanSsid)

boolean connectToWifiNetworkIfNeeded(String wifiSsid, String wifiPsk)

int createUser(String name, boolean guest, boolean ephemeral)

int createUser(String name)

int createUserNoThrow(String name)

void deleteFile(String deviceFilePath)

boolean deviceSoftRestarted(ProcessInfo prevSystemServerProcess)

boolean deviceSoftRestartedSince(long utcEpochTime, TimeUnit timeUnit)

boolean disableAdbRoot()

void disableKeyguard()

boolean disableNetworkMonitor()

boolean disconnectFromWifi()

boolean doesFileExist(String deviceFilePath)

File dumpHeap(String process, String devicePath)

boolean enableAdbRoot()

boolean enableNetworkMonitor()

boolean encryptDevice(boolean inplace)

String executeAdbCommand(long timeout, String... cmdArgs)

String executeAdbCommand(String... cmdArgs)

CommandResult executeFastbootCommand(String... cmdArgs)

CommandResult executeFastbootCommand(long timeout, String... cmdArgs)

CommandResult executeLongFastbootCommand(String... cmdArgs)

String executeShellCommand(String command)

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

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

void executeShellCommand(String command, IShellOutputReceiver receiver)

CommandResult executeShellV2Command(String cmd)

CommandResult executeShellV2Command(String cmd, OutputStream pipeToOutput)

CommandResult executeShellV2Command(String cmd, File pipeAsInput)

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

CommandResult executeShellV2Command(String cmd, long maxTimeoutForCommand, TimeUnit timeUnit)

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

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

CommandResult fastbootWipePartition(String partition)

getActiveApexes()

getAllSettings(String namespace)

DeviceAllocationState getAllocationState()
String getAndroidId(int userId)

getAndroidIds()

int getApiLevel()

PackageInfo getAppPackageInfo(String packageName)

getAppPackageInfos()

String getBasebandVersion()
Integer getBattery()

boolean getBooleanProperty(String name, boolean defaultValue)

getBootHistory()

getBootHistorySince(long utcEpochTime, TimeUnit timeUnit)

String getBootloaderVersion()

InputStreamSource getBugreport()

InputStreamSource getBugreportz()

String getBuildAlias()

String getBuildFlavor()

String getBuildId()

String getBuildSigningKeys()

DeviceDescriptor getCachedDeviceDescriptor()

String[] getChildren(String path)

DeviceFoldableState getCurrentFoldableState()
int getCurrentUser()

String getDeviceClass()

long getDeviceDate()

DeviceDescriptor getDeviceDescriptor()

TestDeviceState getDeviceState()

long getDeviceTimeOffset(Date date)

InputStreamSource getEmulatorOutput()

Process getEmulatorProcess()

final File getExecuteShellCommandLog()

वह लॉग जिसमें सभी executeShellCommand(String) लॉग शामिल होते हैं.

long getExternalStoreFreeSpace()

String getFastbootPath()

String getFastbootProductType()

String getFastbootProductVariant()

String getFastbootSerialNumber()

String getFastbootVariable(String variableName)

String getFastbootVersion()

IFileEntry getFileEntry(String path)

IFileEntry getFileEntry(FileListingService.FileEntry entry)

नॉन-रूट पाथ से FileEntry पाने के लिए, अनऑफिशियल हेल्पर.

getFoldableStates()
IDevice getIDevice()

getInstalledPackageNames()

long getIntProperty(String name, long defaultValue)

String getIpAddress()

KeyguardControllerState getKeyguardState()

long getLastExpectedRebootTimeMillis()

int getLaunchApiLevel()

InputStreamSource getLogcat()

InputStreamSource getLogcat(int maxBytes)

InputStreamSource getLogcatDump()

InputStreamSource getLogcatSince(long date)

String getMacAddress()

getMainlineModuleInfo()

int getMaxNumberOfRunningUsersSupported()
int getMaxNumberOfUsersSupported()

IDeviceStateMonitor getMonitor()
String getMountPoint(String mountName)

ITestDevice.MountPointInfo getMountPointInfo(String mountpoint)

getMountPointInfo()

TestDeviceOptions getOptions()

long getPartitionFreeSpace(String partition)

Integer getPrimaryUserId()

ProcessInfo getProcessByName(String processName)

String getProcessPid(String process)

String getProductType()

String getProductVariant()

String getProperty(String name)

ITestDevice.RecoveryMode getRecoveryMode()

InputStreamSource getScreenshot(String format)

InputStreamSource getScreenshot(long displayId)

InputStreamSource getScreenshot(String format, boolean rescale)

InputStreamSource getScreenshot()

String getSerialNumber()

String getSetting(int userId, String namespace, String key)

String getSetting(String namespace, String key)

String getSimOperator()

String getSimState()

getTombstones()

long getTotalMemory()

getUninstallablePackageNames()

boolean getUseFastbootErase()

int getUserFlags(int userId)

getUserInfos()

int getUserSerialNumber(int userId)

IManagedTestDevice.DeviceEventResponse handleAllocationEvent(DeviceEvent event)

DeviceEvent को प्रोसेस करें. ऐसा हो सकता है कि इस डिवाइस को, डिवाइस के ऐलोकेशन की नई स्थिति पर ट्रांसफ़र किया जाए या न किया जाए.

boolean hasFeature(String feature)

String installPackage(File packageFile, boolean reinstall, String... extraArgs)

String installPackage(File packageFile, boolean reinstall, boolean grantPermissions, String... extraArgs)

String installPackageForUser(File packageFile, boolean reinstall, int userId, String... extraArgs)

String installPackageForUser(File packageFile, boolean reinstall, boolean grantPermissions, int userId, String... extraArgs)

boolean isAdbRoot()

boolean isAdbTcp()
boolean isAppEnumerationSupported()

boolean isDeviceEncrypted()

boolean isDirectory(String path)

boolean isEnableAdbRoot()
boolean isEncryptionSupported()

boolean isExecutable(String fullPath)

boolean isFastbootEnabled()

boolean isHeadless()

boolean isMultiUserSupported()

boolean isPackageInstalled(String packageName, String userId)

boolean isPackageInstalled(String packageName)

boolean isRuntimePermissionSupported()

boolean isStateBootloaderOrFastbootd()

boolean isUserRunning(int userId)

boolean isUserSecondary(int userId)

boolean isWifiEnabled()

listDisplayIds()

listUsers()

boolean logBugreport(String dataName, ITestLogger listener)

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

void nonBlockingReboot()

void postAdbRootAction()

अगर डिवाइस को adb root करने के बाद और फिर से ऑनलाइन होने से पहले, कुछ खास कार्रवाइयां करनी हैं, तो इस विकल्प को बदलें.

void postAdbUnrootAction()

अगर डिवाइस को adb unroot करने के बाद और फिर से ऑनलाइन होने से पहले, कुछ खास कार्रवाइयां करनी हैं, तो इस विकल्प को बदलें.

void postBootSetup()

void postInvocationTearDown(Throwable exception)

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

boolean pullDir(String deviceFilePath, File localDir)

boolean pullFile(String remoteFilePath, File localFile)

File pullFile(String remoteFilePath)

String pullFileContents(String remoteFilePath)

File pullFileFromExternal(String remoteFilePath)

boolean pushDir(File localFileDir, String deviceFilePath, excludedDirectories)

boolean pushDir(File localFileDir, String deviceFilePath)

boolean pushFile(File localFile, String remoteFilePath)

boolean pushString(String contents, String remoteFilePath)

void reboot(String reason)

void reboot()

void rebootIntoBootloader()

void rebootIntoFastbootd()

void rebootIntoRecovery()

void rebootIntoSideload()

void rebootIntoSideload(boolean autoReboot)

void rebootUntilOnline()
void rebootUntilOnline(String reason)

void rebootUserspace()
void rebootUserspaceUntilOnline()
void recoverDevice()

डिवाइस के साथ कम्यूनिकेशन को वापस लाने की कोशिश करता है.

void remountSystemWritable()

void remountVendorWritable()

boolean removeAdmin(String componentName, int userId)

void removeOwners()

boolean removeUser(int userId)

void resetContentProviderSetup()

कॉन्टेंट प्रोवाइडर सेटअप को फिर से ट्रिगर करने के लिए, फ़्लैग को रीसेट करें.

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

boolean runInstrumentationTests(IRemoteAndroidTestRunner runner, listeners)

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

boolean runInstrumentationTestsAsUser(IRemoteAndroidTestRunner runner, int userId, listeners)

void setConfiguration(IConfiguration configuration)

इस्तेमाल में मौजूद IConfiguration को इंजेक्ट करता है.

void setDate(Date date)

boolean setDeviceOwner(String componentName, int userId)

void setDeviceState(TestDeviceState deviceState)

void setEmulatorOutputStream(SizeLimitedOutputStream output)

एमुलेटर के लिए, SizeLimitedOutputStream को आउटपुट को लॉग करने के लिए सेट करें

void setEmulatorProcess(Process p)

void setFastbootEnabled(boolean fastbootEnabled)

void setFastbootPath(String fastbootPath)

void setIDevice(IDevice newDevice)

void setOptions(TestDeviceOptions options)

boolean setProperty(String propKey, String propValue)

void setRecovery(IDeviceRecovery recovery)

void setRecoveryMode(ITestDevice.RecoveryMode mode)

void setSetting(String namespace, String key, String value)

void setSetting(int userId, String namespace, String key, String value)

void setUseFastbootErase(boolean useFastbootErase)

void startLogcat()

boolean startUser(int userId)

boolean startUser(int userId, boolean waitFlag)

void stopEmulatorOutput()

void stopLogcat()

boolean stopUser(int userId)

boolean stopUser(int userId, boolean waitFlag, boolean forceFlag)

String switchToAdbTcp()

boolean switchToAdbUsb()

boolean switchUser(int userId)

boolean switchUser(int userId, long timeout)

boolean syncFiles(File localFileDir, String deviceFilePath)

Bugreport takeBugreport()

boolean unencryptDevice()

String uninstallPackage(String packageName)

String uninstallPackageForUser(String packageName, int userId)

boolean unlockDevice()

boolean waitForBootComplete(long timeOut)

void waitForDeviceAvailable()

void waitForDeviceAvailable(long waitTime)

boolean waitForDeviceInRecovery(long waitTime)

boolean waitForDeviceInSideload(long waitTime)

boolean waitForDeviceNotAvailable(long waitTime)

void waitForDeviceOnline()

void waitForDeviceOnline(long waitTime)

boolean waitForDeviceShell(long waitTime)

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

void checkApiLevelAgainst(String feature, int strictMinLevel)
NativeDevice.RebootDeviceAction createRebootDeviceAction(NativeDevice.RebootMode rebootMode, String reason)

रीबूट करने की कार्रवाई करते समय इस्तेमाल करने के लिए, RebootDeviceAction बनाएं.

void doAdbReboot(NativeDevice.RebootMode rebootMode, String reason)

adb reboot करें.

void ensureRuntimePermissionSupported()

रनटाइम की अनुमति काम न करने पर, अपवाद दिखाने के लिए हेल्पर तरीका

InputStreamSource getBugreportInternal()
File getBugreportzInternal()

bugreportz की zip फ़ाइल को ERROR(/File) के तौर पर पाने के लिए, इंटरनल हेल्पर का तरीका.

IRunUtil getRunUtil()

इस्तेमाल करने के लिए RunUtil इंस्टेंस पाएं.

String internalGetProperty(String propName, String fastbootVar, String description)

डिफ़ॉल्ट रूप से, ddmlib कैश मेमोरी से डिवाइस की प्रॉपर्टी फ़ेच करें. साथ ही, डिवाइस के फ़ास्टबूट मोड में होने या न होने के आधार पर, `adb shell getprop` या `fastboot getvar` में से किसी एक का इस्तेमाल करें.

boolean isNewer(File localFile, IFileEntry entry)

अगर लोकल फ़ाइल, रिमोट फ़ाइल से नई है, तो true दिखाएं.

boolean performDeviceAction(String actionDescription, com.android.tradefed.device.NativeDevice.DeviceAction action, int retryAttempts)

इस डिवाइस पर कोई कार्रवाई करता है.

void postAdbReboot()

रीबूट करने के बाद की जा सकने वाली अतिरिक्त कार्रवाइयां.

void prePostBootSetup()

इससे हर डिवाइस टाइप (AndroidNativeDevice, TestDevice) को, बूट के बाद किए जाने वाले किसी खास सेटअप के लिए, इस तरीके को बदलने की अनुमति मिलती है.

void setClock(Clock clock)

इस्तेमाल करने के लिए, Clock का इंस्टेंस सेट करें.

void setLogStartDelay(int delay)

ऑनलाइन डिवाइस के लिए, logcat कैप्चर शुरू करने से पहले इंतज़ार करने के लिए, समय को मिलीसेकंड में सेट करता है.

void waitForDeviceNotAvailable(String operationDesc, long time)

कॉन्स्टेंट

INVALID_USER_ID

public static final int INVALID_USER_ID

अमान्य या न मिलने वाले उपयोगकर्ता आईडी के लिए दिखाई गई वैल्यू: UserHandle ने -10,000 वैल्यू तय की है

कॉन्स्टेंट वैल्यू: -10000 (0xffffd8f0)

MAX_HOST_DEVICE_TIME_OFFSET

protected static final long MAX_HOST_DEVICE_TIME_OFFSET

कॉन्स्टेंट वैल्यू: 5,000 (0x0000000000001388)

MAX_RETRY_ATTEMPTS

protected static final int MAX_RETRY_ATTEMPTS

डिफ़ॉल्ट रूप से, कमांड को दोबारा चलाने की कोशिश करने की संख्या

कॉन्स्टेंट वैल्यू: 2 (0x00000002)

फ़ील्ड्स की फ़िल्में

SD_CARD

protected static final String SD_CARD

STORAGE_EMULATED

protected static final String STORAGE_EMULATED

mOptions

protected TestDeviceOptions mOptions

mStateMonitor

protected final IDeviceStateMonitor mStateMonitor

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

NativeDevice

public NativeDevice (IDevice device, 
                IDeviceStateMonitor stateMonitor, 
                IDeviceMonitor allocationMonitor)

TestDevice बनाता है.

पैरामीटर
device IDevice: उससे जुड़ा IDevice

stateMonitor IDeviceStateMonitor: इस्तेमाल करने के लिए IDeviceStateMonitor तरीका

allocationMonitor IDeviceMonitor: IDeviceMonitor, यह एलोकेशन की स्थिति में हुए बदलावों के बारे में बताता है. यह शून्य हो सकता है

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

checkApiLevelAgainstNextRelease

public boolean checkApiLevelAgainstNextRelease (int strictMinLevel)

पैरामीटर
strictMinLevel int

रिटर्न
boolean

थ्रो
DeviceNotAvailableException

checkConnectivity

public boolean checkConnectivity ()

रिटर्न
boolean

थ्रो
DeviceNotAvailableException

clearErrorDialogs

public boolean clearErrorDialogs ()

रिटर्न
boolean

थ्रो
DeviceNotAvailableException

clearLastConnectedWifiNetwork

public void clearLastConnectedWifiNetwork ()

clearLogcat

public void clearLogcat ()

connectToWifiNetwork

public boolean connectToWifiNetwork (String wifiSsid, 
                String wifiPsk)

पैरामीटर
wifiSsid String

wifiPsk String

रिटर्न
boolean

थ्रो
DeviceNotAvailableException

connectToWifiNetwork

public boolean connectToWifiNetwork (String wifiSsid, 
                String wifiPsk, 
                boolean scanSsid)

पैरामीटर
wifiSsid String

wifiPsk String

scanSsid boolean

रिटर्न
boolean

थ्रो
DeviceNotAvailableException

connectToWifiNetworkIfNeeded

public boolean connectToWifiNetworkIfNeeded (String wifiSsid, 
                String wifiPsk, 
                boolean scanSsid)

पैरामीटर
wifiSsid String

wifiPsk String

scanSsid boolean

रिटर्न
boolean

थ्रो
DeviceNotAvailableException

connectToWifiNetworkIfNeeded

public boolean connectToWifiNetworkIfNeeded (String wifiSsid, 
                String wifiPsk)

पैरामीटर
wifiSsid String

wifiPsk String

रिटर्न
boolean

थ्रो
DeviceNotAvailableException

createUser

public int createUser (String name, 
                boolean guest, 
                boolean ephemeral)

पैरामीटर
name String

guest boolean

ephemeral boolean

रिटर्न
int

थ्रो
DeviceNotAvailableException

createUser

public int createUser (String name)

पैरामीटर
name String

रिटर्न
int

थ्रो
DeviceNotAvailableException

createUserNoThrow

public int createUserNoThrow (String name)

पैरामीटर
name String

रिटर्न
int

थ्रो
DeviceNotAvailableException

deleteFile

public void deleteFile (String deviceFilePath)

पैरामीटर
deviceFilePath String

थ्रो
DeviceNotAvailableException

deviceSoftRestarted

public boolean deviceSoftRestarted (ProcessInfo prevSystemServerProcess)

पैरामीटर
prevSystemServerProcess ProcessInfo

रिटर्न
boolean

थ्रो
DeviceNotAvailableException

deviceSoftRestartedSince

public boolean deviceSoftRestartedSince (long utcEpochTime, 
                TimeUnit timeUnit)

पैरामीटर
utcEpochTime long

timeUnit TimeUnit

रिटर्न
boolean

थ्रो
DeviceNotAvailableException

disableAdbRoot

public boolean disableAdbRoot ()

रिटर्न
boolean

थ्रो
DeviceNotAvailableException

disableKeyguard

public void disableKeyguard ()

थ्रो
DeviceNotAvailableException

disableNetworkMonitor

public boolean disableNetworkMonitor ()

रिटर्न
boolean

थ्रो
DeviceNotAvailableException

disconnectFromWifi

public boolean disconnectFromWifi ()

रिटर्न
boolean

थ्रो
DeviceNotAvailableException

doesFileExist

public boolean doesFileExist (String deviceFilePath)

पैरामीटर
deviceFilePath String

रिटर्न
boolean

थ्रो
DeviceNotAvailableException

dumpHeap

public File dumpHeap (String process, 
                String devicePath)

पैरामीटर
process String

devicePath String

रिटर्न
File

थ्रो
DeviceNotAvailableException

enableAdbRoot

public boolean enableAdbRoot ()

रिटर्न
boolean

थ्रो
DeviceNotAvailableException

enableNetworkMonitor

public boolean enableNetworkMonitor ()

रिटर्न
boolean

थ्रो
DeviceNotAvailableException

encryptDevice

public boolean encryptDevice (boolean inplace)

पैरामीटर
inplace boolean

रिटर्न
boolean

थ्रो
DeviceNotAvailableException

executeAdbCommand

public String executeAdbCommand (long timeout, 
                String... cmdArgs)

पैरामीटर
timeout long

cmdArgs String

रिटर्न
String

थ्रो
DeviceNotAvailableException

executeAdbCommand

public String executeAdbCommand (String... cmdArgs)

पैरामीटर
cmdArgs String

रिटर्न
String

थ्रो
DeviceNotAvailableException

executeFastbootCommand

public CommandResult executeFastbootCommand (String... cmdArgs)

पैरामीटर
cmdArgs String

रिटर्न
CommandResult

थ्रो
DeviceNotAvailableException

executeFastbootCommand

public CommandResult executeFastbootCommand (long timeout, 
                String... cmdArgs)

पैरामीटर
timeout long

cmdArgs String

रिटर्न
CommandResult

थ्रो
DeviceNotAvailableException

executeLongFastbootCommand

public CommandResult executeLongFastbootCommand (String... cmdArgs)

पैरामीटर
cmdArgs String

रिटर्न
CommandResult

थ्रो
DeviceNotAvailableException

executeShellCommand

public String executeShellCommand (String command)

पैरामीटर
command String

रिटर्न
String

थ्रो
DeviceNotAvailableException

executeShellCommand

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

पैरामीटर
command String

receiver IShellOutputReceiver

maxTimeToOutputShellResponse long

timeUnit TimeUnit

retryAttempts int

थ्रो
DeviceNotAvailableException

executeShellCommand

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

पैरामीटर
command String

receiver IShellOutputReceiver

maxTimeoutForCommand long

maxTimeToOutputShellResponse long

timeUnit TimeUnit

retryAttempts int

थ्रो
DeviceNotAvailableException

executeShellCommand

public void executeShellCommand (String command, 
                IShellOutputReceiver receiver)

पैरामीटर
command String

receiver IShellOutputReceiver

थ्रो
DeviceNotAvailableException

executeShellV2Command

public CommandResult executeShellV2Command (String cmd)

पैरामीटर
cmd String

रिटर्न
CommandResult

थ्रो
DeviceNotAvailableException

executeShellV2Command

public CommandResult executeShellV2Command (String cmd, 
                OutputStream pipeToOutput)

पैरामीटर
cmd String

pipeToOutput OutputStream

रिटर्न
CommandResult

थ्रो
DeviceNotAvailableException

executeShellV2Command

public CommandResult executeShellV2Command (String cmd, 
                File pipeAsInput)

पैरामीटर
cmd String

pipeAsInput File

रिटर्न
CommandResult

थ्रो
DeviceNotAvailableException

executeShellV2Command

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

पैरामीटर
cmd String

maxTimeoutForCommand long

timeUnit TimeUnit

retryAttempts int

रिटर्न
CommandResult

थ्रो
DeviceNotAvailableException

executeShellV2Command

public CommandResult executeShellV2Command (String cmd, 
                long maxTimeoutForCommand, 
                TimeUnit timeUnit)

पैरामीटर
cmd String

maxTimeoutForCommand long

timeUnit TimeUnit

रिटर्न
CommandResult

थ्रो
DeviceNotAvailableException

executeShellV2Command

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

पैरामीटर
cmd String

pipeAsInput File

pipeToOutput OutputStream

maxTimeoutForCommand long

timeUnit TimeUnit

retryAttempts int

रिटर्न
CommandResult

थ्रो
DeviceNotAvailableException

executeShellV2Command

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

पैरामीटर
cmd String

pipeAsInput File

pipeToOutput OutputStream

pipeToError OutputStream

maxTimeoutForCommand long

timeUnit TimeUnit

retryAttempts int

रिटर्न
CommandResult

थ्रो
DeviceNotAvailableException

fastbootWipePartition

public CommandResult fastbootWipePartition (String partition)

पैरामीटर
partition String

रिटर्न
CommandResult

थ्रो
DeviceNotAvailableException

getActiveApexes

public  getActiveApexes ()

रिटर्न

थ्रो
DeviceNotAvailableException

getAllSettings

public  getAllSettings (String namespace)

पैरामीटर
namespace String

रिटर्न

थ्रो
DeviceNotAvailableException

getAllocationState

public DeviceAllocationState getAllocationState ()

रिटर्न
DeviceAllocationState

getAndroidId

public String getAndroidId (int userId)

पैरामीटर
userId int

रिटर्न
String

थ्रो
DeviceNotAvailableException

getAndroidIds

public  getAndroidIds ()

रिटर्न

थ्रो
DeviceNotAvailableException

getApiLevel

public int getApiLevel ()

रिटर्न
int

थ्रो
DeviceNotAvailableException

getAppPackageInfo

public PackageInfo getAppPackageInfo (String packageName)

पैरामीटर
packageName String

रिटर्न
PackageInfo

थ्रो
DeviceNotAvailableException

getAppPackageInfos

public  getAppPackageInfos ()

रिटर्न

थ्रो
DeviceNotAvailableException

getBasebandVersion

public String getBasebandVersion ()

रिटर्न
String

थ्रो
DeviceNotAvailableException

getBattery

public Integer getBattery ()

रिटर्न
Integer

getBooleanProperty

public boolean getBooleanProperty (String name, 
                boolean defaultValue)

पैरामीटर
name String

defaultValue boolean

रिटर्न
boolean

थ्रो
DeviceNotAvailableException

getBootHistory

public  getBootHistory ()

रिटर्न

थ्रो
DeviceNotAvailableException

getBootHistorySince

public  getBootHistorySince (long utcEpochTime, 
                TimeUnit timeUnit)

पैरामीटर
utcEpochTime long

timeUnit TimeUnit

रिटर्न

थ्रो
DeviceNotAvailableException

getBootloaderVersion

public String getBootloaderVersion ()

रिटर्न
String

थ्रो
DeviceNotAvailableException

getBugreport

public InputStreamSource getBugreport ()

रिटर्न
InputStreamSource

getBugreportz

public InputStreamSource getBugreportz ()

रिटर्न
InputStreamSource

getBuildAlias

public String getBuildAlias ()

रिटर्न
String

थ्रो
DeviceNotAvailableException

getBuildFlavor

public String getBuildFlavor ()

रिटर्न
String

थ्रो
DeviceNotAvailableException

getBuildId

public String getBuildId ()

रिटर्न
String

थ्रो
DeviceNotAvailableException

getBuildSigningKeys

public String getBuildSigningKeys ()

रिटर्न
String

थ्रो
DeviceNotAvailableException

getCachedDeviceDescriptor

public DeviceDescriptor getCachedDeviceDescriptor ()

रिटर्न
DeviceDescriptor

getChildren

public String[] getChildren (String path)

पैरामीटर
path String

रिटर्न
String[]

थ्रो
DeviceNotAvailableException

getCurrentFoldableState

public DeviceFoldableState getCurrentFoldableState ()

रिटर्न
DeviceFoldableState

थ्रो
DeviceNotAvailableException

getCurrentUser

public int getCurrentUser ()

रिटर्न
int

थ्रो
DeviceNotAvailableException

getDeviceClass

public String getDeviceClass ()

रिटर्न
String

getDeviceDate

public long getDeviceDate ()

रिटर्न
long

थ्रो
DeviceNotAvailableException

getDeviceDescriptor

public DeviceDescriptor getDeviceDescriptor ()

रिटर्न
DeviceDescriptor

getDeviceState

public TestDeviceState getDeviceState ()

रिटर्न
TestDeviceState

getDeviceTimeOffset

public long getDeviceTimeOffset (Date date)

पैरामीटर
date Date

रिटर्न
long

थ्रो
DeviceNotAvailableException

getEmulatorOutput

public InputStreamSource getEmulatorOutput ()

रिटर्न
InputStreamSource

getEmulatorProcess

public Process getEmulatorProcess ()

रिटर्न
Process

getExecuteShellCommandLog

public final File getExecuteShellCommandLog ()

वह लॉग जिसमें सभी executeShellCommand(String) लॉग शामिल होते हैं.

रिटर्न
File

getExternalStoreFreeSpace

public long getExternalStoreFreeSpace ()

रिटर्न
long

थ्रो
DeviceNotAvailableException

getFastbootPath

public String getFastbootPath ()

रिटर्न
String

getFastbootProductType

public String getFastbootProductType ()

रिटर्न
String

थ्रो
DeviceNotAvailableException

getFastbootProductVariant

public String getFastbootProductVariant ()

रिटर्न
String

थ्रो
DeviceNotAvailableException

getFastbootSerialNumber

public String getFastbootSerialNumber ()

रिटर्न
String

getFastbootVariable

public String getFastbootVariable (String variableName)

पैरामीटर
variableName String

रिटर्न
String

थ्रो
DeviceNotAvailableException

getFastbootVersion

public String getFastbootVersion ()

रिटर्न
String

getFileEntry

public IFileEntry getFileEntry (String path)

पैरामीटर
path String

रिटर्न
IFileEntry

थ्रो
DeviceNotAvailableException

getFileEntry

public IFileEntry getFileEntry (FileListingService.FileEntry entry)

नॉन-रूट पाथ से FileEntry पाने के लिए, अनऑफिशियल हेल्पर. FIXME: FileEntry सिस्टम को फिर से तैयार करें, ताकि इसे किसी भी पाथ से ऐक्सेस किया जा सके. (यहां तक कि बिना रूट वाले डिवाइसों पर भी).

पैरामीटर
entry FileListingService.FileEntry: FileEntry को ज़रूरी नहीं है कि वह रूट हो, जैसा कि Ddmlib की ज़रूरत है.

रिटर्न
IFileEntry FileEntry को दिखाने वाला FileEntryWrapper.

थ्रो
DeviceNotAvailableException

getFoldableStates

public  getFoldableStates ()

रिटर्न

थ्रो
DeviceNotAvailableException

getIDevice

public IDevice getIDevice ()

रिटर्न
IDevice

getInstalledPackageNames

public  getInstalledPackageNames ()

रिटर्न

थ्रो
DeviceNotAvailableException

getIntProperty

public long getIntProperty (String name, 
                long defaultValue)

पैरामीटर
name String

defaultValue long

रिटर्न
long

थ्रो
DeviceNotAvailableException

getIpAddress

public String getIpAddress ()

रिटर्न
String

थ्रो
DeviceNotAvailableException

getKeyguardState

public KeyguardControllerState getKeyguardState ()

रिटर्न
KeyguardControllerState

थ्रो
DeviceNotAvailableException

getLastExpectedRebootTimeMillis

public long getLastExpectedRebootTimeMillis ()

रिटर्न
long

getLaunchApiLevel

public int getLaunchApiLevel ()

रिटर्न
int

थ्रो
DeviceNotAvailableException

getLogcat

public InputStreamSource getLogcat ()

रिटर्न
InputStreamSource

getLogcat

public InputStreamSource getLogcat (int maxBytes)

पैरामीटर
maxBytes int

रिटर्न
InputStreamSource

getLogcatDump

public InputStreamSource getLogcatDump ()

रिटर्न
InputStreamSource

getLogcatSince

public InputStreamSource getLogcatSince (long date)

पैरामीटर
date long

रिटर्न
InputStreamSource

getMacAddress

public String getMacAddress ()

रिटर्न
String

getMainlineModuleInfo

public  getMainlineModuleInfo ()

रिटर्न

थ्रो
DeviceNotAvailableException

getMaxNumberOfRunningUsersSupported

public int getMaxNumberOfRunningUsersSupported ()

रिटर्न
int

थ्रो
DeviceNotAvailableException

getMaxNumberOfUsersSupported

public int getMaxNumberOfUsersSupported ()

रिटर्न
int

थ्रो
DeviceNotAvailableException

getMonitor

public IDeviceStateMonitor getMonitor ()

रिटर्न
IDeviceStateMonitor

getMountPoint

public String getMountPoint (String mountName)

पैरामीटर
mountName String

रिटर्न
String

getMountPointInfo

public ITestDevice.MountPointInfo getMountPointInfo (String mountpoint)

पैरामीटर
mountpoint String

रिटर्न
ITestDevice.MountPointInfo

थ्रो
DeviceNotAvailableException

getMountPointInfo

public  getMountPointInfo ()

रिटर्न

थ्रो
DeviceNotAvailableException

getOptions

public TestDeviceOptions getOptions ()

रिटर्न
TestDeviceOptions

getPartitionFreeSpace

public long getPartitionFreeSpace (String partition)

पैरामीटर
partition String

रिटर्न
long

थ्रो
DeviceNotAvailableException

getPrimaryUserId

public Integer getPrimaryUserId ()

रिटर्न
Integer

थ्रो
DeviceNotAvailableException

getProcessByName

public ProcessInfo getProcessByName (String processName)

पैरामीटर
processName String

रिटर्न
ProcessInfo

थ्रो
DeviceNotAvailableException

getProcessPid

public String getProcessPid (String process)

पैरामीटर
process String

रिटर्न
String

थ्रो
DeviceNotAvailableException

getProductType

public String getProductType ()

रिटर्न
String

थ्रो
DeviceNotAvailableException

getProductVariant

public String getProductVariant ()

रिटर्न
String

थ्रो
DeviceNotAvailableException

getProperty

public String getProperty (String name)

पैरामीटर
name String

रिटर्न
String

थ्रो
DeviceNotAvailableException

getRecoveryMode

public ITestDevice.RecoveryMode getRecoveryMode ()

रिटर्न
ITestDevice.RecoveryMode

getScreenshot

public InputStreamSource getScreenshot (String format)

पैरामीटर
format String

रिटर्न
InputStreamSource

थ्रो
DeviceNotAvailableException

getScreenshot

public InputStreamSource getScreenshot (long displayId)

पैरामीटर
displayId long

रिटर्न
InputStreamSource

थ्रो
DeviceNotAvailableException

getScreenshot

public InputStreamSource getScreenshot (String format, 
                boolean rescale)

पैरामीटर
format String

rescale boolean

रिटर्न
InputStreamSource

थ्रो
DeviceNotAvailableException

getScreenshot

public InputStreamSource getScreenshot ()

रिटर्न
InputStreamSource

थ्रो
DeviceNotAvailableException

getSerialNumber

public String getSerialNumber ()

रिटर्न
String

getSetting

public String getSetting (int userId, 
                String namespace, 
                String key)

पैरामीटर
userId int

namespace String

key String

रिटर्न
String

थ्रो
DeviceNotAvailableException

getSetting

public String getSetting (String namespace, 
                String key)

पैरामीटर
namespace String

key String

रिटर्न
String

थ्रो
DeviceNotAvailableException

getSimOperator

public String getSimOperator ()

रिटर्न
String

getSimState

public String getSimState ()

रिटर्न
String

getTombstones

public  getTombstones ()

रिटर्न

थ्रो
DeviceNotAvailableException

getTotalMemory

public long getTotalMemory ()

रिटर्न
long

getUninstallablePackageNames

public  getUninstallablePackageNames ()

रिटर्न

थ्रो
DeviceNotAvailableException

getUseFastbootErase

public boolean getUseFastbootErase ()

रिटर्न
boolean

getUserFlags

public int getUserFlags (int userId)

पैरामीटर
userId int

रिटर्न
int

थ्रो
DeviceNotAvailableException

getUserInfos

public  getUserInfos ()

रिटर्न

थ्रो
DeviceNotAvailableException

getUserSerialNumber

public int getUserSerialNumber (int userId)

पैरामीटर
userId int

रिटर्न
int

थ्रो
DeviceNotAvailableException

handleAllocationEvent

public IManagedTestDevice.DeviceEventResponse handleAllocationEvent (DeviceEvent event)

DeviceEvent को प्रोसेस करें. ऐसा हो सकता है कि इस डिवाइस को, डिवाइस के ऐलोकेशन की नई स्थिति पर ट्रांसफ़र किया जाए या न किया जाए.

पैरामीटर
event DeviceEvent

रिटर्न
IManagedTestDevice.DeviceEventResponse

hasFeature

public boolean hasFeature (String feature)

पैरामीटर
feature String

रिटर्न
boolean

थ्रो
DeviceNotAvailableException

installPackage

public String installPackage (File packageFile, 
                boolean reinstall, 
                String... extraArgs)

पैरामीटर
packageFile File

reinstall boolean

extraArgs String

रिटर्न
String

थ्रो
DeviceNotAvailableException

installPackage

public String installPackage (File packageFile, 
                boolean reinstall, 
                boolean grantPermissions, 
                String... extraArgs)

पैरामीटर
packageFile File

reinstall boolean

grantPermissions boolean

extraArgs String

रिटर्न
String

थ्रो
DeviceNotAvailableException

installPackageForUser

public String installPackageForUser (File packageFile, 
                boolean reinstall, 
                int userId, 
                String... extraArgs)

पैरामीटर
packageFile File

reinstall boolean

userId int

extraArgs String

रिटर्न
String

थ्रो
DeviceNotAvailableException

installPackageForUser

public String installPackageForUser (File packageFile, 
                boolean reinstall, 
                boolean grantPermissions, 
                int userId, 
                String... extraArgs)

पैरामीटर
packageFile File

reinstall boolean

grantPermissions boolean

userId int

extraArgs String

रिटर्न
String

थ्रो
DeviceNotAvailableException

isAdbRoot

public boolean isAdbRoot ()

रिटर्न
boolean

थ्रो
DeviceNotAvailableException

isAdbTcp

public boolean isAdbTcp ()

रिटर्न
boolean

isAppEnumerationSupported

public boolean isAppEnumerationSupported ()

रिटर्न
boolean

थ्रो
DeviceNotAvailableException

isDeviceEncrypted

public boolean isDeviceEncrypted ()

रिटर्न
boolean

थ्रो
DeviceNotAvailableException

isDirectory

public boolean isDirectory (String path)

पैरामीटर
path String

रिटर्न
boolean

थ्रो
DeviceNotAvailableException

isEnableAdbRoot

public boolean isEnableAdbRoot ()

रिटर्न
boolean true डिवाइस पर adb root चालू करना है या नहीं

isEncryptionSupported

public boolean isEncryptionSupported ()

रिटर्न
boolean

थ्रो
DeviceNotAvailableException

isExecutable

public boolean isExecutable (String fullPath)

पैरामीटर
fullPath String

रिटर्न
boolean

थ्रो
DeviceNotAvailableException

isFastbootEnabled

public boolean isFastbootEnabled ()

रिटर्न
boolean

isHeadless

public boolean isHeadless ()

रिटर्न
boolean

थ्रो
DeviceNotAvailableException

isMultiUserSupported

public boolean isMultiUserSupported ()

रिटर्न
boolean

थ्रो
DeviceNotAvailableException

isPackageInstalled

public boolean isPackageInstalled (String packageName, 
                String userId)

पैरामीटर
packageName String

userId String

रिटर्न
boolean

थ्रो
DeviceNotAvailableException

isPackageInstalled

public boolean isPackageInstalled (String packageName)

पैरामीटर
packageName String

रिटर्न
boolean

थ्रो
DeviceNotAvailableException

isRuntimePermissionSupported

public boolean isRuntimePermissionSupported ()

रिटर्न
boolean

थ्रो
DeviceNotAvailableException

isStateBootloaderOrFastbootd

public boolean isStateBootloaderOrFastbootd ()

रिटर्न
boolean

isUserRunning

public boolean isUserRunning (int userId)

पैरामीटर
userId int

रिटर्न
boolean

थ्रो
DeviceNotAvailableException

isUserSecondary

public boolean isUserSecondary (int userId)

पैरामीटर
userId int

रिटर्न
boolean

थ्रो
DeviceNotAvailableException

isWifiEnabled

public boolean isWifiEnabled ()

रिटर्न
boolean

थ्रो
DeviceNotAvailableException

listDisplayIds

public  listDisplayIds ()

रिटर्न

थ्रो
DeviceNotAvailableException

listUsers

public  listUsers ()

रिटर्न

थ्रो
DeviceNotAvailableException

logBugreport

public boolean logBugreport (String dataName, 
                ITestLogger listener)

पैरामीटर
dataName String

listener ITestLogger

रिटर्न
boolean

logOnDevice

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

पैरामीटर
tag String

level Log.LogLevel

format String

args Object

nonBlockingReboot

public void nonBlockingReboot ()

थ्रो
DeviceNotAvailableException

postAdbRootAction

public void postAdbRootAction ()

अगर डिवाइस को adb root करने के बाद और फिर से ऑनलाइन होने से पहले, कुछ खास कार्रवाइयां करनी हैं, तो इस विकल्प को बदलें. डिफ़ॉल्ट तौर पर लागू करने की सुविधा में कोई अतिरिक्त कार्रवाई शामिल नहीं होती. इस चरण में, adb root चालू होने की कोई गारंटी नहीं है.

थ्रो
DeviceNotAvailableException

postAdbUnrootAction

public void postAdbUnrootAction ()

अगर डिवाइस को adb unroot करने के बाद और फिर से ऑनलाइन होने से पहले, कुछ खास कार्रवाइयां करनी हैं, तो इस विकल्प को बदलें. डिफ़ॉल्ट तौर पर लागू करने की सुविधा में कोई अतिरिक्त कार्रवाई शामिल नहीं होती. हालांकि, इस बात की कोई गारंटी नहीं है कि इस चरण में adb root बंद हो जाएगा.

थ्रो
DeviceNotAvailableException

postBootSetup

public void postBootSetup ()

थ्रो
DeviceNotAvailableException

postInvocationTearDown

public void postInvocationTearDown (Throwable exception)

पैरामीटर
exception Throwable

preInvocationSetup

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

पैरामीटर
info IBuildInfo

attributes MultiMap

थ्रो
DeviceNotAvailableException
TargetSetupError

pullDir

public boolean pullDir (String deviceFilePath, 
                File localDir)

पैरामीटर
deviceFilePath String

localDir File

रिटर्न
boolean

थ्रो
DeviceNotAvailableException

pullFile

public boolean pullFile (String remoteFilePath, 
                File localFile)

पैरामीटर
remoteFilePath String

localFile File

रिटर्न
boolean

थ्रो
DeviceNotAvailableException

pullFile

public File pullFile (String remoteFilePath)

पैरामीटर
remoteFilePath String

रिटर्न
File

थ्रो
DeviceNotAvailableException

pullFileContents

public String pullFileContents (String remoteFilePath)

पैरामीटर
remoteFilePath String

रिटर्न
String

थ्रो
DeviceNotAvailableException

pullFileFromExternal

public File pullFileFromExternal (String remoteFilePath)

पैरामीटर
remoteFilePath String

रिटर्न
File

थ्रो
DeviceNotAvailableException

pushDir

public boolean pushDir (File localFileDir, 
                String deviceFilePath, 
                 excludedDirectories)

पैरामीटर
localFileDir File

deviceFilePath String

excludedDirectories

रिटर्न
boolean

थ्रो
DeviceNotAvailableException

pushDir

public boolean pushDir (File localFileDir, 
                String deviceFilePath)

पैरामीटर
localFileDir File

deviceFilePath String

रिटर्न
boolean

थ्रो
DeviceNotAvailableException

pushFile

public boolean pushFile (File localFile, 
                String remoteFilePath)

पैरामीटर
localFile File

remoteFilePath String

रिटर्न
boolean

थ्रो
DeviceNotAvailableException

pushString

public boolean pushString (String contents, 
                String remoteFilePath)

पैरामीटर
contents String

remoteFilePath String

रिटर्न
boolean

थ्रो
DeviceNotAvailableException

फिर से चालू करो

public void reboot (String reason)

पैरामीटर
reason String

थ्रो
DeviceNotAvailableException

फिर से चालू करो

public void reboot ()

थ्रो
DeviceNotAvailableException

rebootIntoBootloader

public void rebootIntoBootloader ()

थ्रो
DeviceNotAvailableException

rebootIntoFastbootd

public void rebootIntoFastbootd ()

थ्रो
DeviceNotAvailableException

rebootIntoRecovery

public void rebootIntoRecovery ()

थ्रो
DeviceNotAvailableException

rebootIntoSideload

public void rebootIntoSideload ()

थ्रो
DeviceNotAvailableException

rebootIntoSideload

public void rebootIntoSideload (boolean autoReboot)

पैरामीटर
autoReboot boolean

थ्रो
DeviceNotAvailableException

rebootUntilOnline

public void rebootUntilOnline ()

थ्रो
DeviceNotAvailableException

rebootUntilOnline

public void rebootUntilOnline (String reason)

पैरामीटर
reason String

थ्रो
DeviceNotAvailableException

rebootUserspace

public void rebootUserspace ()

थ्रो
DeviceNotAvailableException

rebootUserspaceUntilOnline

public void rebootUserspaceUntilOnline ()

थ्रो
DeviceNotAvailableException

recoverDevice

public void recoverDevice ()

डिवाइस के साथ कम्यूनिकेशन को वापस लाने की कोशिश करता है.

थ्रो
DeviceNotAvailableException अगर डिवाइस अब उपलब्ध नहीं है

remountSystemWritable

public void remountSystemWritable ()

थ्रो
DeviceNotAvailableException

remountVendorWritable

public void remountVendorWritable ()

थ्रो
DeviceNotAvailableException

removeAdmin

public boolean removeAdmin (String componentName, 
                int userId)

पैरामीटर
componentName String

userId int

रिटर्न
boolean

थ्रो
DeviceNotAvailableException

removeOwners

public void removeOwners ()

थ्रो
DeviceNotAvailableException

removeUser

public boolean removeUser (int userId)

पैरामीटर
userId int

रिटर्न
boolean

थ्रो
DeviceNotAvailableException

resetContentProviderSetup

public void resetContentProviderSetup ()

कॉन्टेंट प्रोवाइडर सेटअप को फिर से ट्रिगर करने के लिए, फ़्लैग को रीसेट करें.

runInstrumentationTests

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

पैरामीटर
runner IRemoteAndroidTestRunner

listeners ITestLifeCycleReceiver

रिटर्न
boolean

थ्रो
DeviceNotAvailableException

runInstrumentationTests

public boolean runInstrumentationTests (IRemoteAndroidTestRunner runner, 
                 listeners)

पैरामीटर
runner IRemoteAndroidTestRunner

listeners

रिटर्न
boolean

थ्रो
DeviceNotAvailableException

runInstrumentationTestsAsUser

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

पैरामीटर
runner IRemoteAndroidTestRunner

userId int

listeners ITestLifeCycleReceiver

रिटर्न
boolean

थ्रो
DeviceNotAvailableException

runInstrumentationTestsAsUser

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

पैरामीटर
runner IRemoteAndroidTestRunner

userId int

listeners

रिटर्न
boolean

थ्रो
DeviceNotAvailableException

setConfiguration

public void setConfiguration (IConfiguration configuration)

इस्तेमाल में मौजूद IConfiguration को इंजेक्ट करता है.

पैरामीटर
configuration IConfiguration

setDate

public void setDate (Date date)

पैरामीटर
date Date

थ्रो
DeviceNotAvailableException

setDeviceOwner

public boolean setDeviceOwner (String componentName, 
                int userId)

पैरामीटर
componentName String

userId int

रिटर्न
boolean

थ्रो
DeviceNotAvailableException

setDeviceState

public void setDeviceState (TestDeviceState deviceState)

पैरामीटर
deviceState TestDeviceState

setEmulatorOutputStream

public void setEmulatorOutputStream (SizeLimitedOutputStream output)

एमुलेटर के लिए, SizeLimitedOutputStream को आउटपुट को लॉग करने के लिए सेट करें

पैरामीटर
output SizeLimitedOutputStream: आउटपुट को लॉग करने के लिए

setEmulatorProcess

public void setEmulatorProcess (Process p)

पैरामीटर
p Process

setFastbootEnabled

public void setFastbootEnabled (boolean fastbootEnabled)

पैरामीटर
fastbootEnabled boolean

setFastbootPath

public void setFastbootPath (String fastbootPath)

पैरामीटर
fastbootPath String

setIDevice

public void setIDevice (IDevice newDevice)

पैरामीटर
newDevice IDevice

setOptions

public void setOptions (TestDeviceOptions options)

पैरामीटर
options TestDeviceOptions

setProperty

public boolean setProperty (String propKey, 
                String propValue)

पैरामीटर
propKey String

propValue String

रिटर्न
boolean

थ्रो
DeviceNotAvailableException

setRecovery

public void setRecovery (IDeviceRecovery recovery)

पैरामीटर
recovery IDeviceRecovery

setRecoveryMode

public void setRecoveryMode (ITestDevice.RecoveryMode mode)

पैरामीटर
mode ITestDevice.RecoveryMode

setSetting

public void setSetting (String namespace, 
                String key, 
                String value)

पैरामीटर
namespace String

key String

value String

थ्रो
DeviceNotAvailableException

setSetting

public void setSetting (int userId, 
                String namespace, 
                String key, 
                String value)

पैरामीटर
userId int

namespace String

key String

value String

थ्रो
DeviceNotAvailableException

setUseFastbootErase

public void setUseFastbootErase (boolean useFastbootErase)

पैरामीटर
useFastbootErase boolean

startLogcat

public void startLogcat ()

startUser

public boolean startUser (int userId)

पैरामीटर
userId int

रिटर्न
boolean

थ्रो
DeviceNotAvailableException

startUser

public boolean startUser (int userId, 
                boolean waitFlag)

पैरामीटर
userId int

waitFlag boolean

रिटर्न
boolean

थ्रो
DeviceNotAvailableException

stopEmulatorOutput

public void stopEmulatorOutput ()

stopLogcat

public void stopLogcat ()

stopUser

public boolean stopUser (int userId)

पैरामीटर
userId int

रिटर्न
boolean

थ्रो
DeviceNotAvailableException

stopUser

public boolean stopUser (int userId, 
                boolean waitFlag, 
                boolean forceFlag)

पैरामीटर
userId int

waitFlag boolean

forceFlag boolean

रिटर्न
boolean

थ्रो
DeviceNotAvailableException

switchToAdbTcp

public String switchToAdbTcp ()

रिटर्न
String

थ्रो
DeviceNotAvailableException

switchToAdbUsb

public boolean switchToAdbUsb ()

रिटर्न
boolean

थ्रो
DeviceNotAvailableException

switchUser

public boolean switchUser (int userId)

पैरामीटर
userId int

रिटर्न
boolean

थ्रो
DeviceNotAvailableException

switchUser

public boolean switchUser (int userId, 
                long timeout)

पैरामीटर
userId int

timeout long

रिटर्न
boolean

थ्रो
DeviceNotAvailableException

syncFiles

public boolean syncFiles (File localFileDir, 
                String deviceFilePath)

पैरामीटर
localFileDir File

deviceFilePath String

रिटर्न
boolean

थ्रो
DeviceNotAvailableException

takeBugreport

public Bugreport takeBugreport ()

रिटर्न
Bugreport

unencryptDevice

public boolean unencryptDevice ()

रिटर्न
boolean

थ्रो
DeviceNotAvailableException

uninstallPackage

public String uninstallPackage (String packageName)

पैरामीटर
packageName String

रिटर्न
String

थ्रो
DeviceNotAvailableException

uninstallPackageForUser

public String uninstallPackageForUser (String packageName, 
                int userId)

पैरामीटर
packageName String

userId int

रिटर्न
String

थ्रो
DeviceNotAvailableException

unlockDevice

public boolean unlockDevice ()

रिटर्न
boolean

थ्रो
DeviceNotAvailableException

waitForBootComplete

public boolean waitForBootComplete (long timeOut)

पैरामीटर
timeOut long

रिटर्न
boolean

थ्रो
DeviceNotAvailableException

waitForDeviceAvailable

public void waitForDeviceAvailable ()

थ्रो
DeviceNotAvailableException

waitForDeviceAvailable

public void waitForDeviceAvailable (long waitTime)

पैरामीटर
waitTime long

थ्रो
DeviceNotAvailableException

waitForDeviceInRecovery

public boolean waitForDeviceInRecovery (long waitTime)

पैरामीटर
waitTime long

रिटर्न
boolean

waitForDeviceInSideload

public boolean waitForDeviceInSideload (long waitTime)

पैरामीटर
waitTime long

रिटर्न
boolean

waitForDeviceNotAvailable

public boolean waitForDeviceNotAvailable (long waitTime)

पैरामीटर
waitTime long

रिटर्न
boolean

waitForDeviceOnline

public void waitForDeviceOnline ()

थ्रो
DeviceNotAvailableException

waitForDeviceOnline

public void waitForDeviceOnline (long waitTime)

पैरामीटर
waitTime long

थ्रो
DeviceNotAvailableException

waitForDeviceShell

public boolean waitForDeviceShell (long waitTime)

पैरामीटर
waitTime long

रिटर्न
boolean

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

checkApiLevelAgainst

protected void checkApiLevelAgainst (String feature, 
                int strictMinLevel)

पैरामीटर
feature String

strictMinLevel int

createRebootDeviceAction

protected NativeDevice.RebootDeviceAction createRebootDeviceAction (NativeDevice.RebootMode rebootMode, 
                String reason)

रीबूट करने की कार्रवाई करते समय इस्तेमाल करने के लिए, RebootDeviceAction बनाएं.

पैरामीटर
rebootMode NativeDevice.RebootMode: रीबूट का मोड.

reason String: इस रीबूट के लिए.

रिटर्न
NativeDevice.RebootDeviceAction RebootDeviceAction बनाया गया.

doAdbReboot

protected void doAdbReboot (NativeDevice.RebootMode rebootMode, 
                String reason)

adb reboot करें.

पैरामीटर
rebootMode NativeDevice.RebootMode: रीबूट का मोड.

reason String: इस रीबूट के लिए.

थ्रो
DeviceNotAvailableException

ensureRuntimePermissionSupported

protected void ensureRuntimePermissionSupported ()

रनटाइम की अनुमति काम न करने पर, अपवाद दिखाने के लिए हेल्पर तरीका

थ्रो
DeviceNotAvailableException

getBugreportInternal

protected InputStreamSource getBugreportInternal ()

रिटर्न
InputStreamSource

getBugreportzInternal

protected File getBugreportzInternal ()

bugreportz की zip फ़ाइल को ERROR(/File) के तौर पर पाने के लिए, इंटरनल हेल्पर का तरीका.

रिटर्न
File

getRunUtil

protected IRunUtil getRunUtil ()

इस्तेमाल करने के लिए RunUtil इंस्टेंस पाएं.

रिटर्न
IRunUtil

internalGetProperty

protected String internalGetProperty (String propName, 
                String fastbootVar, 
                String description)

डिफ़ॉल्ट रूप से, ddmlib कैश मेमोरी से डिवाइस की प्रॉपर्टी फ़ेच करें. साथ ही, डिवाइस के फ़ास्टबूट मोड में होने या न होने के आधार पर, `adb shell getprop` या `fastboot getvar` में से किसी एक का इस्तेमाल करें.

पैरामीटर
propName String: डिवाइस प्रॉपर्टी का नाम, जैसा कि `adb shell getprop` से मिलता है

fastbootVar String: क्वेरी करने के लिए, मिलते-जुलते fastboot वैरिएबल का नाम. अगर null है, तो fastboot क्वेरी की कोशिश नहीं की जाएगी

description String: वैरिएबल के बारे में आसान जानकारी. पहले अक्षर को कैपिटल में रखें.

रिटर्न
String null या खाली हो सकती है. इसमें दी गई प्रॉपर्टी की वैल्यू होती है

थ्रो
DeviceNotAvailableException

isNewer

protected boolean isNewer (File localFile, 
                IFileEntry entry)

अगर लोकल फ़ाइल, रिमोट फ़ाइल से नई है, तो true दिखाएं. IFileEntry के लिए, समय की जानकारी मिनट तक सटीक होनी चाहिए. अगर दोनों फ़ाइलों के लिए समय की जानकारी एक जैसी है, तो नई फ़ाइल को प्राथमिकता दी जाएगी.

पैरामीटर
localFile File

entry IFileEntry

रिटर्न
boolean

performDeviceAction

protected boolean performDeviceAction (String actionDescription, 
                com.android.tradefed.device.NativeDevice.DeviceAction action, 
                int retryAttempts)

इस डिवाइस पर कोई कार्रवाई करता है. डिवाइस को वापस पाने की कोशिश करता है. अगर कार्रवाई पूरी नहीं होती है, तो डिवाइस को वापस पाने के लिए, कमांड को फिर से आज़माने का विकल्प भी दिया जाता है.

पैरामीटर
actionDescription String: की जाने वाली कार्रवाई के बारे में कम शब्दों में जानकारी. इसका इस्तेमाल सिर्फ़ लॉग करने के लिए किया जाता है.

action com.android.tradefed.device.NativeDevice.DeviceAction: की जाने वाली कार्रवाई

retryAttempts int: अगर कार्रवाई पूरी नहीं हो पाती है, तो फिर से कोशिश की जाती है, लेकिन रिकवरी पूरी हो जाती है

रिटर्न
boolean true अगर कार्रवाई पूरी हो गई है

थ्रो
DeviceNotAvailableException अगर खाता वापस पाने की कोशिश पूरी नहीं होती है या ज़्यादा से ज़्यादा कोशिश करने के बाद भी खाता वापस नहीं मिलता है

postAdbReboot

protected void postAdbReboot ()

रीबूट करने के बाद की जा सकने वाली अतिरिक्त कार्रवाइयां.

थ्रो
DeviceNotAvailableException

prePostBootSetup

protected void prePostBootSetup ()

इससे हर डिवाइस टाइप (AndroidNativeDevice, TestDevice) को, बूट के बाद किए जाने वाले किसी खास सेटअप के लिए, इस तरीके को बदलने की अनुमति मिलती है.

थ्रो
DeviceNotAvailableException

setClock

protected void setClock (Clock clock)

इस्तेमाल करने के लिए, Clock का इंस्टेंस सेट करें.

पैरामीटर
clock Clock

setLogStartDelay

protected void setLogStartDelay (int delay)

ऑनलाइन डिवाइस के लिए, logcat कैप्चर शुरू करने से पहले इंतज़ार करने के लिए, समय को मिलीसेकंड में सेट करता है.

पैरामीटर
delay int: देरी, मिलीसेकंड में

waitForDeviceNotAvailable

protected void waitForDeviceNotAvailable (String operationDesc, 
                long time)

पैरामीटर
operationDesc String

time long