Dispositivo nativo

public class NativeDevice
extends Object implements IManagedTestDevice, IConfigurationReceiver

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


Implementazione predefinita di un ITestDevice stack non completa dispositivi Android.

Riepilogo

Classi nidificate

class NativeDevice.AdbAction

Un DeviceAction per l'esecuzione di un comando di OS 'adb ....'.

class NativeDevice.AdbShellAction

class NativeDevice.RebootDeviceAction

DeviceAction per il riavvio di un dispositivo.

enum NativeDevice.RebootMode

Una modalità di riavvio.

costanti

int INVALID_USER_ID

Valore restituito per qualsiasi ID utente non valido/non trovato: UserHandle ha definito il valore -10000

long MAX_HOST_DEVICE_TIME_OFFSET

int MAX_RETRY_ATTEMPTS

il numero predefinito di tentativi di ripetizione del comando da eseguire

Campi

protected static final String SD_CARD

protected static final String STORAGE_EMULATED

protected TestDeviceOptions mOptions

protected final IDeviceStateMonitor mStateMonitor

Costruttori pubblici

NativeDevice (IDevice device, IDeviceStateMonitor stateMonitor, IDeviceMonitor allocationMonitor)

Crea un TestDevice .

Metodi pubblici

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 ()

Il registro che contiene tutte le executeShellCommand(String) i registri.

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)

Aiutante non ufficiale per ottenere un FileEntry da un percorso non-root.

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)

Elabora il DeviceEvent, che può o meno trasferire questo dispositivo a un nuovo stato di allocazione.

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 ()

Sostituisci se il dispositivo necessita di alcune azioni specifiche da eseguire dopo adb root e prima che il dispositivo torni online.

void postAdbUnrootAction ()

Eseguire l'override se il dispositivo necessita di alcune azioni specifiche da intraprendere dopo l'annullamento di adb e prima che il dispositivo torni online.

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) 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 ()

Tentativi di ripristinare la comunicazione del dispositivo.

void remountSystemWritable ()

void remountVendorWritable ()

boolean removeAdmin (String componentName, int userId)

void removeOwners ()

boolean removeUser (int userId)

void resetContentProviderSetup ()

Reimposta il flag per l'impostazione del provider di contenuti per attivarlo nuovamente.

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

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

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

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

void setConfiguration ( IConfiguration configuration)

Inietta IConfiguration in uso.

void setDate (Date date)

boolean setDeviceOwner (String componentName, int userId)

void setDeviceState (TestDeviceState deviceState)

void setEmulatorOutputStream ( SizeLimitedOutputStream output)

Per emulatore set SizeLimitedOutputStream per accedere uscita

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)

Metodi protetti

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

Creare un RebootDeviceAction da utilizzare durante l'esecuzione di un'azione di ripartenza.

void doAdbReboot ( NativeDevice.RebootMode rebootMode, String reason)

Eseguire un riavvio adb.

void ensureRuntimePermissionSupported ()

metodo di supporto per generare un'eccezione se l'autorizzazione di runtime non è supportata

InputStreamSource getBugreportInternal ()
File getBugreportzInternal ()

Metodo di supporto interno per ottenere il file zip bugreportz come ERROR(/File) .

IRunUtil getRunUtil ()

Prendi il RunUtil esempio per l'uso.

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

Recupera una proprietà del dispositivo, dalla cache ddmlib per impostazione predefinita, e ritorna a `adb shell getprop` o `fastboot getvar` a seconda che il dispositivo sia in Fastboot o meno.

boolean isNewer (File localFile, IFileEntry entry)

Restituisce true se il file locale è più recente del file remoto.

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

Esegue un'azione su questo dispositivo.

void postAdbReboot ()

Possibili azioni aggiuntive che possono essere intraprese dopo un riavvio.

void prePostBootSetup ()

Consente a ogni tipo di dispositivo (AndroidNativeDevice, TestDevice) di sovrascrivere questo metodo per una configurazione post-avvio specifica.

void setClock (Clock clock)

Imposta l'istanza di Clock da utilizzare.

void setLogStartDelay (int delay)

Imposta il tempo in ms di attesa prima di avviare l'acquisizione di logcat per un dispositivo online.

void waitForDeviceNotAvailable (String operationDesc, long time)

costanti

INVALID_USER_ID

public static final int INVALID_USER_ID

Valore restituito per qualsiasi ID utente non valido/non trovato: UserHandle ha definito il valore -10000

Valore costante: -10000 (0xffffd8f0)

MAX_HOST_DEVICE_TIME_OFFSET

protected static final long MAX_HOST_DEVICE_TIME_OFFSET

Valore costante: 5000 (0x0000000000001388)

MAX_RETRY_ATTEMPTS

protected static final int MAX_RETRY_ATTEMPTS

il numero predefinito di tentativi di ripetizione del comando da eseguire

Valore costante: 2 (0x00000002)

Campi

SCHEDA SD

protected static final String SD_CARD

STORAGE_EMULATA

protected static final String STORAGE_EMULATED

mOpzioni

protected TestDeviceOptions mOptions

mStateMonitor

protected final IDeviceStateMonitor mStateMonitor

Costruttori pubblici

Dispositivo nativo

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

Crea un TestDevice .

Parametri
device IDevice : The Associated IDevice

