Classes imbriquées |
---|
class | NativeDevice.AdbAction Un DeviceAction pour faire fonctionner un système d' exploitation « adb .... » commande. |
class | NativeDevice.AdbShellAction |
class | NativeDevice.RebootDeviceAction DeviceAction pour le redémarrage d' un appareil. |
enum | NativeDevice.RebootMode Un mode de redémarrage. |
Méthodes publiques |
---|
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 () Le journal qui contient toutes les executeShellCommand(String) journaux. |
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) Aide non officielle pour obtenir un FileEntry d'un chemin non-racine. |
| 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) Traitez le DeviceEvent, qui peut ou non faire passer ce périphérique à un nouvel état d'allocation. |
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 () Remplacez si l'appareil a besoin d'actions spécifiques après la racine adb et avant que l'appareil ne soit de nouveau en ligne. |
void | postAdbUnrootAction () Remplacez si l'appareil a besoin d'actions spécifiques après la suppression de la racine de l'adb et avant que l'appareil ne soit de nouveau en ligne. |
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 () Tente de récupérer la communication de l'appareil. |
void | remountSystemWritable () |
void | remountVendorWritable () |
boolean | removeAdmin (String componentName, int userId) |
void | removeOwners () |
boolean | removeUser (int userId) |
void | resetContentProviderSetup () Réinitialisez l'indicateur pour la configuration du fournisseur de contenu afin de le déclencher à nouveau. |
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) Injecte le IConfiguration en cours d' utilisation. |
void | setDate (Date date) |
boolean | setDeviceOwner (String componentName, int userId) |
void | setDeviceState (TestDeviceState deviceState) |
void | setEmulatorOutputStream ( SizeLimitedOutputStream output) Pour émulateur mis SizeLimitedOutputStream à la sortie log |
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) |
Méthodes protégées |
---|
void | checkApiLevelAgainst (String feature, int strictMinLevel) |
NativeDevice.RebootDeviceAction | createRebootDeviceAction ( NativeDevice.RebootMode rebootMode, String reason) Créer un RebootDeviceAction à utiliser lors de l' exécution d' une action de redémarrage. |
void | doAdbReboot ( NativeDevice.RebootMode rebootMode, String reason) Effectuez un redémarrage adb. |
void | ensureRuntimePermissionSupported () méthode d'assistance pour lever une exception si l'autorisation d'exécution n'est pas prise en charge |
InputStreamSource | getBugreportInternal () |
File | getBugreportzInternal () Méthode d' assistance interne pour obtenir le fichier zip bugreportz comme ERROR(/File) . |
IRunUtil | getRunUtil () Obtenez le RunUtil par exemple à l' utilisation. |
String | internalGetProperty (String propName, String fastbootVar, String description) Récupérer une propriété de périphérique, à partir du cache ddmlib par défaut, et revenir à `adb shell getprop` ou `fastboot getvar` selon que le périphérique est dans Fastboot ou non. |
boolean | isNewer (File localFile, IFileEntry entry) Retour true si le fichier local est plus récent que le fichier à distance. |
boolean | performDeviceAction (String actionDescription, com.android.tradefed.device.NativeDevice.DeviceAction action, int retryAttempts) Effectue une action sur cet appareil. |
void | postAdbReboot () Actions supplémentaires possibles qui peuvent être prises après un redémarrage. |
void | prePostBootSetup () Permet à chaque type d'appareil (AndroidNativeDevice, TestDevice) de remplacer cette méthode pour une configuration post-démarrage spécifique. |
void | setClock (Clock clock) Définissez l'instance d'horloge à utiliser. |
void | setLogStartDelay (int delay) Définit le temps d'attente en ms avant de démarrer la capture logcat pour un périphérique en ligne. |
void | waitForDeviceNotAvailable (String operationDesc, long time) |
Constantes
IDENTIFIANT INVALIDE
public static final int INVALID_USER_ID
Valeur renvoyée pour tout identifiant utilisateur non valide/introuvable : UserHandle a défini la valeur -10000
Valeur constante : -10000 (0xffffd8f0)
MAX_HOST_DEVICE_TIME_OFFSET
protected static final long MAX_HOST_DEVICE_TIME_OFFSET
Valeur constante : 5000 (0x0000000000001388)
MAX_RETRY_ATTEMPTS
protected static final int MAX_RETRY_ATTEMPTS
le nombre par défaut de nouvelles tentatives de commande à effectuer
Valeur constante : 2 (0x00000002)
Des champs
CARTE SD
protected static final String SD_CARD
STOCKAGE_EMULE
protected static final String STORAGE_EMULATED
mOptions
protected TestDeviceOptions mOptions
mStateMonitor
protected final IDeviceStateMonitor mStateMonitor
Constructeurs publics
Appareil natif
public NativeDevice (IDevice device,
IDeviceStateMonitor stateMonitor,
IDeviceMonitor allocationMonitor)
Crée un TestDevice
.
Paramètres |
---|
device | IDevice : l'associé IDevice |
stateMonitor | IDeviceStateMonitor : le IDeviceStateMonitor mécanisme d'utilisation |
allocationMonitor | IDeviceMonitor : le IDeviceMonitor pour informer de l' allocation des changements d'état. Peut être nul |
Méthodes publiques
checkApiLevelAgainstNextRelease
public boolean checkApiLevelAgainstNextRelease (int strictMinLevel)
Paramètres |
---|
strictMinLevel | int |
Jetés |
---|
DeviceNotAvailableException | |
checkConnectivité
public boolean checkConnectivity ()
Jetés |
---|
DeviceNotAvailableException | |
clearErrorDialogs
public boolean clearErrorDialogs ()
Jetés |
---|
DeviceNotAvailableException | |
effacerLastConnectedWifiNetwork
public void clearLastConnectedWifiNetwork ()
clearLogcat
public void clearLogcat ()
se connecterAuRéseauWifi
public boolean connectToWifiNetwork (String wifiSsid,
String wifiPsk)
Paramètres |
---|
wifiSsid | String |
wifiPsk | String |
Jetés |
---|
DeviceNotAvailableException | |
se connecterAuRéseauWifi
public boolean connectToWifiNetwork (String wifiSsid,
String wifiPsk,
boolean scanSsid)
Paramètres |
---|
wifiSsid | String |
wifiPsk | String |
scanSsid | boolean |
Jetés |
---|
DeviceNotAvailableException | |
connectToWifiNetworkIfNeeded
public boolean connectToWifiNetworkIfNeeded (String wifiSsid,
String wifiPsk,
boolean scanSsid)
Paramètres |
---|
wifiSsid | String |
wifiPsk | String |
scanSsid | boolean |
Jetés |
---|
DeviceNotAvailableException | |
connectToWifiNetworkIfNeeded
public boolean connectToWifiNetworkIfNeeded (String wifiSsid,
String wifiPsk)
Paramètres |
---|
wifiSsid | String |
wifiPsk | String |
Jetés |
---|
DeviceNotAvailableException | |
Créer un utilisateur
public int createUser (String name,
boolean guest,
boolean ephemeral)
Paramètres |
---|
name | String |
guest | boolean |
ephemeral | boolean |
Jetés |
---|
DeviceNotAvailableException | |
Créer un utilisateur
public int createUser (String name)
Jetés |
---|
DeviceNotAvailableException | |
createUserNoThrow
public int createUserNoThrow (String name)
Jetés |
---|
DeviceNotAvailableException | |
supprimer le fichier
public void deleteFile (String deviceFilePath)
Paramètres |
---|
deviceFilePath | String |
Jetés |
---|
DeviceNotAvailableException | |
appareilSoftRestarted
public boolean deviceSoftRestarted (ProcessInfo prevSystemServerProcess)
Paramètres |
---|
prevSystemServerProcess | ProcessInfo |
Jetés |
---|
DeviceNotAvailableException | |
appareilSoftRestartedDepuis
public boolean deviceSoftRestartedSince (long utcEpochTime,
TimeUnit timeUnit)
Paramètres |
---|
utcEpochTime | long |
timeUnit | TimeUnit |
Jetés |
---|
DeviceNotAvailableException | |
disableAdbRoot
public boolean disableAdbRoot ()
Jetés |
---|
DeviceNotAvailableException | |
désactiverKeyguard
public void disableKeyguard ()
Jetés |
---|
DeviceNotAvailableException | |
désactiverNetworkMonitor
public boolean disableNetworkMonitor ()
Jetés |
---|
DeviceNotAvailableException | |
déconnecterDeWifi
public boolean disconnectFromWifi ()
Jetés |
---|
DeviceNotAvailableException | |
faitFichierExiste
public boolean doesFileExist (String deviceFilePath)
Paramètres |
---|
deviceFilePath | String |
Jetés |
---|
DeviceNotAvailableException | |
tas de décharge
public File dumpHeap (String process,
String devicePath)
Paramètres |
---|
process | String |
devicePath | String |
Jetés |
---|
DeviceNotAvailableException | |
activerAdbRoot
public boolean enableAdbRoot ()
Jetés |
---|
DeviceNotAvailableException | |
activerNetworkMonitor
public boolean enableNetworkMonitor ()
Jetés |
---|
DeviceNotAvailableException | |
crypterPériphérique
public boolean encryptDevice (boolean inplace)
Paramètres |
---|
inplace | boolean |
Jetés |
---|
DeviceNotAvailableException | |
executeAdbCommand
public String executeAdbCommand (long timeout,
String... cmdArgs)
Paramètres |
---|
timeout | long |
cmdArgs | String |
Jetés |
---|
DeviceNotAvailableException | |
executeAdbCommand
public String executeAdbCommand (String... cmdArgs)
Paramètres |
---|
cmdArgs | String |
Jetés |
---|
DeviceNotAvailableException | |
exécuterFastbootCommand
public CommandResult executeFastbootCommand (String... cmdArgs)
Paramètres |
---|
cmdArgs | String |
Jetés |
---|
DeviceNotAvailableException | |
exécuterFastbootCommand
public CommandResult executeFastbootCommand (long timeout,
String... cmdArgs)
Paramètres |
---|
timeout | long |
cmdArgs | String |
Jetés |
---|
DeviceNotAvailableException | |
executeLongFastbootCommand
public CommandResult executeLongFastbootCommand (String... cmdArgs)
Paramètres |
---|
cmdArgs | String |
Jetés |
---|
DeviceNotAvailableException | |
exécuterShellCommand
public String executeShellCommand (String command)
Paramètres |
---|
command | String |
Jetés |
---|
DeviceNotAvailableException | |
exécuterShellCommand
public void executeShellCommand (String command,
IShellOutputReceiver receiver,
long maxTimeToOutputShellResponse,
TimeUnit timeUnit,
int retryAttempts)
Paramètres |
---|
command | String |
receiver | IShellOutputReceiver |
maxTimeToOutputShellResponse | long |
timeUnit | TimeUnit |
retryAttempts | int |
Jetés |
---|
DeviceNotAvailableException | |
exécuterShellCommand
public void executeShellCommand (String command,
IShellOutputReceiver receiver,
long maxTimeoutForCommand,
long maxTimeToOutputShellResponse,
TimeUnit timeUnit,
int retryAttempts)
Paramètres |
---|
command | String |
receiver | IShellOutputReceiver |
maxTimeoutForCommand | long |
maxTimeToOutputShellResponse | long |
timeUnit | TimeUnit |
retryAttempts | int |
Jetés |
---|
DeviceNotAvailableException | |
exécuterShellCommand
public void executeShellCommand (String command,
IShellOutputReceiver receiver)
Paramètres |
---|
command | String |
receiver | IShellOutputReceiver |
Jetés |
---|
DeviceNotAvailableException | |
executeShellV2Command
public CommandResult executeShellV2Command (String cmd)
Jetés |
---|
DeviceNotAvailableException | |
executeShellV2Command
public CommandResult executeShellV2Command (String cmd,
OutputStream pipeToOutput)
Paramètres |
---|
cmd | String |
pipeToOutput | OutputStream |
Jetés |
---|
DeviceNotAvailableException | |
executeShellV2Command
public CommandResult executeShellV2Command (String cmd,
File pipeAsInput)
Paramètres |
---|
cmd | String |
pipeAsInput | File |
Jetés |
---|
DeviceNotAvailableException | |
exécuterShellV2Command
public CommandResult executeShellV2Command (String cmd,
long maxTimeoutForCommand,
TimeUnit timeUnit,
int retryAttempts)
Paramètres |
---|
cmd | String |
maxTimeoutForCommand | long |
timeUnit | TimeUnit |
retryAttempts | int |
Jetés |
---|
DeviceNotAvailableException | |
executeShellV2Command
public CommandResult executeShellV2Command (String cmd,
long maxTimeoutForCommand,
TimeUnit timeUnit)
Paramètres |
---|
cmd | String |
maxTimeoutForCommand | long |
timeUnit | TimeUnit |
Jetés |
---|
DeviceNotAvailableException | |
executeShellV2Command
public CommandResult executeShellV2Command (String cmd,
File pipeAsInput,
OutputStream pipeToOutput,
long maxTimeoutForCommand,
TimeUnit timeUnit,
int retryAttempts)
Paramètres |
---|
cmd | String |
pipeAsInput | File |
pipeToOutput | OutputStream |
maxTimeoutForCommand | long |
timeUnit | TimeUnit |
retryAttempts | int |
Jetés |
---|
DeviceNotAvailableException | |
executeShellV2Command
public CommandResult executeShellV2Command (String cmd,
File pipeAsInput,
OutputStream pipeToOutput,
OutputStream pipeToError,
long maxTimeoutForCommand,
TimeUnit timeUnit,
int retryAttempts)
Paramètres |
---|
cmd | String |
pipeAsInput | File |
pipeToOutput | OutputStream |
pipeToError | OutputStream |
maxTimeoutForCommand | long |
timeUnit | TimeUnit |
retryAttempts | int |
Jetés |
---|
DeviceNotAvailableException | |
fastbootWipePartition
public CommandResult fastbootWipePartition (String partition)
Paramètres |
---|
partition | String |
Jetés |
---|
DeviceNotAvailableException | |
getActiveApex
public getActiveApexes ()
Jetés |
---|
DeviceNotAvailableException | |
getAllSettings
public getAllSettings (String namespace)
Paramètres |
---|
namespace | String |
Jetés |
---|
DeviceNotAvailableException | |
getAllocationState
public DeviceAllocationState getAllocationState ()
Retour |
---|
DeviceAllocationState | |
getAndroidId
public String getAndroidId (int userId)
Jetés |
---|
DeviceNotAvailableException | |
getAndroidIds
public getAndroidIds ()
Jetés |
---|
DeviceNotAvailableException | |
getApiLevel
public int getApiLevel ()
Jetés |
---|
DeviceNotAvailableException | |
getAppPackageInfo
public PackageInfo getAppPackageInfo (String packageName)
Paramètres |
---|
packageName | String |
Jetés |
---|
DeviceNotAvailableException | |
getAppPackageInfos
public getAppPackageInfos ()
Jetés |
---|
DeviceNotAvailableException | |
getBasebandVersion
public String getBasebandVersion ()
Jetés |
---|
DeviceNotAvailableException | |
obtenirBatterie
public Integer getBattery ()
getBooleanProperty
public boolean getBooleanProperty (String name,
boolean defaultValue)
Paramètres |
---|
name | String |
defaultValue | boolean |
Jetés |
---|
DeviceNotAvailableException | |
getBootHistory
public getBootHistory ()
Jetés |
---|
DeviceNotAvailableException | |
getBootHistoryDepuis
public getBootHistorySince (long utcEpochTime,
TimeUnit timeUnit)
Paramètres |
---|
utcEpochTime | long |
timeUnit | TimeUnit |
Jetés |
---|
DeviceNotAvailableException | |
getBootloaderVersion
public String getBootloaderVersion ()
Jetés |
---|
DeviceNotAvailableException | |
obtenir un rapport de bug
public InputStreamSource getBugreport ()
getBugreportz
public InputStreamSource getBugreportz ()
getBuildAlias
public String getBuildAlias ()
Jetés |
---|
DeviceNotAvailableException | |
getBuildFlavor
public String getBuildFlavor ()
Jetés |
---|
DeviceNotAvailableException | |
getBuildId
public String getBuildId ()
Jetés |
---|
DeviceNotAvailableException | |
getBuildSigningKeys
public String getBuildSigningKeys ()
Jetés |
---|
DeviceNotAvailableException | |
getCachedDeviceDescriptor
public DeviceDescriptor getCachedDeviceDescriptor ()
obtenir des enfants
public String[] getChildren (String path)
Jetés |
---|
DeviceNotAvailableException | |
getCurrentFoldableState
public DeviceFoldableState getCurrentFoldableState ()
Retour |
---|
DeviceFoldableState | |
Jetés |
---|
DeviceNotAvailableException | |
getCurrentUser
public int getCurrentUser ()
Jetés |
---|
DeviceNotAvailableException | |
getDeviceClass
public String getDeviceClass ()
getDeviceDate
public long getDeviceDate ()
Jetés |
---|
DeviceNotAvailableException | |
getDeviceDescriptor
public DeviceDescriptor getDeviceDescriptor ()
getDeviceState
public TestDeviceState getDeviceState ()
getDeviceTimeOffset
public long getDeviceTimeOffset (Date date)
Jetés |
---|
DeviceNotAvailableException | |
getEmulatorSortie
public InputStreamSource getEmulatorOutput ()
getEmulatorProcess
public Process getEmulatorProcess ()
getExecuteShellCommandLog
public final File getExecuteShellCommandLog ()
Le journal qui contient toutes les executeShellCommand(String)
journaux.
getExternalStoreFreeSpace
public long getExternalStoreFreeSpace ()
Jetés |
---|
DeviceNotAvailableException | |
getFastbootPath
public String getFastbootPath ()
getFastbootProductType
public String getFastbootProductType ()
Jetés |
---|
DeviceNotAvailableException | |
getFastbootProductVariant
public String getFastbootProductVariant ()
Jetés |
---|
DeviceNotAvailableException | |
getFastbootSerialNumber
public String getFastbootSerialNumber ()
getFastbootVariable
public String getFastbootVariable (String variableName)
Paramètres |
---|
variableName | String |
Jetés |
---|
DeviceNotAvailableException | |
getFastbootVersion
public String getFastbootVersion ()
getFileEntry
public IFileEntry getFileEntry (String path)
Jetés |
---|
DeviceNotAvailableException | |
getFileEntry
public IFileEntry getFileEntry (FileListingService.FileEntry entry)
Aide non officielle pour obtenir un FileEntry
d'un chemin non-racine. FIXME : refactorisez le système FileEntry pour qu'il soit disponible à partir de n'importe quel chemin. (même non root).
Paramètres |
---|
entry | FileListingService.FileEntry : une FileEntry racine pas nécessairement comme Ddmlib exige. |
Jetés |
---|
DeviceNotAvailableException | |
getFoldableStates
public getFoldableStates ()
Jetés |
---|
DeviceNotAvailableException | |
getIDDevice
public IDevice getIDevice ()
getInstalledPackageNames
public getInstalledPackageNames ()
Jetés |
---|
DeviceNotAvailableException | |
getIntProperty
public long getIntProperty (String name,
long defaultValue)
Paramètres |
---|
name | String |
defaultValue | long |
Jetés |
---|
DeviceNotAvailableException | |
getIpAdresse
public String getIpAddress ()
Jetés |
---|
DeviceNotAvailableException | |
getKeyguardState
public KeyguardControllerState getKeyguardState ()
Retour |
---|
KeyguardControllerState | |
Jetés |
---|
DeviceNotAvailableException | |
getLastExpectedRebootTimeMillis
public long getLastExpectedRebootTimeMillis ()
getLaunchApiLevel
public int getLaunchApiLevel ()
Jetés |
---|
DeviceNotAvailableException | |
getLogcat
public InputStreamSource getLogcat ()
getLogcat
public InputStreamSource getLogcat (int maxBytes)
getLogcatDump
public InputStreamSource getLogcatDump ()
getLogcatDepuis
public InputStreamSource getLogcatSince (long date)
getMacAdresse
public String getMacAddress ()
getMainlineModuleInfo
public getMainlineModuleInfo ()
Jetés |
---|
DeviceNotAvailableException | |
public int getMaxNumberOfRunningUsersSupported ()
Jetés |
---|
DeviceNotAvailableException | |
public int getMaxNumberOfUsersSupported ()
Jetés |
---|
DeviceNotAvailableException | |
getMonitor
public IDeviceStateMonitor getMonitor ()
Retour |
---|
IDeviceStateMonitor | |
getMountPoint
public String getMountPoint (String mountName)
Paramètres |
---|
mountName | String |
getMountPointInfo
public ITestDevice.MountPointInfo getMountPointInfo (String mountpoint)
Paramètres |
---|
mountpoint | String |
Retour |
---|
ITestDevice.MountPointInfo | |
Jetés |
---|
DeviceNotAvailableException | |
getMountPointInfo
public getMountPointInfo ()
Jetés |
---|
DeviceNotAvailableException | |
obtenirOptions
public TestDeviceOptions getOptions ()
getPartitionFreeSpace
public long getPartitionFreeSpace (String partition)
Paramètres |
---|
partition | String |
Jetés |
---|
DeviceNotAvailableException | |
getPrimaryUserId
public Integer getPrimaryUserId ()
Jetés |
---|
DeviceNotAvailableException | |
getProcessByName
public ProcessInfo getProcessByName (String processName)
Paramètres |
---|
processName | String |
Jetés |
---|
DeviceNotAvailableException | |
getProcessPid
public String getProcessPid (String process)
Paramètres |
---|
process | String |
Jetés |
---|
DeviceNotAvailableException | |
obtenirTypeProduit
public String getProductType ()
Jetés |
---|
DeviceNotAvailableException | |
getProductVariant
public String getProductVariant ()
Jetés |
---|
DeviceNotAvailableException | |
obtenirPropriété
public String getProperty (String name)
Jetés |
---|
DeviceNotAvailableException | |
getRecoveryMode
public ITestDevice.RecoveryMode getRecoveryMode ()
Retour |
---|
ITestDevice.RecoveryMode | |
obtenir une capture d'écran
public InputStreamSource getScreenshot (String format)
Jetés |
---|
DeviceNotAvailableException | |
obtenir une capture d'écran
public InputStreamSource getScreenshot (long displayId)
Paramètres |
---|
displayId | long |
Jetés |
---|
DeviceNotAvailableException | |
obtenir une capture d'écran
public InputStreamSource getScreenshot (String format,
boolean rescale)
Paramètres |
---|
format | String |
rescale | boolean |
Jetés |
---|
DeviceNotAvailableException | |
obtenir une capture d'écran
public InputStreamSource getScreenshot ()
Jetés |
---|
DeviceNotAvailableException | |
getSerialNumber
public String getSerialNumber ()
getSetting
public String getSetting (int userId,
String namespace,
String key)
Paramètres |
---|
userId | int |
namespace | String |
key | String |
Jetés |
---|
DeviceNotAvailableException | |
getSetting
public String getSetting (String namespace,
String key)
Paramètres |
---|
namespace | String |
key | String |
Jetés |
---|
DeviceNotAvailableException | |
getSimOperator
public String getSimOperator ()
getSimState
public String getSimState ()
getPierres tombales
public getTombstones ()
Jetés |
---|
DeviceNotAvailableException | |
getTotalMemory
public long getTotalMemory ()
getUninstallablePackageNames
public getUninstallablePackageNames ()
Jetés |
---|
DeviceNotAvailableException | |
getUseFastbootErase
public boolean getUseFastbootErase ()
getUserFlags
public int getUserFlags (int userId)
Jetés |
---|
DeviceNotAvailableException | |
getUserInfos
public getUserInfos ()
Jetés |
---|
DeviceNotAvailableException | |
getUserSerialNumber
public int getUserSerialNumber (int userId)
Jetés |
---|
DeviceNotAvailableException | |
handleAllocationEvent
public IManagedTestDevice.DeviceEventResponse handleAllocationEvent (DeviceEvent event)
Traitez le DeviceEvent, qui peut ou non faire passer ce périphérique à un nouvel état d'allocation.
Paramètres |
---|
event | DeviceEvent |
Retour |
---|
IManagedTestDevice.DeviceEventResponse | |
aFonctionnalité
public boolean hasFeature (String feature)
Paramètres |
---|
feature | String |
Jetés |
---|
DeviceNotAvailableException | |
installer le paquet
public String installPackage (File packageFile,
boolean reinstall,
String... extraArgs)
Paramètres |
---|
packageFile | File |
reinstall | boolean |
extraArgs | String |
Jetés |
---|
DeviceNotAvailableException | |
installer le paquet
public String installPackage (File packageFile,
boolean reinstall,
boolean grantPermissions,
String... extraArgs)
Paramètres |
---|
packageFile | File |
reinstall | boolean |
grantPermissions | boolean |
extraArgs | String |
Jetés |
---|
DeviceNotAvailableException | |
installPackageForUser
public String installPackageForUser (File packageFile,
boolean reinstall,
int userId,
String... extraArgs)
Paramètres |
---|
packageFile | File |
reinstall | boolean |
userId | int |
extraArgs | String |
Jetés |
---|
DeviceNotAvailableException | |
installPackageForUser
public String installPackageForUser (File packageFile,
boolean reinstall,
boolean grantPermissions,
int userId,
String... extraArgs)
Paramètres |
---|
packageFile | File |
reinstall | boolean |
grantPermissions | boolean |
userId | int |
extraArgs | String |
Jetés |
---|
DeviceNotAvailableException | |
isAdbRoot
public boolean isAdbRoot ()
Jetés |
---|
DeviceNotAvailableException | |
isAdbTcp
public boolean isAdbTcp ()
isAppEnumerationSupported
public boolean isAppEnumerationSupported ()
Jetés |
---|
DeviceNotAvailableException | |
isDeviceEncrypted
public boolean isDeviceEncrypted ()
Jetés |
---|
DeviceNotAvailableException | |
estRépertoire
public boolean isDirectory (String path)
Jetés |
---|
DeviceNotAvailableException | |
isEnableAdbRoot
public boolean isEnableAdbRoot ()
Retour |
---|
boolean | true si adb racine doit être activé sur le périphérique |
isEncryptionSupported
public boolean isEncryptionSupported ()
Jetés |
---|
DeviceNotAvailableException | |
estExécutable
public boolean isExecutable (String fullPath)
Paramètres |
---|
fullPath | String |
Jetés |
---|
DeviceNotAvailableException | |
isFastbootEnabled
public boolean isFastbootEnabled ()
est sans tête
public boolean isHeadless ()
Jetés |
---|
DeviceNotAvailableException | |
isMultiUserSupported
public boolean isMultiUserSupported ()
Jetés |
---|
DeviceNotAvailableException | |
isPackageInstallé
public boolean isPackageInstalled (String packageName,
String userId)
Paramètres |
---|
packageName | String |
userId | String |
Jetés |
---|
DeviceNotAvailableException | |
isPackageInstallé
public boolean isPackageInstalled (String packageName)
Paramètres |
---|
packageName | String |
Jetés |
---|
DeviceNotAvailableException | |
isRuntimePermissionSupported
public boolean isRuntimePermissionSupported ()
Jetés |
---|
DeviceNotAvailableException | |
isStateBootloaderOrFastbootd
public boolean isStateBootloaderOrFastbootd ()
isUserRunning
public boolean isUserRunning (int userId)
Jetés |
---|
DeviceNotAvailableException | |
estUtilisateurSecondaire
public boolean isUserSecondary (int userId)
Jetés |
---|
DeviceNotAvailableException | |
isWifiActivé
public boolean isWifiEnabled ()
Jetés |
---|
DeviceNotAvailableException | |
listDisplayIds
public listDisplayIds ()
Jetés |
---|
DeviceNotAvailableException | |
listeUtilisateurs
public listUsers ()
Jetés |
---|
DeviceNotAvailableException | |
logRapport de bogue
public boolean logBugreport (String dataName,
ITestLogger listener)
Paramètres |
---|
dataName | String |
listener | ITestLogger |
logOnDevice
public void logOnDevice (String tag,
Log.LogLevel level,
String format,
Object... args)
Paramètres |
---|
tag | String |
level | Log.LogLevel |
format | String |
args | Object |
redémarrage non bloquant
public void nonBlockingReboot ()
Jetés |
---|
DeviceNotAvailableException | |
postAdbRootAction
public void postAdbRootAction ()
Remplacez si l'appareil a besoin d'actions spécifiques après la racine adb et avant que l'appareil ne soit de nouveau en ligne. L'implémentation par défaut n'inclut aucune action supplémentaire. adb root n'est pas garanti d'être activé à ce stade.
Jetés |
---|
DeviceNotAvailableException | |
postAdbUnrootAction
public void postAdbUnrootAction ()
Remplacez si l'appareil a besoin d'actions spécifiques après la suppression de la racine adb et avant que l'appareil ne soit de nouveau en ligne. L'implémentation par défaut n'inclut aucune action supplémentaire. adb root n'est pas garanti d'être désactivé à ce stade.
Jetés |
---|
DeviceNotAvailableException | |
postBootSetup
public void postBootSetup ()
Jetés |
---|
DeviceNotAvailableException | |
postInvocationTearDown
public void postInvocationTearDown (Throwable exception)
Paramètres |
---|
exception | Throwable |
preInvocationSetup
public void preInvocationSetup (IBuildInfo info,
MultiMap<String, String> attributes)
Paramètres |
---|
info | IBuildInfo |
attributes | MultiMap |
Jetés |
---|
DeviceNotAvailableException | |
TargetSetupError | |
pullDir
public boolean pullDir (String deviceFilePath,
File localDir)
Paramètres |
---|
deviceFilePath | String |
localDir | File |
Jetés |
---|
DeviceNotAvailableException | |
pullFile
public boolean pullFile (String remoteFilePath,
File localFile)
Paramètres |
---|
remoteFilePath | String |
localFile | File |
Jetés |
---|
DeviceNotAvailableException | |
pullFile
public File pullFile (String remoteFilePath)
Paramètres |
---|
remoteFilePath | String |
Jetés |
---|
DeviceNotAvailableException | |
pullFileContents
public String pullFileContents (String remoteFilePath)
Paramètres |
---|
remoteFilePath | String |
Jetés |
---|
DeviceNotAvailableException | |
pullFileFromExternal
public File pullFileFromExternal (String remoteFilePath)
Paramètres |
---|
remoteFilePath | String |
Jetés |
---|
DeviceNotAvailableException | |
pushDir
public boolean pushDir (File localFileDir,
String deviceFilePath,
excludedDirectories)
Paramètres |
---|
localFileDir | File |
deviceFilePath | String |
excludedDirectories | |
Jetés |
---|
DeviceNotAvailableException | |
pushDir
public boolean pushDir (File localFileDir,
String deviceFilePath)
Paramètres |
---|
localFileDir | File |
deviceFilePath | String |
Jetés |
---|
DeviceNotAvailableException | |
pushFichier
public boolean pushFile (File localFile,
String remoteFilePath)
Paramètres |
---|
localFile | File |
remoteFilePath | String |
Jetés |
---|
DeviceNotAvailableException | |
pushString
public boolean pushString (String contents,
String remoteFilePath)
Paramètres |
---|
contents | String |
remoteFilePath | String |
Jetés |
---|
DeviceNotAvailableException | |
redémarrer
public void reboot (String reason)
Jetés |
---|
DeviceNotAvailableException | |
redémarrer
public void reboot ()
Jetés |
---|
DeviceNotAvailableException | |
rebootIntoBootloader
public void rebootIntoBootloader ()
Jetés |
---|
DeviceNotAvailableException | |
rebootIntoFastbootd
public void rebootIntoFastbootd ()
Jetés |
---|
DeviceNotAvailableException | |
rebootIntoRecovery
public void rebootIntoRecovery ()
Jetés |
---|
DeviceNotAvailableException | |
rebootIntoSideload
public void rebootIntoSideload ()
Jetés |
---|
DeviceNotAvailableException | |
rebootIntoSideload
public void rebootIntoSideload (boolean autoReboot)
Paramètres |
---|
autoReboot | boolean |
Jetés |
---|
DeviceNotAvailableException | |
rebootUntilOnline
public void rebootUntilOnline ()
Jetés |
---|
DeviceNotAvailableException | |
rebootUntilOnline
public void rebootUntilOnline (String reason)
Jetés |
---|
DeviceNotAvailableException | |
rebootUserspace
public void rebootUserspace ()
Jetés |
---|
DeviceNotAvailableException | |
rebootUserspaceUntilOnline
public void rebootUserspaceUntilOnline ()
Jetés |
---|
DeviceNotAvailableException | |
récupérerPériphérique
public void recoverDevice ()
Tente de récupérer la communication de l'appareil.
Jetés |
---|
DeviceNotAvailableException | si l'appareil n'est plus disponible |
remountSystemWritable
public void remountSystemWritable ()
Jetés |
---|
DeviceNotAvailableException | |
remountVendorInscriptible
public void remountVendorWritable ()
Jetés |
---|
DeviceNotAvailableException | |
supprimerAdmin
public boolean removeAdmin (String componentName,
int userId)
Paramètres |
---|
componentName | String |
userId | int |
Jetés |
---|
DeviceNotAvailableException | |
supprimerPropriétaires
public void removeOwners ()
Jetés |
---|
DeviceNotAvailableException | |
supprimerutilisateur
public boolean removeUser (int userId)
Jetés |
---|
DeviceNotAvailableException | |
resetContentProviderSetup
public void resetContentProviderSetup ()
Réinitialisez l'indicateur pour la configuration du fournisseur de contenu afin de le déclencher à nouveau.
runInstrumentationTests
public boolean runInstrumentationTests (IRemoteAndroidTestRunner runner,
ITestLifeCycleReceiver... listeners)
Paramètres |
---|
runner | IRemoteAndroidTestRunner |
listeners | ITestLifeCycleReceiver |
Jetés |
---|
DeviceNotAvailableException | |
runInstrumentationTests
public boolean runInstrumentationTests (IRemoteAndroidTestRunner runner,
listeners)
Paramètres |
---|
runner | IRemoteAndroidTestRunner |
listeners | |
Jetés |
---|
DeviceNotAvailableException | |
runInstrumentationTestsAsUser
public boolean runInstrumentationTestsAsUser (IRemoteAndroidTestRunner runner,
int userId,
ITestLifeCycleReceiver... listeners)
Paramètres |
---|
runner | IRemoteAndroidTestRunner |
userId | int |
listeners | ITestLifeCycleReceiver |
Jetés |
---|
DeviceNotAvailableException | |
runInstrumentationTestsAsUser
public boolean runInstrumentationTestsAsUser (IRemoteAndroidTestRunner runner,
int userId,
listeners)
Paramètres |
---|
runner | IRemoteAndroidTestRunner |
userId | int |
listeners | |
Jetés |
---|
DeviceNotAvailableException | |
setConfiguration
public void setConfiguration (IConfiguration configuration)
Injecte le IConfiguration
en cours d' utilisation.
Paramètres |
---|
configuration | IConfiguration |
régler la date
public void setDate (Date date)
Jetés |
---|
DeviceNotAvailableException | |
setDeviceOwner
public boolean setDeviceOwner (String componentName,
int userId)
Paramètres |
---|
componentName | String |
userId | int |
Jetés |
---|
DeviceNotAvailableException | |
setDeviceState
public void setDeviceState (TestDeviceState deviceState)
Paramètres |
---|
deviceState | TestDeviceState |
setEmulatorProcess
public void setEmulatorProcess (Process p)
setFastbootEnabled
public void setFastbootEnabled (boolean fastbootEnabled)
Paramètres |
---|
fastbootEnabled | boolean |
setFastbootPath
public void setFastbootPath (String fastbootPath)
Paramètres |
---|
fastbootPath | String |
setIDDevice
public void setIDevice (IDevice newDevice)
Paramètres |
---|
newDevice | IDevice |
setOptions
public void setOptions (TestDeviceOptions options)
Paramètres |
---|
options | TestDeviceOptions |
setProperty
public boolean setProperty (String propKey,
String propValue)
Paramètres |
---|
propKey | String |
propValue | String |
Jetés |
---|
DeviceNotAvailableException | |
setRecovery
public void setRecovery (IDeviceRecovery recovery)
Paramètres |
---|
recovery | IDeviceRecovery |
setRecoveryMode
public void setRecoveryMode (ITestDevice.RecoveryMode mode)
Paramètres |
---|
mode | ITestDevice.RecoveryMode |
setSetting
public void setSetting (String namespace,
String key,
String value)
Paramètres |
---|
namespace | String |
key | String |
value | String |
Jetés |
---|
DeviceNotAvailableException | |
setSetting
public void setSetting (int userId,
String namespace,
String key,
String value)
Paramètres |
---|
userId | int |
namespace | String |
key | String |
value | String |
Jetés |
---|
DeviceNotAvailableException | |
setUseFastbootErase
public void setUseFastbootErase (boolean useFastbootErase)
Paramètres |
---|
useFastbootErase | boolean |
startLogcat
public void startLogcat ()
startUser
public boolean startUser (int userId)
Jetés |
---|
DeviceNotAvailableException | |
startUser
public boolean startUser (int userId,
boolean waitFlag)
Paramètres |
---|
userId | int |
waitFlag | boolean |
Jetés |
---|
DeviceNotAvailableException | |
stopEmulatorSortie
public void stopEmulatorOutput ()
stopLogcat
public void stopLogcat ()
stopUtilisateur
public boolean stopUser (int userId)
Jetés |
---|
DeviceNotAvailableException | |
stopUtilisateur
public boolean stopUser (int userId,
boolean waitFlag,
boolean forceFlag)
Paramètres |
---|
userId | int |
waitFlag | boolean |
forceFlag | boolean |
Jetés |
---|
DeviceNotAvailableException | |
basculer versAdbTcp
public String switchToAdbTcp ()
Jetés |
---|
DeviceNotAvailableException | |
basculer versAdbUsb
public boolean switchToAdbUsb ()
Jetés |
---|
DeviceNotAvailableException | |
changer d'utilisateur
public boolean switchUser (int userId)
Jetés |
---|
DeviceNotAvailableException | |
changer d'utilisateur
public boolean switchUser (int userId,
long timeout)
Paramètres |
---|
userId | int |
timeout | long |
Jetés |
---|
DeviceNotAvailableException | |
syncFichiers
public boolean syncFiles (File localFileDir,
String deviceFilePath)
Paramètres |
---|
localFileDir | File |
deviceFilePath | String |
Jetés |
---|
DeviceNotAvailableException | |
takeBugreport
public Bugreport takeBugreport ()
unencryptDevice
public boolean unencryptDevice ()
Jetés |
---|
DeviceNotAvailableException | |
uninstallPackage
public String uninstallPackage (String packageName)
Paramètres |
---|
packageName | String |
Jetés |
---|
DeviceNotAvailableException | |
désinstallerPackageForUser
public String uninstallPackageForUser (String packageName,
int userId)
Paramètres |
---|
packageName | String |
userId | int |
Jetés |
---|
DeviceNotAvailableException | |
déverrouiller l'appareil
public boolean unlockDevice ()
Jetés |
---|
DeviceNotAvailableException | |
waitForBootComplete
public boolean waitForBootComplete (long timeOut)
Jetés |
---|
DeviceNotAvailableException | |
waitForDeviceDisponible
public void waitForDeviceAvailable ()
Jetés |
---|
DeviceNotAvailableException | |
waitForDeviceDisponible
public void waitForDeviceAvailable (long waitTime)
Jetés |
---|
DeviceNotAvailableException | |
waitForDeviceInRecovery
public boolean waitForDeviceInRecovery (long waitTime)
waitForDeviceInSideload
public boolean waitForDeviceInSideload (long waitTime)
waitForDeviceNotAvailable
public boolean waitForDeviceNotAvailable (long waitTime)
waitForDeviceOnline
public void waitForDeviceOnline ()
Jetés |
---|
DeviceNotAvailableException | |
waitForDeviceOnline
public void waitForDeviceOnline (long waitTime)
Jetés |
---|
DeviceNotAvailableException | |
waitForDeviceShell
public boolean waitForDeviceShell (long waitTime)
Méthodes protégées
checkApiLevelContre
protected void checkApiLevelAgainst (String feature,
int strictMinLevel)
Paramètres |
---|
feature | String |
strictMinLevel | int |
doAdbReboot
protected void doAdbReboot (NativeDevice.RebootMode rebootMode,
String reason)
Effectuez un redémarrage adb.
Paramètres |
---|
rebootMode | NativeDevice.RebootMode : un mode de ce redémarrage. |
reason | String : pour ce redémarrage. |
Jetés |
---|
DeviceNotAvailableException | |
assurerRuntimePermissionSupported
protected void ensureRuntimePermissionSupported ()
méthode d'assistance pour lever une exception si l'autorisation d'exécution n'est pas prise en charge
Jetés |
---|
DeviceNotAvailableException | |
getBugreportInternal
protected InputStreamSource getBugreportInternal ()
getBugreportzInternal
protected File getBugreportzInternal ()
Méthode d' assistance interne pour obtenir le fichier zip bugreportz comme ERROR(/File)
.
getRunUtil
protected IRunUtil getRunUtil ()
Obtenez le RunUtil
par exemple à l' utilisation.
interneGetPropriété
protected String internalGetProperty (String propName,
String fastbootVar,
String description)
Récupérer une propriété de périphérique, à partir du cache ddmlib par défaut, et revenir à `adb shell getprop` ou `fastboot getvar` selon que le périphérique est dans Fastboot ou non.
Paramètres |
---|
propName | String : Le nom de la propriété de l' appareil retourné par `adb shell getprop` |
fastbootVar | String : Le nom de la variable fastboot équivalente à la requête. si null , la requête fastboot ne sera pas tenté |
description | String : Une simple description de la variable. La première lettre doit être en majuscule. |
Retour |
---|
String | Une chaîne, éventuellement null ou vide, contenant la valeur de la propriété donnée |
Jetés |
---|
DeviceNotAvailableException | |
est plus récent
protected boolean isNewer (File localFile,
IFileEntry entry)
Retour true
si le fichier local est plus récent que le fichier à distance. IFileEntry
être précis à la minute près , en cas de temps égaux, le fichier sera considéré comme plus récent.
Paramètres |
---|
localFile | File |
entry | IFileEntry |
protected boolean performDeviceAction (String actionDescription,
com.android.tradefed.device.NativeDevice.DeviceAction action,
int retryAttempts)
Effectue une action sur cet appareil. Tente de récupérer le périphérique et réessaye éventuellement la commande si l'action échoue.
Paramètres |
---|
actionDescription | String : une brève description de l' action à effectuer. Utilisé uniquement à des fins de journalisation. |
action | com.android.tradefed.device.NativeDevice.DeviceAction : l'action à effectuer |
retryAttempts | int : les nouvelles tentatives de faire une action si elle échoue , mais réussit la reprise |
Retour |
---|
boolean | true si l' action a été réalisée avec succès |
Jetés |
---|
DeviceNotAvailableException | si la tentative de récupération échoue ou si le nombre maximal de tentatives est effectué sans succès |
postAdbReboot
protected void postAdbReboot ()
Actions supplémentaires possibles qui peuvent être prises après un redémarrage.
Jetés |
---|
DeviceNotAvailableException | |
prePostBootSetup
protected void prePostBootSetup ()
Permet à chaque type d'appareil (AndroidNativeDevice, TestDevice) de remplacer cette méthode pour une configuration post-démarrage spécifique.
Jetés |
---|
DeviceNotAvailableException | |
Réglage de l'horloge
protected void setClock (Clock clock)
Définissez l'instance d'horloge à utiliser.
setLogStartDelay
protected void setLogStartDelay (int delay)
Définit le temps d'attente en ms avant de démarrer la capture logcat pour un périphérique en ligne.
Paramètres |
---|
delay | int : le retard en ms |
waitForDeviceNotAvailable
protected void waitForDeviceNotAvailable (String operationDesc,
long time)
Paramètres |
---|
operationDesc | String |
time | long |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2021-10-04 UTC.
[]
[]