stateMonitor IDeviceStateMonitor : IDeviceStateMonitor meccanismo per uso

allocationMonitor IDeviceMonitor : IDeviceMonitor per informare di cambiamenti di stato di allocazione. Può essere nullo

Metodi pubblici

checkApiLevelAgainstNextRelease

public boolean checkApiLevelAgainstNextRelease (int strictMinLevel)

Parametri
strictMinLevel int

ritorna
boolean

tiri
DeviceNotAvailableException

checkConnettività

public boolean checkConnectivity ()

ritorna
boolean

tiri
DeviceNotAvailableException

clearErrorDialogs

public boolean clearErrorDialogs ()

ritorna
boolean

tiri
DeviceNotAvailableException

clearLastConnectedWifiNetwork

public void clearLastConnectedWifiNetwork ()

clearLogcat

public void clearLogcat ()

connetti alla rete Wi-Fi

public boolean connectToWifiNetwork (String wifiSsid, 
                String wifiPsk)

Parametri
wifiSsid String

wifiPsk String

ritorna
boolean

tiri
DeviceNotAvailableException

connetti alla rete Wi-Fi

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

Parametri
wifiSsid String

wifiPsk String

scanSsid boolean

ritorna
boolean

tiri
DeviceNotAvailableException

connectToWifiNetworkIfNeeded

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

Parametri
wifiSsid String

wifiPsk String

scanSsid boolean

ritorna
boolean

tiri
DeviceNotAvailableException

connectToWifiNetworkIfNeeded

public boolean connectToWifiNetworkIfNeeded (String wifiSsid, 
                String wifiPsk)

Parametri
wifiSsid String

wifiPsk String

ritorna
boolean

tiri
DeviceNotAvailableException

creare un utente

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

Parametri
name String

guest boolean

ephemeral boolean

ritorna
int

tiri
DeviceNotAvailableException

creare un utente

public int createUser (String name)

Parametri
name String

ritorna
int

tiri
DeviceNotAvailableException

createUserNoThrow

public int createUserNoThrow (String name)

Parametri
name String

ritorna
int

tiri
DeviceNotAvailableException

cancella il file

public void deleteFile (String deviceFilePath)

Parametri
deviceFilePath String

tiri
DeviceNotAvailableException

dispositivoSoftRestarted

public boolean deviceSoftRestarted (ProcessInfo prevSystemServerProcess)

Parametri
prevSystemServerProcess ProcessInfo

ritorna
boolean

tiri
DeviceNotAvailableException

deviceSoftRestartedSince

public boolean deviceSoftRestartedSince (long utcEpochTime, 
                TimeUnit timeUnit)

Parametri
utcEpochTime long

timeUnit TimeUnit

ritorna
boolean

tiri
DeviceNotAvailableException

disabilita AdbRoot

public boolean disableAdbRoot ()

ritorna
boolean

tiri
DeviceNotAvailableException

disabilita il blocco tastiera

public void disableKeyguard ()

tiri
DeviceNotAvailableException

disabilita il monitor di rete

public boolean disableNetworkMonitor ()

ritorna
boolean

tiri
DeviceNotAvailableException

disconnettereDaWifi

public boolean disconnectFromWifi ()

ritorna
boolean

tiri
DeviceNotAvailableException

il file esiste?

public boolean doesFileExist (String deviceFilePath)

Parametri
deviceFilePath String

ritorna
boolean

tiri
DeviceNotAvailableException

dumpHeap

public File dumpHeap (String process, 
                String devicePath)

Parametri
process String

devicePath String

ritorna
File

tiri
DeviceNotAvailableException

enableAdbRoot

public boolean enableAdbRoot ()

ritorna
boolean

tiri
DeviceNotAvailableException

enableNetworkMonitor

public boolean enableNetworkMonitor ()

ritorna
boolean

tiri
DeviceNotAvailableException

encryptDevice

public boolean encryptDevice (boolean inplace)

Parametri
inplace boolean

ritorna
boolean

tiri
DeviceNotAvailableException

eseguiAdbCommand

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

Parametri
timeout long

cmdArgs String

ritorna
String

tiri
DeviceNotAvailableException

eseguiAdbCommand

public String executeAdbCommand (String... cmdArgs)

Parametri
cmdArgs String

ritorna
String

tiri
DeviceNotAvailableException

eseguiComandoFastboot

public CommandResult executeFastbootCommand (String... cmdArgs)

Parametri
cmdArgs String

ritorna
CommandResult

tiri
DeviceNotAvailableException

eseguiComandoFastboot

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

Parametri
timeout long

cmdArgs String

ritorna
CommandResult

tiri
DeviceNotAvailableException

executeLongFastbootCommand

public CommandResult executeLongFastbootCommand (String... cmdArgs)

Parametri
cmdArgs String

ritorna
CommandResult

tiri
DeviceNotAvailableException

eseguiShellCommand

public String executeShellCommand (String command)

Parametri
command String

ritorna
String

tiri
DeviceNotAvailableException

eseguiShellCommand

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

Parametri
command String

receiver IShellOutputReceiver

maxTimeToOutputShellResponse long

timeUnit TimeUnit

retryAttempts int

tiri
DeviceNotAvailableException

eseguiShellCommand

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

Parametri
command String

receiver IShellOutputReceiver

maxTimeoutForCommand long

maxTimeToOutputShellResponse long

timeUnit TimeUnit

retryAttempts int

tiri
DeviceNotAvailableException

eseguiShellCommand

public void executeShellCommand (String command, 
                IShellOutputReceiver receiver)

Parametri
command String

receiver IShellOutputReceiver

tiri
DeviceNotAvailableException

eseguiShellV2Command

public CommandResult executeShellV2Command (String cmd)

Parametri
cmd String

ritorna
CommandResult

tiri
DeviceNotAvailableException

eseguiShellV2Command

public CommandResult executeShellV2Command (String cmd, 
                OutputStream pipeToOutput)

Parametri
cmd String

pipeToOutput OutputStream

ritorna
CommandResult

tiri
DeviceNotAvailableException

eseguiShellV2Command

public CommandResult executeShellV2Command (String cmd, 
                File pipeAsInput)

Parametri
cmd String

pipeAsInput File

ritorna
CommandResult

tiri
DeviceNotAvailableException

eseguiShellV2Command

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

Parametri
cmd String

maxTimeoutForCommand long

timeUnit TimeUnit

retryAttempts int

ritorna
CommandResult

tiri
DeviceNotAvailableException

eseguiShellV2Command

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

Parametri
cmd String

maxTimeoutForCommand long

timeUnit TimeUnit

ritorna
CommandResult

tiri
DeviceNotAvailableException

eseguiShellV2Command

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

Parametri
cmd String

pipeAsInput File

pipeToOutput OutputStream

maxTimeoutForCommand long

timeUnit TimeUnit

retryAttempts int

ritorna
CommandResult

tiri
DeviceNotAvailableException

eseguiShellV2Command

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

Parametri
cmd String

pipeAsInput File

pipeToOutput OutputStream

pipeToError OutputStream

maxTimeoutForCommand long

timeUnit TimeUnit

retryAttempts int

ritorna
CommandResult

tiri
DeviceNotAvailableException

fastbootWipePartition

public CommandResult fastbootWipePartition (String partition)

Parametri
partition String

ritorna
CommandResult

tiri
DeviceNotAvailableException

getActiveApex

public  getActiveApexes ()

ritorna

tiri
DeviceNotAvailableException

getAllSettings

public  getAllSettings (String namespace)

Parametri
namespace String

ritorna

tiri
DeviceNotAvailableException

getAllocationState

public DeviceAllocationState getAllocationState ()

ritorna
DeviceAllocationState

getAndroidId

public String getAndroidId (int userId)

Parametri
userId int

ritorna
String

tiri
DeviceNotAvailableException

ottieni ID Android

public  getAndroidIds ()

ritorna

tiri
DeviceNotAvailableException

getApiLevel

public int getApiLevel ()

ritorna
int

tiri
DeviceNotAvailableException

getAppPackageInfo

public PackageInfo getAppPackageInfo (String packageName)

Parametri
packageName String

ritorna
PackageInfo

tiri
DeviceNotAvailableException

getAppPackageInfos

public  getAppPackageInfos ()

ritorna

tiri
DeviceNotAvailableException

getBasebandVersion

public String getBasebandVersion ()

ritorna
String

tiri
DeviceNotAvailableException

getBattery

public Integer getBattery ()

ritorna
Integer

getBooleanProperty

public boolean getBooleanProperty (String name, 
                boolean defaultValue)

Parametri
name String

defaultValue boolean

ritorna
boolean

tiri
DeviceNotAvailableException

getBootHistory

public  getBootHistory ()

ritorna

tiri
DeviceNotAvailableException

getBootHistorySince

public  getBootHistorySince (long utcEpochTime, 
                TimeUnit timeUnit)

Parametri
utcEpochTime long

timeUnit TimeUnit

ritorna

tiri
DeviceNotAvailableException

getBootloaderVersion

public String getBootloaderVersion ()

ritorna
String

tiri
DeviceNotAvailableException

getBugreport

public InputStreamSource getBugreport ()

ritorna
InputStreamSource

getBugreportz

public InputStreamSource getBugreportz ()

ritorna
InputStreamSource

getBuildAlias

public String getBuildAlias ()

ritorna
String

tiri
DeviceNotAvailableException

getBuildFlavor

public String getBuildFlavor ()

ritorna
String

tiri
DeviceNotAvailableException

getBuildId

public String getBuildId ()

ritorna
String

tiri
DeviceNotAvailableException

getBuildSigningKeys

public String getBuildSigningKeys ()

ritorna
String

tiri
DeviceNotAvailableException

getCachedDeviceDescriptor

public DeviceDescriptor getCachedDeviceDescriptor ()

ritorna
DeviceDescriptor

getChildren

public String[] getChildren (String path)

Parametri
path String

ritorna
String[]

tiri
DeviceNotAvailableException

getCurrentFoldableState

public DeviceFoldableState getCurrentFoldableState ()

ritorna
DeviceFoldableState

tiri
DeviceNotAvailableException

getCurrentUser

public int getCurrentUser ()

ritorna
int

tiri
DeviceNotAvailableException

getDeviceClass

public String getDeviceClass ()

ritorna
String

getDeviceDate

public long getDeviceDate ()

ritorna
long

tiri
DeviceNotAvailableException

getDeviceDescriptor

public DeviceDescriptor getDeviceDescriptor ()

ritorna
DeviceDescriptor

getDeviceState

public TestDeviceState getDeviceState ()

ritorna
TestDeviceState

getDeviceTimeOffset

public long getDeviceTimeOffset (Date date)

Parametri
date Date

ritorna
long

tiri
DeviceNotAvailableException

getEmulatorOutput

public InputStreamSource getEmulatorOutput ()

ritorna
InputStreamSource

getEmulatorProcess

public Process getEmulatorProcess ()

ritorna
Process

getExecuteShellCommandLog

public final File getExecuteShellCommandLog ()

Il registro che contiene tutte le executeShellCommand(String) i registri.

ritorna
File

getExternalStoreFreeSpace

public long getExternalStoreFreeSpace ()

ritorna
long

tiri
DeviceNotAvailableException

getFastbootPath

public String getFastbootPath ()

ritorna
String

getFastbootProductType

public String getFastbootProductType ()

ritorna
String

tiri
DeviceNotAvailableException

getFastbootProductVariant

public String getFastbootProductVariant ()

ritorna
String

tiri
DeviceNotAvailableException

getFastbootSerialNumber

public String getFastbootSerialNumber ()

ritorna
String

getFastbootVariable

public String getFastbootVariable (String variableName)

Parametri
variableName String

ritorna
String

tiri
DeviceNotAvailableException

getFastbootVersion

public String getFastbootVersion ()

ritorna
String

getFileEntry

public IFileEntry getFileEntry (String path)

Parametri
path String

ritorna
IFileEntry

tiri
DeviceNotAvailableException

getFileEntry

public IFileEntry getFileEntry (FileListingService.FileEntry entry)

Aiutante non ufficiale per ottenere un FileEntry da un percorso non-root. FIXME: Refactoring il sistema FileEntry per averlo disponibile da qualsiasi percorso. (anche senza radice).

Parametri
entry FileListingService.FileEntry : un FileEntry non necessariamente radice richiede Ddmlib.

ritorna
IFileEntry un FileEntryWrapper rappresenta il FileEntry.

tiri
DeviceNotAvailableException

getFoldableStates

public  getFoldableStates ()

ritorna

tiri
DeviceNotAvailableException

getIDevice

public IDevice getIDevice ()

ritorna
IDevice

getInstalledPackageNames

public  getInstalledPackageNames ()

ritorna

tiri
DeviceNotAvailableException

getIntProperty

public long getIntProperty (String name, 
                long defaultValue)

Parametri
name String

defaultValue long

ritorna
long

tiri
DeviceNotAvailableException

getIpAddress

public String getIpAddress ()

ritorna
String

tiri
DeviceNotAvailableException

getKeyguardState

public KeyguardControllerState getKeyguardState ()

ritorna
KeyguardControllerState

tiri
DeviceNotAvailableException

getLastExpectedRebootTimeMillis

public long getLastExpectedRebootTimeMillis ()

ritorna
long

getLaunchApiLevel

public int getLaunchApiLevel ()

ritorna
int

tiri
DeviceNotAvailableException

getLogcat

public InputStreamSource getLogcat ()

ritorna
InputStreamSource

getLogcat

public InputStreamSource getLogcat (int maxBytes)

Parametri
maxBytes int

ritorna
InputStreamSource

getLogcatDump

public InputStreamSource getLogcatDump ()

ritorna
InputStreamSource

getLogcatSince

public InputStreamSource getLogcatSince (long date)

Parametri
date long

ritorna
InputStreamSource

getMacAddress

public String getMacAddress ()

ritorna
String

getMainlineModuleInfo

public  getMainlineModuleInfo ()

ritorna

tiri
DeviceNotAvailableException

getMaxNumberOfRunningUsersSupported

public int getMaxNumberOfRunningUsersSupported ()

ritorna
int

tiri
DeviceNotAvailableException

getMaxNumberOfUsersSupported

public int getMaxNumberOfUsersSupported ()

ritorna
int

tiri
DeviceNotAvailableException

getMonitor

public IDeviceStateMonitor getMonitor ()

ritorna
IDeviceStateMonitor

getMountPoint

public String getMountPoint (String mountName)

Parametri
mountName String

ritorna
String

getMountPointInfo

public ITestDevice.MountPointInfo getMountPointInfo (String mountpoint)

Parametri
mountpoint String

ritorna
ITestDevice.MountPointInfo

tiri
DeviceNotAvailableException

getMountPointInfo

public  getMountPointInfo ()

ritorna

tiri
DeviceNotAvailableException

getOpzioni

public TestDeviceOptions getOptions ()

ritorna
TestDeviceOptions

getPartitionFreeSpace

public long getPartitionFreeSpace (String partition)

Parametri
partition String

ritorna
long

tiri
DeviceNotAvailableException

getPrimaryUserId

public Integer getPrimaryUserId ()

ritorna
Integer

tiri
DeviceNotAvailableException

getProcessByName

public ProcessInfo getProcessByName (String processName)

Parametri
processName String

ritorna
ProcessInfo

tiri
DeviceNotAvailableException

getProcessPid

public String getProcessPid (String process)

Parametri
process String

ritorna
String

tiri
DeviceNotAvailableException

getTipo di prodotto

public String getProductType ()

ritorna
String

tiri
DeviceNotAvailableException

getProductVariant

public String getProductVariant ()

ritorna
String

tiri
DeviceNotAvailableException

getProperty

public String getProperty (String name)

Parametri
name String

ritorna
String

tiri
DeviceNotAvailableException

getRecoveryMode

public ITestDevice.RecoveryMode getRecoveryMode ()

ritorna
ITestDevice.RecoveryMode

ottieni Screenshot

public InputStreamSource getScreenshot (String format)

Parametri
format String

ritorna
InputStreamSource

tiri
DeviceNotAvailableException

ottieni Screenshot

public InputStreamSource getScreenshot (long displayId)

Parametri
displayId long

ritorna
InputStreamSource

tiri
DeviceNotAvailableException

ottieni Screenshot

public InputStreamSource getScreenshot (String format, 
                boolean rescale)

Parametri
format String

rescale boolean

ritorna
InputStreamSource

tiri
DeviceNotAvailableException

ottieni Screenshot

public InputStreamSource getScreenshot ()

ritorna
InputStreamSource

tiri
DeviceNotAvailableException

getSerialNumber

public String getSerialNumber ()

ritorna
String

getSetting

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

Parametri
userId int

namespace String

key String

ritorna
String

tiri
DeviceNotAvailableException

getSetting

public String getSetting (String namespace, 
                String key)

Parametri
namespace String

key String

ritorna
String

tiri
DeviceNotAvailableException

getSimOperator

public String getSimOperator ()

ritorna
String

getSimState

public String getSimState ()

ritorna
String

getTombstones

public  getTombstones ()

ritorna

tiri
DeviceNotAvailableException

getTotalMemory

public long getTotalMemory ()

ritorna
long

getUninstallablePackageNames

public  getUninstallablePackageNames ()

ritorna

tiri
DeviceNotAvailableException

getUseFastbootErase

public boolean getUseFastbootErase ()

ritorna
boolean

getUserFlags

public int getUserFlags (int userId)

Parametri
userId int

ritorna
int

tiri
DeviceNotAvailableException

getUserInfos

public  getUserInfos ()

ritorna

tiri
DeviceNotAvailableException

getUserSerialNumber

public int getUserSerialNumber (int userId)

Parametri
userId int

ritorna
int

tiri
DeviceNotAvailableException

handleAllocationEvent

public IManagedTestDevice.DeviceEventResponse handleAllocationEvent (DeviceEvent event)

Elabora il DeviceEvent, che può o meno trasferire questo dispositivo a un nuovo stato di allocazione.

Parametri
event DeviceEvent

ritorna
IManagedTestDevice.DeviceEventResponse

haCaratteristica

public boolean hasFeature (String feature)

Parametri
feature String

ritorna
boolean

tiri
DeviceNotAvailableException

pacchetto di installazione

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

Parametri
packageFile File

reinstall boolean

extraArgs String

ritorna
String

tiri
DeviceNotAvailableException

pacchetto di installazione

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

Parametri
packageFile File

reinstall boolean

grantPermissions boolean

extraArgs String

ritorna
String

tiri
DeviceNotAvailableException

installPackageForUser

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

Parametri
packageFile File

reinstall boolean

userId int

extraArgs String

ritorna
String

tiri
DeviceNotAvailableException

installPackageForUser

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

Parametri
packageFile File

reinstall boolean

grantPermissions boolean

userId int

extraArgs String

ritorna
String

tiri
DeviceNotAvailableException

isAdbRoot

public boolean isAdbRoot ()

ritorna
boolean

tiri
DeviceNotAvailableException

isAdbTcp

public boolean isAdbTcp ()

ritorna
boolean

isAppEnumerationSupported

public boolean isAppEnumerationSupported ()

ritorna
boolean

tiri
DeviceNotAvailableException

isDeviceEncrypted

public boolean isDeviceEncrypted ()

ritorna
boolean

tiri
DeviceNotAvailableException

isDirectory

public boolean isDirectory (String path)

Parametri
path String

ritorna
boolean

tiri
DeviceNotAvailableException

isEnableAdbRoot

public boolean isEnableAdbRoot ()

ritorna
boolean true se adb root dovrebbe essere abilitato sul dispositivo

isEncryptionSupported

public boolean isEncryptionSupported ()

ritorna
boolean

tiri
DeviceNotAvailableException

è eseguibile

public boolean isExecutable (String fullPath)

Parametri
fullPath String

ritorna
boolean

tiri
DeviceNotAvailableException

isFastbootEnabled

public boolean isFastbootEnabled ()

ritorna
boolean

isHeadless

public boolean isHeadless ()

ritorna
boolean

tiri
DeviceNotAvailableException

isMultiUserSupported

public boolean isMultiUserSupported ()

ritorna
boolean

tiri
DeviceNotAvailableException

isPackageInstalled

public boolean isPackageInstalled (String packageName, 
                String userId)

Parametri
packageName String

userId String

ritorna
boolean

tiri
DeviceNotAvailableException

isPackageInstalled

public boolean isPackageInstalled (String packageName)

Parametri
packageName String

ritorna
boolean

tiri
DeviceNotAvailableException

isRuntimePermissionSupported

public boolean isRuntimePermissionSupported ()

ritorna
boolean

tiri
DeviceNotAvailableException

isStateBootloaderOrFastbootd

public boolean isStateBootloaderOrFastbootd ()

ritorna
boolean

isUserRunning

public boolean isUserRunning (int userId)

Parametri
userId int

ritorna
boolean

tiri
DeviceNotAvailableException

isUserSecondary

public boolean isUserSecondary (int userId)

Parametri
userId int

ritorna
boolean

tiri
DeviceNotAvailableException

isWifiEnabled

public boolean isWifiEnabled ()

ritorna
boolean

tiri
DeviceNotAvailableException

listDisplayIds

public  listDisplayIds ()

ritorna

tiri
DeviceNotAvailableException

listUsers

public  listUsers ()

ritorna

tiri
DeviceNotAvailableException

log Bugreport

public boolean logBugreport (String dataName, 
                ITestLogger listener)

Parametri
dataName String

listener ITestLogger

ritorna
boolean

logOnDevice

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

Parametri
tag String

level Log.LogLevel

format String

args Object

nonBlockingReboot

public void nonBlockingReboot ()

tiri
DeviceNotAvailableException

postAdbRootAction

public void postAdbRootAction ()

Sostituisci se il dispositivo necessita di alcune azioni specifiche da eseguire dopo adb root e prima che il dispositivo torni online. L'implementazione predefinita non include alcuna azione aggiuntiva. Adb root non è garantito per essere abilitato in questa fase.

tiri
DeviceNotAvailableException

postAdbUnrootAction

public void postAdbUnrootAction ()

Eseguire l'override se il dispositivo necessita di alcune azioni specifiche da intraprendere dopo l'annullamento di adb e prima che il dispositivo torni online. L'implementazione predefinita non include azioni aggiuntive. Adb root non è garantito per essere disabilitato in questa fase.

tiri
DeviceNotAvailableException

postBootSetup

public void postBootSetup ()

tiri
DeviceNotAvailableException

postInvocazioneTearDown

public void postInvocationTearDown (Throwable exception)

Parametri
exception Throwable

preInvocationSetup

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

Parametri
info IBuildInfo

attributes MultiMap

tiri
DeviceNotAvailableException
TargetSetupError

pullDir

public boolean pullDir (String deviceFilePath, 
                File localDir)

Parametri
deviceFilePath String

localDir File

ritorna
boolean

tiri
DeviceNotAvailableException

pullFile

public boolean pullFile (String remoteFilePath, 
                File localFile)

Parametri
remoteFilePath String

localFile File

ritorna
boolean

tiri
DeviceNotAvailableException

pullFile

public File pullFile (String remoteFilePath)

Parametri
remoteFilePath String

ritorna
File

tiri
DeviceNotAvailableException

pullFileContents

public String pullFileContents (String remoteFilePath)

Parametri
remoteFilePath String

ritorna
String

tiri
DeviceNotAvailableException

pullFileFromExternal

public File pullFileFromExternal (String remoteFilePath)

Parametri
remoteFilePath String

ritorna
File

tiri
DeviceNotAvailableException

pushDir

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

Parametri
localFileDir File

deviceFilePath String

excludedDirectories

ritorna
boolean

tiri
DeviceNotAvailableException

pushDir

public boolean pushDir (File localFileDir, 
                String deviceFilePath)

Parametri
localFileDir File

deviceFilePath String

ritorna
boolean

tiri
DeviceNotAvailableException

pushFile

public boolean pushFile (File localFile, 
                String remoteFilePath)

Parametri
localFile File

remoteFilePath String

ritorna
boolean

tiri
DeviceNotAvailableException

pushString

public boolean pushString (String contents, 
                String remoteFilePath)

Parametri
contents String

remoteFilePath String

ritorna
boolean

tiri
DeviceNotAvailableException

riavviare

public void reboot (String reason)

Parametri
reason String

tiri
DeviceNotAvailableException

riavviare

public void reboot ()

tiri
DeviceNotAvailableException

rebootIntoBootloader

public void rebootIntoBootloader ()

tiri
DeviceNotAvailableException

rebootIntoFastbootd

public void rebootIntoFastbootd ()

tiri
DeviceNotAvailableException

rebootIntoRecovery

public void rebootIntoRecovery ()

tiri
DeviceNotAvailableException

rebootIntoSideload

public void rebootIntoSideload ()

tiri
DeviceNotAvailableException

rebootIntoSideload

public void rebootIntoSideload (boolean autoReboot)

Parametri
autoReboot boolean

tiri
DeviceNotAvailableException

rebootUntilOnline

public void rebootUntilOnline ()

tiri
DeviceNotAvailableException

rebootUntilOnline

public void rebootUntilOnline (String reason)

Parametri
reason String

tiri
DeviceNotAvailableException

rebootUserspace

public void rebootUserspace ()

tiri
DeviceNotAvailableException

rebootUserspaceFino a Online

public void rebootUserspaceUntilOnline ()

tiri
DeviceNotAvailableException

ripristina dispositivo

public void recoverDevice ()

Tentativi di ripristinare la comunicazione del dispositivo.

tiri
DeviceNotAvailableException se il dispositivo non è più disponibile

remountSystemWritable

public void remountSystemWritable ()

tiri
DeviceNotAvailableException

remountVendorWritable

public void remountVendorWritable ()

tiri
DeviceNotAvailableException

rimuovereAdmin

public boolean removeAdmin (String componentName, 
                int userId)

Parametri
componentName String

userId int

ritorna
boolean

tiri
DeviceNotAvailableException

rimuovere i proprietari

public void removeOwners ()

tiri
DeviceNotAvailableException

rimuoviUtente

public boolean removeUser (int userId)

Parametri
userId int

ritorna
boolean

tiri
DeviceNotAvailableException

resetContentProviderSetup

public void resetContentProviderSetup ()

Reimposta il flag per l'impostazione del provider di contenuti per attivarlo nuovamente.

eseguire i test della strumentazione

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

Parametri
runner IRemoteAndroidTestRunner

listeners ITestLifeCycleReceiver

ritorna
boolean

tiri
DeviceNotAvailableException

eseguire i test della strumentazione

public boolean runInstrumentationTests (IRemoteAndroidTestRunner runner, 
                 listeners)

Parametri
runner IRemoteAndroidTestRunner

listeners

ritorna
boolean

tiri
DeviceNotAvailableException

runInstrumentationTestsAsUser

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

Parametri
runner IRemoteAndroidTestRunner

userId int

listeners ITestLifeCycleReceiver

ritorna
boolean

tiri
DeviceNotAvailableException

runInstrumentationTestsAsUser

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

Parametri
runner IRemoteAndroidTestRunner

userId int

listeners

ritorna
boolean

tiri
DeviceNotAvailableException

setConfiguration

public void setConfiguration (IConfiguration configuration)

Inietta IConfiguration in uso.

Parametri
configuration IConfiguration

impostare la data

public void setDate (Date date)

Parametri
date Date

tiri
DeviceNotAvailableException

setDeviceOwner

public boolean setDeviceOwner (String componentName, 
                int userId)

Parametri
componentName String

userId int

ritorna
boolean

tiri
DeviceNotAvailableException

setDeviceState

public void setDeviceState (TestDeviceState deviceState)

Parametri
deviceState TestDeviceState

setEmulatorOutputStream

public void setEmulatorOutputStream (SizeLimitedOutputStream output)

Per emulatore set SizeLimitedOutputStream per accedere uscita

Parametri
output SizeLimitedOutputStream : per registrare l'uscita

setEmulatorProcess

public void setEmulatorProcess (Process p)

Parametri
p Process

setFastbootEnabled

public void setFastbootEnabled (boolean fastbootEnabled)

Parametri
fastbootEnabled boolean

setFastbootPath

public void setFastbootPath (String fastbootPath)

Parametri
fastbootPath String

setIDDevice

public void setIDevice (IDevice newDevice)

Parametri
newDevice IDevice

impostaOpzioni

public void setOptions (TestDeviceOptions options)

Parametri
options TestDeviceOptions

setProperty

public boolean setProperty (String propKey, 
                String propValue)

Parametri
propKey String

propValue String

ritorna
boolean

tiri
DeviceNotAvailableException

setRecovery

public void setRecovery (IDeviceRecovery recovery)

Parametri
recovery IDeviceRecovery

setRecoveryMode

public void setRecoveryMode (ITestDevice.RecoveryMode mode)

Parametri
mode ITestDevice.RecoveryMode

setImpostazione

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

Parametri
namespace String

key String

value String

tiri
DeviceNotAvailableException

setImpostazione

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

Parametri
userId int

namespace String

key String

value String

tiri
DeviceNotAvailableException

setUseFastbootErase

public void setUseFastbootErase (boolean useFastbootErase)

Parametri
useFastbootErase boolean

startLogcat

public void startLogcat ()

startUser

public boolean startUser (int userId)

Parametri
userId int

ritorna
boolean

tiri
DeviceNotAvailableException

startUser

public boolean startUser (int userId, 
                boolean waitFlag)

Parametri
userId int

waitFlag boolean

ritorna
boolean

tiri
DeviceNotAvailableException

stopEmulatorOutput

public void stopEmulatorOutput ()

stopLogcat

public void stopLogcat ()

stopUser

public boolean stopUser (int userId)

Parametri
userId int

ritorna
boolean

tiri
DeviceNotAvailableException

stopUser

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

Parametri
userId int

waitFlag boolean

forceFlag boolean

ritorna
boolean

tiri
DeviceNotAvailableException

switchToAdbTcp

public String switchToAdbTcp ()

ritorna
String

tiri
DeviceNotAvailableException

switchToAdbUsb

public boolean switchToAdbUsb ()

ritorna
boolean

tiri
DeviceNotAvailableException

cambia utente

public boolean switchUser (int userId)

Parametri
userId int

ritorna
boolean

tiri
DeviceNotAvailableException

cambia utente

public boolean switchUser (int userId, 
                long timeout)

Parametri
userId int

timeout long

ritorna
boolean

tiri
DeviceNotAvailableException

syncFiles

public boolean syncFiles (File localFileDir, 
                String deviceFilePath)

Parametri
localFileDir File

deviceFilePath String

ritorna
boolean

tiri
DeviceNotAvailableException

prendere Bugreport

public Bugreport takeBugreport ()

ritorna
Bugreport

unencryptDevice

public boolean unencryptDevice ()

ritorna
boolean

tiri
DeviceNotAvailableException

uninstallPackage

public String uninstallPackage (String packageName)

Parametri
packageName String

ritorna
String

tiri
DeviceNotAvailableException

uninstallPackageForUser

public String uninstallPackageForUser (String packageName, 
                int userId)

Parametri
packageName String

userId int

ritorna
String

tiri
DeviceNotAvailableException

sblocca dispositivo

public boolean unlockDevice ()

ritorna
boolean

tiri
DeviceNotAvailableException

waitForBootComplete

public boolean waitForBootComplete (long timeOut)

Parametri
timeOut long

ritorna
boolean

tiri
DeviceNotAvailableException

waitForDispositivoDisponibile

public void waitForDeviceAvailable ()

tiri
DeviceNotAvailableException

waitForDispositivoDisponibile

public void waitForDeviceAvailable (long waitTime)

Parametri
waitTime long

tiri
DeviceNotAvailableException

waitForDeviceInRecovery

public boolean waitForDeviceInRecovery (long waitTime)

Parametri
waitTime long

ritorna
boolean

waitForDeviceIn Sideload

public boolean waitForDeviceInSideload (long waitTime)

Parametri
waitTime long

ritorna
boolean

waitForDeviceNotAvailable

public boolean waitForDeviceNotAvailable (long waitTime)

Parametri
waitTime long

ritorna
boolean

waitForDeviceOnline

public void waitForDeviceOnline ()

tiri
DeviceNotAvailableException

waitForDeviceOnline

public void waitForDeviceOnline (long waitTime)

Parametri
waitTime long

tiri
DeviceNotAvailableException

waitForDeviceShell

public boolean waitForDeviceShell (long waitTime)

Parametri
waitTime long

ritorna
boolean

Metodi protetti

checkApiLevelContro

protected void checkApiLevelAgainst (String feature, 
                int strictMinLevel)

Parametri
feature String

strictMinLevel int

createRebootDeviceAction

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

Creare un RebootDeviceAction da utilizzare durante l'esecuzione di un'azione di ripartenza.

Parametri
rebootMode NativeDevice.RebootMode : una modalità di questo riavvio.

reason String : per questo riavvio.

ritorna
NativeDevice.RebootDeviceAction il creato RebootDeviceAction .

doAdbReboot

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

Eseguire un riavvio adb.

Parametri
rebootMode NativeDevice.RebootMode : una modalità di questo riavvio.

reason String : per questo riavvio.

tiri
DeviceNotAvailableException

assicurareRuntimePermissionSupported

protected void ensureRuntimePermissionSupported ()

metodo di supporto per generare un'eccezione se l'autorizzazione di runtime non è supportata

tiri
DeviceNotAvailableException

getBugreportInternal

protected InputStreamSource getBugreportInternal ()

ritorna
InputStreamSource

getBugreportzInternal

protected File getBugreportzInternal ()

Metodo di supporto interno per ottenere il file zip bugreportz come ERROR(/File) .

ritorna
File

getRunUtil

protected IRunUtil getRunUtil ()

Prendi il RunUtil esempio per l'uso.

ritorna
IRunUtil

internalGetProperty

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

Recupera una proprietà del dispositivo, dalla cache ddmlib per impostazione predefinita, e ritorna a `adb shell getprop` o `fastboot getvar` a seconda che il dispositivo sia in Fastboot o meno.

Parametri
propName String : Il nome della proprietà dispositivo come restituito da `adb shell getprop`

fastbootVar String : Il nome della variabile fastboot equivalente a query. se null , interrogazione fastboot non verrà tentata

description String : Una semplice descrizione della variabile. La prima lettera deve essere maiuscola.

ritorna
String Una stringa, eventualmente null o vuoto, che contiene il valore della proprietà data

tiri
DeviceNotAvailableException

isNewer

protected boolean isNewer (File localFile, 
                IFileEntry entry)

Restituisce true se il file locale è più recente del file remoto. IFileEntry essere precisi al minuto, in caso di tempi uguali, il file sarà considerato più recente.

Parametri
localFile File

entry IFileEntry

ritorna
boolean

performDeviceAction

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

Esegue un'azione su questo dispositivo. Tenta di ripristinare il dispositivo e, facoltativamente, di riprovare il comando se l'azione non riesce.

Parametri
actionDescription String : una breve descrizione di azione da eseguire. Utilizzato solo per scopi di registrazione.

action com.android.tradefed.device.NativeDevice.DeviceAction : l'azione da eseguire

retryAttempts int : i tentativi di fare per l'azione se non riesce, ma il recupero ha successo

ritorna
boolean true se l'azione è stata eseguita con successo

tiri
DeviceNotAvailableException se il tentativo di ripristino fallisce o il numero massimo di tentativi viene eseguito senza successo

postAdbReboot

protected void postAdbReboot ()

Possibili azioni aggiuntive che possono essere intraprese dopo un riavvio.

tiri
DeviceNotAvailableException

prePostBootSetup

protected void prePostBootSetup ()

Consente a ogni tipo di dispositivo (AndroidNativeDevice, TestDevice) di sovrascrivere questo metodo per una configurazione post-avvio specifica.

tiri
DeviceNotAvailableException

imposta l'orologio

protected void setClock (Clock clock)

Imposta l'istanza di Clock da utilizzare.

Parametri
clock Clock

setLogStartDelay

protected void setLogStartDelay (int delay)

Imposta il tempo in ms di attesa prima di avviare l'acquisizione di logcat per un dispositivo online.

Parametri
delay int : il ritardo in ms

waitForDeviceNotAvailable

protected void waitForDeviceNotAvailable (String operationDesc, 
                long time)

Parametri
operationDesc String

time long