INativeDevice
public interface INativeDevice
com.android.tradefed.device.INativeDevice |
Bir ddmlib IDevice
için güvenilir ve biraz daha yüksek düzeyde bir API sağlar.
Özet
Sabitler | |
---|---|
int | UNKNOWN_API_LEVEL API Düzeyi algılanamadığında varsayılan değer |
Genel yöntemler | |
---|---|
abstract boolean | checkApiLevelAgainstNextRelease (int strictMinLevel) Asgari düzeyde desteklenen bir özelliğin şu anda desteklenip desteklenmediğini kontrol edin. |
abstract void | clearLogcat () Birikmiş tüm logcat verilerini siler. |
abstract void | deleteFile (String deviceFilePath) Cihazdaki bir dosya veya dizini silmek için yardımcı yöntem. |
abstract boolean | deviceSoftRestarted ( ProcessInfo prevSystemServerProcess) Geçerli system_server ile önceki system_server |
abstract boolean | deviceSoftRestartedSince (long utcEpochTime, TimeUnit timeUnit) Aygıtın UTC zamanından beri aygıttan ve |
abstract boolean | disableAdbRoot () Adb kökünü kapatır. |
abstract boolean | doesFileExist (String deviceFilePath) Aygıtta dosya olup olmadığını belirlemek için yardımcı yöntem. |
abstract boolean | enableAdbRoot () Adb kökünü açar. |
abstract String | executeAdbCommand (long timeout, String... commandArgs) Bir adb komutunu belirtilen bir zaman aşımına sahip bir sistem komutu olarak yürüten yardımcı yöntem. |
abstract String | executeAdbCommand (String... commandArgs) Adb komutunu sistem komutu olarak yürüten yardımcı yöntem. |
abstract String | executeAdbCommand (long timeout, envMap, String... commandArgs) executeAdbCommand (long timeout, envMap, String... commandArgs) Bir adb komutunu belirtilen bir zaman aşımına sahip bir sistem komutu olarak yürüten yardımcı yöntem. |
abstract CommandResult | executeFastbootCommand (long timeout, String... commandArgs) Bir fastboot komutunu bir sistem komutu olarak yürüten yardımcı yöntem. |
abstract CommandResult | executeFastbootCommand (String... commandArgs) 2 dakikalık varsayılan zaman aşımı ile bir sistem komutu olarak bir fastboot komutunu yürüten yardımcı yöntem. |
abstract CommandResult | executeLongFastbootCommand (String... commandArgs) Uzun süre çalışan bir fastboot komutunu bir sistem komutu olarak yürüten yardımcı yöntem. |
abstract CommandResult | executeLongFastbootCommand ( envVarMap, String... commandArgs) executeLongFastbootCommand ( envVarMap, String... commandArgs) Uzun süre çalışan bir fastboot komutunu, sistem ortamı değişkenleriyle bir sistem komutu olarak yürüten yardımcı yöntem. |
abstract String | executeShellCommand (String command) Bir adb kabuk komutunu yürüten ve çıktıyı bir |
abstract void | executeShellCommand (String command, IShellOutputReceiver receiver, long maxTimeToOutputShellResponse, TimeUnit timeUnit, int retryAttempts) Komut davranışını kontrol etmek için daha fazla parametre içeren bir adb kabuğu komutu yürütür. |
abstract void | executeShellCommand (String command, IShellOutputReceiver receiver, long maxTimeoutForCommand, long maxTimeToOutputShellResponse, TimeUnit timeUnit, int retryAttempts) Komut davranışını kontrol etmek için daha fazla parametre içeren bir adb kabuğu komutu yürütür. |
abstract void | executeShellCommand (String command, IShellOutputReceiver receiver) Verilen adb shell komutunu yürütür, komut başarısız olursa birden çok kez yeniden dener. |
abstract CommandResult | executeShellV2Command (String command) Bir adb kabuk komutunu yürüten ve sonuçları, komut durum çıktısı, stdout ve stderr ile uygun şekilde doldurulmuş bir |
abstract CommandResult | executeShellV2Command (String command, OutputStream pipeToOutput) Bir adb kabuk komutunu yürüten ve sonuçları, komut durumu çıktısı ve stderr ile uygun şekilde doldurulmuş bir |
abstract CommandResult | executeShellV2Command (String command, File pipeAsInput) Bir adb kabuk komutunu yürüten ve sonuçları, komut durumu çıktısı, stdout ve stderr ile uygun şekilde doldurulmuş bir |
abstract CommandResult | executeShellV2Command (String command, long maxTimeoutForCommand, TimeUnit timeUnit, int retryAttempts) Komut davranışını kontrol etmek için daha fazla parametre içeren bir adb kabuğu komutu yürütür. |
abstract CommandResult | executeShellV2Command (String command, long maxTimeoutForCommand, TimeUnit timeUnit) Komut davranışını kontrol etmek için daha fazla parametre içeren bir adb kabuğu komutu yürütür. |
abstract CommandResult | executeShellV2Command (String command, File pipeAsInput, OutputStream pipeToOutput, long maxTimeoutForCommand, TimeUnit timeUnit, int retryAttempts) Komut davranışını kontrol etmek için daha fazla parametre içeren bir adb kabuğu komutu yürütür. |
abstract CommandResult | executeShellV2Command (String command, File pipeAsInput, OutputStream pipeToOutput, OutputStream pipeToError, long maxTimeoutForCommand, TimeUnit timeUnit, int retryAttempts) Komut davranışını kontrol etmek için daha fazla parametre içeren bir adb kabuğu komutu yürütür. |
abstract CommandResult | fastbootWipePartition (String partition) Aygıt için bir bölümü silen yardımcı yöntem. |
abstract int | getApiLevel () Cihaz API Düzeyini edinin. |
abstract String | getBasebandVersion () Bu cihazın temel bant (radyo) sürümünü almak için kolaylık yöntemi. |
abstract Integer | getBattery () Bir cihazın mevcut pil seviyesini veya pil seviyesi mevcut değilse Null değerini döndürür. |
abstract boolean | getBooleanProperty (String name, boolean defaultValue) Verilen özelliğin boole değerini döndürür. |
abstract | getBootHistory () Yardımcı yöntem, önyükleme geçmişi haritasını önyükleme zamanı ve önyükleme nedeni ile toplar. |
abstract | getBootHistorySince (long utcEpochTime, TimeUnit timeUnit) Yardımcı yöntem, önyükleme geçmişi haritasını, önyükleme zamanı ve önyükleme nedeni ile cihazdan çağdan bu yana verilen süre ve belirtilen zaman birimini toplar. |
abstract String | getBootloaderVersion () Bu cihazın önyükleyici sürümünü almak için kolaylık yöntemi. |
abstract String | getBuildAlias () Cihazın şu anda çalışmakta olduğu yapının diğer adını alın. |
abstract String | getBuildFlavor () Cihaz için yapı lezzetini alın. |
abstract String | getBuildId () Cihazın şu anda çalışmakta olduğu yapıyı alın. |
abstract String | getBuildSigningKeys () Cihaz görüntüsünü imzalamak için kullanılan anahtar tipini döndürür Tipik olarak Android cihazlar, test anahtarlarıyla (AOSP'deki gibi) veya serbest bırakma anahtarlarıyla (bireysel cihaz üreticileri tarafından kontrol edilir) imzalanabilir. |
abstract DeviceDescriptor | getCachedDeviceDescriptor () Aygıt ayrılmışsa önbelleğe alınmış bir |
abstract DeviceDescriptor | getCachedDeviceDescriptor (boolean shortDescriptor) Aygıt ayrılmışsa önbelleğe alınmış bir |
abstract String[] | getChildren (String deviceFilePath) Bazen izinler nedeniyle çalışmayan |
abstract AbstractConnection | getConnection () Cihazla ilişkili bağlantıyı döndürür. |
abstract String | getDeviceClass () Cihaz sınıfını alın. |
abstract long | getDeviceDate () Epoch'tan bu yana aygıtın tarihini milisaniye cinsinden döndürür. |
abstract DeviceDescriptor | getDeviceDescriptor () Gerçek cihaz nesnesini geçirmeden hakkında bilgi almak için cihaz bilgisinden bir |
abstract DeviceDescriptor | getDeviceDescriptor (boolean shortDescriptor) Gerçek cihaz nesnesini geçirmeden hakkında bilgi almak için cihaz bilgisinden bir |
abstract TestDeviceState | getDeviceState () Cihazın durumunu alın. |
abstract long | getDeviceTimeOffset (Date date) Cihaz ile belirli bir |
abstract InputStreamSource | getEmulatorOutput () Öykünücü stdout ve stderr akışını alın |
abstract long | getExternalStoreFreeSpace () Cihazın harici depolama alanındaki boş alan miktarını belirlemek için yardımcı yöntem. |
abstract String | getFastbootProductType () Fastboot modundayken bu cihazın ürün tipini almanın kolaylık yöntemi. |
abstract String | getFastbootProductVariant () Fastboot modundayken bu cihazın ürün tipini almanın kolaylık yöntemi. |
abstract String | getFastbootSerialNumber () Fastboot modu seri numarasını döndürür. |
abstract String | getFastbootVariable (String variableName) Verilen fastboot değişken değerini cihazdan alın. |
abstract IFileEntry | getFileEntry (String path) Cihazdaki uzak bir dosyaya referans alın. |
abstract IDevice | getIDevice () İlişkili ddmlib |
abstract long | getIntProperty (String name, long defaultValue) Cihazdan verilen özelliğin tamsayı değerini döndürür. |
abstract long | getLastExpectedRebootTimeMillis () |
abstract int | getLaunchApiLevel () Cihazın ilk başlatılan API Düzeyini edinin. |
abstract InputStreamSource | getLogcat () Logcat verilerinin anlık görüntü akışını yakalar. |
abstract InputStreamSource | getLogcat (int maxBytes) Yakalanan logcat verilerinin son |
abstract InputStreamSource | getLogcatDump () Cihaz için geçerli logcat dökümünü alın. |
abstract InputStreamSource | getLogcatSince (long date) Sağlanan tarihten başlayarak yakalanan logcat verilerinin anlık görüntü akışını yakalar. |
abstract String | getMountPoint (String mountName) Bir bağlama noktası döndürür. |
abstract ITestDevice.MountPointInfo | getMountPointInfo (String mountpoint) Belirtilen bağlama noktası yoluna karşılık gelen bir |
abstract | getMountPointInfo () Cihazdaki /proc/mounts içindeki bilgilerin ayrıştırılmış bir sürümünü döndürür |
abstract long | getPartitionFreeSpace (String partition) Aygıt bölümündeki boş alan miktarını belirlemek için yardımcı yöntem. |
abstract ProcessInfo | getProcessByName (String processName) Helper method "pidof" ve "stat" komutunu çalıştırır ve PID ile |
abstract String | getProcessPid (String process) Hizmetin pid'ini veya bir şeyler ters giderse boş değeri döndürür. |
abstract String | getProductType () Bu cihazın ürün tipini elde etmek için kolaylık yöntemi. |
abstract String | getProductVariant () Bu cihazın ürün varyantını elde etmek için kolaylık yöntemi. |
abstract String | getProperty (String name) Verilen özellik değerini cihazdan alın. |
abstract ITestDevice.RecoveryMode | getRecoveryMode () Cihaz için kullanılan geçerli kurtarma modunu edinin. |
abstract String | getSerialNumber () Bu cihazın seri numarasını almak için kolaylık yöntemi. |
abstract | getTombstones () Cihazlardan mezar taşları listesini getirin ve iade edin. |
abstract long | getTotalMemory () Dahili hata durumunda toplam fiziksel bellek boyutunu bayt veya -1 olarak verir |
abstract boolean | getUseFastbootErase () Cihazdaki bir bölümü silmek için hızlı önyükleme silme veya hızlı önyükleme formatını kullanıp kullanmayacağınızı öğrenin. |
abstract boolean | isAdbRoot () |
abstract boolean | isAdbTcp () |
abstract boolean | isAppEnumerationSupported () Cihazdaki platformun uygulama numaralandırmayı destekleyip desteklemediğini kontrol edin |
abstract boolean | isBypassLowTargetSdkBlockSupported () Cihazdaki platformun, uygulama yüklemelerinde düşük hedef sdk bloğunu atlamayı destekleyip desteklemediğini kontrol edin |
abstract boolean | isDeviceEncrypted () Cihaz şifreliyse döndürür. |
abstract boolean | isDirectory (String deviceFilePath) Aygıttaki yol bir dizin ise True, aksi takdirde false döndürür. |
abstract boolean | isEncryptionSupported () Cihazda şifrelemenin desteklenip desteklenmediğini döndürür. |
abstract boolean | isExecutable (String fullPath) Aygıttaki dosya yolu yürütülebilir bir dosyaysa True, aksi takdirde false döndürür. |
abstract boolean | isHeadless () Aygıt başsızsa (ekran yoksa) true, aksi takdirde false döndürün. |
abstract boolean | isRuntimePermissionSupported () Cihazdaki platformun çalışma zamanı izni vermeyi destekleyip desteklemediğini kontrol edin |
abstract boolean | isStateBootloaderOrFastbootd () Cihaz |
abstract boolean | logAnrs ( ITestLogger logger) ANR'leri cihazdan toplar ve günlüğe kaydeder. |
abstract void | logOnDevice (String tag, Log.LogLevel level, String format, Object... args) Cihazın logcat'ine bir mesaj kaydedin. |
abstract void | nonBlockingReboot () Aygıtı yeniden başlatmak için bir komut verir ve komut tamamlandığında ve aygıt artık adb tarafından görülmediğinde geri döner. |
abstract void | postBootSetup () Her önyüklemeden sonra bunu test etmek için cihazı yapılandırma talimatlarını uygulayın. |
default void | postInvocationTearDown () Bu yöntem kullanımdan kaldırıldı. Bunun yerine |
abstract void | postInvocationTearDown (Throwable invocationException) Çağırma tamamlandıktan sonra yürütülecek olan, cihaza özel gerekli temizleme için ekstra adımlar. |
default void | preInvocationSetup ( IBuildInfo info, MultiMap <String, String> attributes) Çağırma akışından önce cihazda yürütülecek olan cihaza özel gerekli kurulum için ekstra adımlar. |
abstract boolean | pullDir (String deviceFilePath, File localDir) Dizin içeriğini cihazdan yinelemeli olarak çekin. |
abstract File | pullFile (String remoteFilePath, int userId) Aygıttan bir dosya alır, onu yerel bir geçici |
abstract File | pullFile (String remoteFilePath) Aygıttan bir dosya alır, onu yerel bir geçici |
abstract boolean | pullFile (String remoteFilePath, File localFile) Cihazdan bir dosya alır. |
abstract boolean | pullFile (String remoteFilePath, File localFile, int userId) Cihazdan bir dosya alır. |
abstract String | pullFileContents (String remoteFilePath) Aygıttan bir dosya alır ve içeriğini döndürür. |
abstract File | pullFileFromExternal (String remoteFilePath) Bir dosyayı aygıtın harici deposundan almak, onu yerel bir geçici |
abstract boolean | pushDir (File localDir, String deviceFilePath, excludedDirectories) pushDir (File localDir, String deviceFilePath, excludedDirectories) Filtrelenen bazı dizinleri hariç tutarken dizin içeriklerini tekrar tekrar cihaza gönderin. |
abstract boolean | pushDir (File localDir, String deviceFilePath) Dizin içeriğini tekrar tekrar cihaza aktarın. |
abstract boolean | pushFile (File localFile, String deviceFilePath, boolean evaluateContentProviderNeeded) İsteğe bağlı olarak içerik sağlayıcı ihtiyacını değerlendirmeyi düşünebilen |
abstract boolean | pushFile (File localFile, String deviceFilePath) Bir dosyayı cihaza itin. |
abstract boolean | pushString (String contents, String deviceFilePath) Bir diziden oluşturulan dosyayı cihaza aktar |
abstract void | reboot () Cihazı adb modunda yeniden başlatır. |
abstract void | reboot (String reason) Yeniden başlatma sırasında kalıcı olması için belirli bir |
abstract void | rebootIntoBootloader () Cihazı önyükleyici modunda yeniden başlatır. |
abstract void | rebootIntoFastbootd () Cihazı fastbootd modunda yeniden başlatır. |
abstract void | rebootIntoRecovery () Cihazı adb kurtarma modunda yeniden başlatır. |
abstract void | rebootIntoSideload (boolean autoReboot) Cihazı adb yan yükleme modunda yeniden başlatır (bunun kurtarma sırasında özel bir mod olduğunu unutmayın) Cihaz yan yük moduna girene kadar engeller |
abstract void | rebootIntoSideload () Cihazı adb yan yükleme modunda yeniden başlatır (bunun kurtarma sırasında özel bir mod olduğunu unutmayın) Cihaz yan yük moduna girene kadar engeller |
abstract void | rebootUntilOnline () Yalnızca cihaz çevrimiçi olana, yani adb tarafından görünene kadar engelleyen, |
abstract void | rebootUntilOnline (String reason) Yalnızca cihaz çevrimiçi olana, yani adb tarafından görünene kadar engelleyen, |
abstract void | rebootUserspace () Cihazın yalnızca kullanıcı alanı bölümünü yeniden başlatır. |
abstract void | rebootUserspaceUntilOnline () Yalnızca cihaz çevrimiçi olana, yani adb tarafından görünene kadar engelleyen bir |
abstract void | remountSystemWritable () Cihazdaki sistem bölümünü yazılabilir yapın. |
abstract void | remountVendorWritable () Cihazdaki satıcı bölümünü yazılabilir yapın. |
abstract boolean | runInstrumentationTests (IRemoteAndroidTestRunner runner, ITestLifeCycleReceiver... listeners) Parametre olarak geçirilen bir veya daha fazla dinleyiciyle |
abstract boolean | runInstrumentationTests (IRemoteAndroidTestRunner runner, listeners) runInstrumentationTests (IRemoteAndroidTestRunner runner, listeners) Enstrümantasyon testlerini çalıştırır ve cihaz kurtarma sağlar. |
abstract boolean | runInstrumentationTestsAsUser (IRemoteAndroidTestRunner runner, int userId, listeners) runInstrumentationTestsAsUser (IRemoteAndroidTestRunner runner, int userId, listeners) |
abstract boolean | runInstrumentationTestsAsUser (IRemoteAndroidTestRunner runner, int userId, ITestLifeCycleReceiver... listeners) |
abstract void | setDate (Date date) Cihazdaki tarihi ayarlar Not: cihazda tarih ayarı root gerektirir |
abstract void | setOptions ( TestDeviceOptions options) Cihaz için |
abstract boolean | setProperty (String propKey, String propValue) Cihazda verilen özellik değerini ayarlar. |
abstract void | setRecovery ( IDeviceRecovery recovery) Bu cihaz için kullanılacak |
abstract void | setRecoveryMode ( ITestDevice.RecoveryMode mode) Cihaz için kullanılacak mevcut kurtarma modunu ayarlayın. |
abstract void | setUseFastbootErase (boolean useFastbootErase) Cihazdaki bir bölümü silmek için hızlı önyükleme silme veya hızlı önyükleme formatının kullanılıp kullanılmayacağını ayarlayın. |
abstract void | startLogcat () Arka planda cihazdan logcat çıktısını yakalamaya başlayın. |
abstract void | stopEmulatorOutput () Öykünücü çıktısını kapatın ve silin. |
abstract void | stopLogcat () Aygıttan logcat çıktısını almayı durdurun ve şu anda kayıtlı olan logcat verilerini atın. |
abstract String | switchToAdbTcp () Cihazı adb-over-tcp moduna geçirin. |
abstract boolean | switchToAdbUsb () Cihazı usb üzerinden adb moduna geçirin. |
abstract boolean | syncFiles (File localFileDir, String deviceFilePath) Yerel bir dosya dizininin içeriğini cihaza artımlı olarak eşitler. |
abstract boolean | unlockDevice () Cihaz şifreli durumdaysa cihazın kilidini açar. |
abstract boolean | waitForBootComplete (long timeOut) Aygıtın önyükleme tamamlandı bayrağı ayarlanana kadar engeller. |
abstract boolean | waitForDeviceAvailable () Cihazın yanıt vermesini ve test için hazır olmasını bekler. |
abstract boolean | waitForDeviceAvailable (long waitTime) Cihazın yanıt vermesini ve test için hazır olmasını bekler. |
abstract boolean | waitForDeviceAvailableInRecoverPath (long waitTime) Kurtarma yolunu dikkate almadan cihazın yanıt vermesini ve kullanılabilir olmasını bekler. |
abstract void | waitForDeviceBootloader () Cihaz fastboot aracılığıyla görünene kadar engeller. |
abstract boolean | waitForDeviceInRecovery (long waitTime) Cihazın "adb kurtarma" durumunda olmasını engeller (bunun |
abstract boolean | waitForDeviceInSideload (long waitTime) Cihazın 'adb sideload' durumunda olması için bloklar |
abstract boolean | waitForDeviceNotAvailable (long waitTime) Cihazın kullanılamaması, yani adb'den eksik olması için bloklar |
abstract void | waitForDeviceOnline () Cihaz adb aracılığıyla görünene kadar engeller. |
abstract void | waitForDeviceOnline (long waitTime) Cihaz adb aracılığıyla görünene kadar engeller. |
abstract boolean | waitForDeviceShell (long waitTime) Cihazın temel bir adb kabuk komutuna yanıt vermesini bekler. |
Sabitler
UNKNOWN_API_LEVEL
public static final int UNKNOWN_API_LEVEL
API Düzeyi algılanamadığında varsayılan değer
Sabit Değer: -1 (0xffffffff)
Genel yöntemler
checkApiLevelAgainstNextRelease
public abstract boolean checkApiLevelAgainstNextRelease (int strictMinLevel)
Asgari düzeyde desteklenen bir özelliğin şu anda desteklenip desteklenmediğini kontrol edin. Bu yöntem, API seviyesi yükseltilmeden önce henüz yayınlanmamış özellikleri hesaba katar.
parametreler | |
---|---|
strictMinLevel | int : Özelliği destekleyen kesin minimum olası düzey. |
İadeler | |
---|---|
boolean | Düzey destekleniyorsa doğrudur. Aksi takdirde yanlış. |
Atar | |
---|---|
| com.android.tradefed.device.DeviceNotAvailableException |
DeviceNotAvailableException |
temizleLogcat
public abstract void clearLogcat ()
Birikmiş tüm logcat verilerini siler.
Bu,ITestDevice#getLogcat()
öğesinin yalnızca belirli bir noktadan sonra üretilen günlük verilerini döndürmesini istediğiniz durumlar için kullanışlıdır (örneğin, yeni bir aygıt yapısının yanıp sönmesinden sonra vb.). dosyayı sil
public abstract void deleteFile (String deviceFilePath)
Cihazdaki bir dosya veya dizini silmek için yardımcı yöntem.
parametreler | |
---|---|
deviceFilePath | String : Cihazdaki dosyanın mutlak yolu. |
Atar | |
---|---|
| com.android.tradefed.device.DeviceNotAvailableException |
DeviceNotAvailableException |
deviceSoftYeniden Başlatıldı
public abstract boolean deviceSoftRestarted (ProcessInfo prevSystemServerProcess)
Geçerli system_server ile önceki system_server ProcessInfo
karşılaştırarak aygıtın yazılımsal olarak yeniden başlatılıp başlatılmadığını kontrol etmek için yardımcı yöntem. ProcessInfo
almak için getProcessByName(String)
kullanın.
parametreler | |
---|---|
prevSystemServerProcess | ProcessInfo : önceki system_server işlemi ProcessInfo . |
İadeler | |
---|---|
boolean | cihaz geçici olarak yeniden başlatılırsa true |
Atar | |
---|---|
| cihazın anormal önyükleme nedeni varsa |
| com.android.tradefed.device.DeviceNotAvailableException |
DeviceNotAvailableException |
deviceSoftRestartedSince
public abstract boolean deviceSoftRestartedSince (long utcEpochTime, TimeUnit timeUnit)
Aygıtın UTC zamanından beri aygıttan ve ERROR(/TimeUnit)
öğesinden yeniden başlatılıp başlatılmadığını kontrol etmek için yardımcı yöntem. Yazılımla Yeniden Başlatma, sistem_sunucusunun bir aygıtın yeniden başlatılması dışında yeniden başlatılması anlamına gelir (örneğin: yeniden başlatma istendi). Milisaniye cinsinden geçerli aygıt utcEpochTime, getDeviceDate()
yöntemiyle elde edilebilir.
parametreler | |
---|---|
utcEpochTime | long : çağdan bu yana saniye cinsinden cihaz süresi. |
timeUnit | TimeUnit : verilen utcEpochTime için TimeUnit zaman birimi. |
İadeler | |
---|---|
boolean | cihaz geçici olarak yeniden başlatılırsa true |
Atar | |
---|---|
| cihazın anormal önyükleme nedeni varsa |
| com.android.tradefed.device.DeviceNotAvailableException |
DeviceNotAvailableException |
AdbRoot'u devre dışı bırak
public abstract boolean disableAdbRoot ()
Adb kökünü kapatır.
Adb kökünün devre dışı bırakılması, cihazın adb ile bağlantısının kesilmesine neden olabilir. Bu yöntem, cihaz kullanılabilir olana kadar engelleyecektir.İadeler | |
---|---|
boolean | başarılıysa true . |
Atar | |
---|---|
DeviceNotAvailableException | cihazla bağlantı kesilirse ve kurtarılamazsa. |
dosya var mı
public abstract boolean doesFileExist (String deviceFilePath)
Aygıtta dosya olup olmadığını belirlemek için yardımcı yöntem.
parametreler | |
---|---|
deviceFilePath | String : kontrol edilecek cihazdaki dosyanın mutlak yolu |
İadeler | |
---|---|
boolean | dosya varsa true , aksi takdirde false . |
Atar | |
---|---|
DeviceNotAvailableException | cihazla bağlantı kesilirse ve kurtarılamazsa. |
etkinleştirAdbRoot
public abstract boolean enableAdbRoot ()
Adb kökünü açar. "enable-root" ayarı "false" ise, bir mesaj günlüğe kaydeder ve root'u etkinleştirmeden geri döner.
Adb kökünün etkinleştirilmesi, cihazın adb ile bağlantısının kesilmesine neden olabilir. Bu yöntem, cihaz kullanılabilir olana kadar engelleyecektir.İadeler | |
---|---|
boolean | başarılıysa true . |
Atar | |
---|---|
DeviceNotAvailableException | cihazla bağlantı kesilirse ve kurtarılamazsa. |
yürütmeAdbKomutu
public abstract String executeAdbCommand (long timeout, String... commandArgs)
Bir adb komutunu belirtilen bir zaman aşımına sahip bir sistem komutu olarak yürüten yardımcı yöntem.
Bunun yerine, mümkün olan her yerde, daha iyi hata algılaması ve performansı sağladığından, bunun yerine executeShellCommand(String)
kullanılmalıdır.
parametreler | |
---|---|
timeout | long : cihazın yanıt vermediği kabul edilmesinden önceki milisaniye cinsinden süre, zaman aşımı olmadığı için 0L |
commandArgs | String : adb komutu ve çalıştırılacak bağımsız değişkenler |
İadeler | |
---|---|
String | komuttan stdout. komut yürütülemezse null . |
Atar | |
---|---|
DeviceNotAvailableException | cihazla bağlantı kesilirse ve kurtarılamazsa. |
yürütmeAdbKomutu
public abstract String executeAdbCommand (String... commandArgs)
Adb komutunu sistem komutu olarak yürüten yardımcı yöntem.
Bunun yerine, mümkün olan her yerde, daha iyi hata algılaması ve performansı sağladığından, bunun yerineexecuteShellCommand(String)
kullanılmalıdır.parametreler | |
---|---|
commandArgs | String : adb komutu ve çalıştırılacak bağımsız değişkenler |
İadeler | |
---|---|
String | komuttan stdout. komut yürütülemezse null . |
Atar | |
---|---|
DeviceNotAvailableException | cihazla bağlantı kesilirse ve kurtarılamazsa. |
yürütmeAdbKomutu
public abstract String executeAdbCommand (long timeout,envMap, String... commandArgs)
Bir adb komutunu belirtilen bir zaman aşımına sahip bir sistem komutu olarak yürüten yardımcı yöntem.
Bunun yerine, mümkün olan her yerde, daha iyi hata algılaması ve performansı sağladığından, bunun yerine executeShellCommand(String)
kullanılmalıdır.
parametreler | |
---|---|
timeout | long : cihazın yanıt vermediği kabul edilmesinden önceki milisaniye cinsinden süre, zaman aşımı olmadığı için 0L |
envMap | |
commandArgs | String : adb komutu ve çalıştırılacak bağımsız değişkenler |
İadeler | |
---|---|
String | komuttan stdout. komut yürütülemezse null . |
Atar | |
---|---|
DeviceNotAvailableException | cihazla bağlantı kesilirse ve kurtarılamazsa. |
YürütFastbootCommand
public abstract CommandResult executeFastbootCommand (long timeout, String... commandArgs)
Bir fastboot komutunu bir sistem komutu olarak yürüten yardımcı yöntem.
Cihaz zaten fastboot modundayken kullanılması bekleniyor.parametreler | |
---|---|
timeout | long : komutun sona ermesinden önceki milisaniye cinsinden süre |
commandArgs | String : fastboot komutu ve çalıştırılacak bağımsız değişkenler |
İadeler | |
---|---|
CommandResult | komutun çıktısını içeren CommandResult |
Atar | |
---|---|
DeviceNotAvailableException | cihazla bağlantı kesilirse ve kurtarılamazsa. |
YürütFastbootCommand
public abstract CommandResult executeFastbootCommand (String... commandArgs)
2 dakikalık varsayılan zaman aşımı ile bir sistem komutu olarak bir fastboot komutunu yürüten yardımcı yöntem.
Cihaz zaten fastboot modundayken kullanılması bekleniyor.
parametreler | |
---|---|
commandArgs | String : fastboot komutu ve çalıştırılacak bağımsız değişkenler |
İadeler | |
---|---|
CommandResult | komutun çıktısını içeren CommandResult |
Atar | |
---|---|
DeviceNotAvailableException | cihazla bağlantı kesilirse ve kurtarılamazsa. |
ExecutLongFastbootCommand
public abstract CommandResult executeLongFastbootCommand (String... commandArgs)
Uzun süre çalışan bir fastboot komutunu bir sistem komutu olarak yürüten yardımcı yöntem.
Daha uzun bir zaman aşımı kullanması dışındaexecuteFastbootCommand(String)
ile aynıdır.parametreler | |
---|---|
commandArgs | String : fastboot komutu ve çalıştırılacak bağımsız değişkenler |
İadeler | |
---|---|
CommandResult | komutun çıktısını içeren CommandResult |
Atar | |
---|---|
DeviceNotAvailableException | cihazla bağlantı kesilirse ve kurtarılamazsa. |
ExecutLongFastbootCommand
public abstract CommandResult executeLongFastbootCommand (envVarMap, String... commandArgs)
Uzun süre çalışan bir fastboot komutunu, sistem ortamı değişkenleriyle bir sistem komutu olarak yürüten yardımcı yöntem.
Daha uzun bir zaman aşımı kullanması dışında executeFastbootCommand(String)
ile aynıdır.
parametreler | |
---|---|
envVarMap | |
commandArgs | String : fastboot komutu ve çalıştırılacak bağımsız değişkenler |
İadeler | |
---|---|
CommandResult | komutun çıktısını içeren CommandResult |
Atar | |
---|---|
DeviceNotAvailableException | cihazla bağlantı kesilirse ve kurtarılamazsa. |
ShellCommand'ı yürütmek
public abstract String executeShellCommand (String command)
Bir adb kabuk komutunu yürüten ve çıktıyı bir ERROR(/String)
olarak döndüren yardımcı yöntem.
parametreler | |
---|---|
command | String : çalıştırılacak adb shell komutu |
İadeler | |
---|---|
String | kabuk çıktısı |
Atar | |
---|---|
DeviceNotAvailableException | cihazla bağlantı kesilirse ve kurtarılamazsa. |
ShellCommand'ı yürütmek
public abstract void executeShellCommand (String command, IShellOutputReceiver receiver, long maxTimeToOutputShellResponse, TimeUnit timeUnit, int retryAttempts)
Komut davranışını kontrol etmek için daha fazla parametre içeren bir adb kabuğu komutu yürütür.
parametreler | |
---|---|
command | String : çalıştırılacak adb shell komutu |
receiver | IShellOutputReceiver : Kabuk çıktısını yönlendirmek için IShellOutputReceiver . |
maxTimeToOutputShellResponse | long : komutun herhangi bir yanıt vermemesine izin verilen maksimum süre; timeUnit belirtilen birim |
timeUnit | TimeUnit : maxTimeToOutputShellResponse için birim |
retryAttempts | int : bir istisna nedeniyle başarısız olursa, komutun yeniden deneneceği maksimum sayı. retryAttempts başarılı olmadan gerçekleştirilirse DeviceNotResponsiveException atılır. |
Atar | |
---|---|
DeviceNotAvailableException | cihazla bağlantı kesilirse ve kurtarılamazsa. |
Ayrıca bakınız:
ShellCommand'ı yürütmek
public abstract void executeShellCommand (String command, IShellOutputReceiver receiver, long maxTimeoutForCommand, long maxTimeToOutputShellResponse, TimeUnit timeUnit, int retryAttempts)
Komut davranışını kontrol etmek için daha fazla parametre içeren bir adb kabuğu komutu yürütür.
parametreler | |
---|---|
command | String : çalıştırılacak adb shell komutu |
receiver | IShellOutputReceiver : Kabuk çıktısını yönlendirmek için IShellOutputReceiver . |
maxTimeoutForCommand | long : komutun tamamlanması için maksimum zaman aşımı süresi; timeUnit belirtilen birim |
maxTimeToOutputShellResponse | long : komutun herhangi bir yanıt vermemesine izin verilen maksimum süre; timeUnit belirtilen birim |
timeUnit | TimeUnit : maxTimeToOutputShellResponse için birim |
retryAttempts | int : bir istisna nedeniyle başarısız olursa, komutun yeniden deneneceği maksimum sayı. retryAttempts başarılı olmadan gerçekleştirilirse DeviceNotResponsiveException atılır. |
Atar | |
---|---|
DeviceNotAvailableException | cihazla bağlantı kesilirse ve kurtarılamazsa. |
Ayrıca bakınız:
ShellCommand'ı yürütmek
public abstract void executeShellCommand (String command, IShellOutputReceiver receiver)
Verilen adb shell komutunu yürütür, komut başarısız olursa birden çok kez yeniden dener.
executeShellCommand(String, com.android.ddmlib.IShellOutputReceiver, long, TimeUnit, int)
öğesinin varsayılan değerlerle daha basit bir biçimi.parametreler | |
---|---|
command | String : çalıştırılacak adb shell komutu |
receiver | IShellOutputReceiver : Kabuk çıktısını yönlendirmek için IShellOutputReceiver . |
Atar | |
---|---|
DeviceNotAvailableException | cihazla bağlantı kesilirse ve kurtarılamazsa. |
YürütmeShellV2Command
public abstract CommandResult executeShellV2Command (String command)
Bir adb kabuk komutunu yürüten ve sonuçları, komut durum çıktısı, stdout ve stderr ile uygun şekilde doldurulmuş bir CommandResult
olarak döndüren yardımcı yöntem.
parametreler | |
---|---|
command | String : Çalıştırılması gereken komut. |
İadeler | |
---|---|
CommandResult | Sonuç CommandResult . |
Atar | |
---|---|
DeviceNotAvailableException | cihazla bağlantı kesilirse ve kurtarılamazsa. |
YürütmeShellV2Command
public abstract CommandResult executeShellV2Command (String command, OutputStream pipeToOutput)
Bir adb kabuk komutunu yürüten ve sonuçları, komut durumu çıktısı ve stderr ile uygun şekilde doldurulmuş bir CommandResult
olarak döndüren yardımcı yöntem. stdout belirtilen akışa yönlendirilir.
parametreler | |
---|---|
command | String : Çalıştırılması gereken komut. |
pipeToOutput | OutputStream : std çıktısının yeniden yönlendirileceği ERROR(/OutputStream) veya null. |
İadeler | |
---|---|
CommandResult | Sonuç CommandResult . |
Atar | |
---|---|
DeviceNotAvailableException | cihazla bağlantı kesilirse ve kurtarılamazsa. |
YürütmeShellV2Command
public abstract CommandResult executeShellV2Command (String command, File pipeAsInput)
Bir adb kabuk komutunu yürüten ve sonuçları, komut durumu çıktısı, stdout ve stderr ile uygun şekilde doldurulmuş bir CommandResult
olarak döndüren yardımcı yöntem.
parametreler | |
---|---|
command | String : Çalıştırılması gereken komut. |
pipeAsInput | File : Komuta girdi olarak aktarılacak bir ERROR(/File) veya boş. |
İadeler | |
---|---|
CommandResult | Sonuç CommandResult . |
Atar | |
---|---|
DeviceNotAvailableException | cihazla bağlantı kesilirse ve kurtarılamazsa. |
YürütmeShellV2Command
public abstract CommandResult executeShellV2Command (String command, long maxTimeoutForCommand, TimeUnit timeUnit, int retryAttempts)
Komut davranışını kontrol etmek için daha fazla parametre içeren bir adb kabuğu komutu yürütür.
parametreler | |
---|---|
command | String : çalıştırılacak adb shell komutu |
maxTimeoutForCommand | long : komutun tamamlanması için maksimum zaman aşımı süresi; timeUnit belirtilen birim |
timeUnit | TimeUnit : maxTimeToOutputShellResponse için birim |
retryAttempts | int : bir istisna nedeniyle başarısız olursa, komutun yeniden deneneceği maksimum sayı. retryAttempts başarılı olmadan gerçekleştirilirse DeviceNotResponsiveException atılır. |
İadeler | |
---|---|
CommandResult |
Atar | |
---|---|
DeviceNotAvailableException | cihazla bağlantı kesilirse ve kurtarılamazsa. |
Ayrıca bakınız:
YürütmeShellV2Command
public abstract CommandResult executeShellV2Command (String command, long maxTimeoutForCommand, TimeUnit timeUnit)
Komut davranışını kontrol etmek için daha fazla parametre içeren bir adb kabuğu komutu yürütür.
parametreler | |
---|---|
command | String : çalıştırılacak adb shell komutu |
maxTimeoutForCommand | long : komutun tamamlanması için maksimum zaman aşımı süresi; timeUnit belirtilen birim |
timeUnit | TimeUnit : maxTimeToOutputShellResponse için birim |
İadeler | |
---|---|
CommandResult |
Atar | |
---|---|
DeviceNotAvailableException | cihazla bağlantı kesilirse ve kurtarılamazsa. |
Ayrıca bakınız:
YürütmeShellV2Command
public abstract CommandResult executeShellV2Command (String command, File pipeAsInput, OutputStream pipeToOutput, long maxTimeoutForCommand, TimeUnit timeUnit, int retryAttempts)
Komut davranışını kontrol etmek için daha fazla parametre içeren bir adb kabuğu komutu yürütür.
parametreler | |
---|---|
command | String : çalıştırılacak adb shell komutu |
pipeAsInput | File : Komuta girdi olarak aktarılacak bir ERROR(/File) veya boş. |
pipeToOutput | OutputStream : std çıktısının yeniden yönlendirileceği ERROR(/OutputStream) veya null. |
maxTimeoutForCommand | long : komutun tamamlanması için maksimum zaman aşımı süresi; timeUnit belirtilen birim |
timeUnit | TimeUnit : maxTimeToOutputShellResponse için birim |
retryAttempts | int : bir istisna nedeniyle başarısız olursa, komutun yeniden deneneceği maksimum sayı. retryAttempts başarılı olmadan gerçekleştirilirse DeviceNotResponsiveException atılır. |
İadeler | |
---|---|
CommandResult |
Atar | |
---|---|
DeviceNotAvailableException | cihazla bağlantı kesilirse ve kurtarılamazsa. |
Ayrıca bakınız:
YürütmeShellV2Command
public abstract CommandResult executeShellV2Command (String command, File pipeAsInput, OutputStream pipeToOutput, OutputStream pipeToError, long maxTimeoutForCommand, TimeUnit timeUnit, int retryAttempts)
Komut davranışını kontrol etmek için daha fazla parametre içeren bir adb kabuğu komutu yürütür.
parametreler | |
---|---|
command | String : çalıştırılacak adb shell komutu |
pipeAsInput | File : Komuta girdi olarak aktarılacak bir ERROR(/File) veya boş. |
pipeToOutput | OutputStream : std çıktısının yeniden yönlendirileceği ERROR(/OutputStream) veya null. |
pipeToError | OutputStream : std hatasının yeniden yönlendirileceği ERROR(/OutputStream) veya null. |
maxTimeoutForCommand | long : komutun tamamlanması için maksimum zaman aşımı süresi; timeUnit belirtilen birim |
timeUnit | TimeUnit : maxTimeToOutputShellResponse için birim |
retryAttempts | int : bir istisna nedeniyle başarısız olursa, komutun yeniden deneneceği maksimum sayı. retryAttempts başarılı olmadan gerçekleştirilirse DeviceNotResponsiveException atılır. |
İadeler | |
---|---|
CommandResult |
Atar | |
---|---|
DeviceNotAvailableException | cihazla bağlantı kesilirse ve kurtarılamazsa. |
Ayrıca bakınız:
fastbootWipePartition
public abstract CommandResult fastbootWipePartition (String partition)
Aygıt için bir bölümü silen yardımcı yöntem.
getUseFastbootErase()
true
ise, bölümü silmek için fastboot erase kullanılır. Aygıtın bir sonraki açılışında aygıtın bir dosya sistemi oluşturması gerekir. Aksi takdirde, cihazda yeni bir dosya sistemi oluşturacak fastboot formatı kullanılır. Cihaz zaten fastboot modundayken kullanılması bekleniyor.parametreler | |
---|---|
partition | String : silinecek bölüm |
İadeler | |
---|---|
CommandResult | komutun çıktısını içeren CommandResult |
Atar | |
---|---|
DeviceNotAvailableException | cihazla bağlantı kesilirse ve kurtarılamazsa. |
getApiLevel
public abstract int getApiLevel ()
Cihaz API Düzeyini edinin. Varsayılanlar UNKNOWN_API_LEVEL
şeklindedir.
İadeler | |
---|---|
int | cihazın API Düzeyini gösteren bir tam sayı |
Atar | |
---|---|
| com.android.tradefed.device.DeviceNotAvailableException |
DeviceNotAvailableException |
GetBasebandVersion
public abstract String getBasebandVersion ()
Bu cihazın temel bant (radyo) sürümünü almak için kolaylık yöntemi. Radyo sürümünün alınması cihaza özeldir, bu nedenle tüm cihazlar için doğru bilgileri döndürmeyebilir. Bu yöntem, doğru sürüm bilgilerini döndürmek için gsm.version.baseband özelliğine dayanır. Bu, bazı CDMA cihazları için doğru değildir ve burada döndürülen sürüm, fastboot'tan bildirilen sürümle eşleşmeyebilir ve CDMA radyosu sürümünü döndürmeyebilir. TL;DR bu yöntem yalnızca gsm.version.baseband özelliği fastboot getvar version-baseband
tarafından döndürülen sürümle aynıysa doğru sürümü bildirir.
İadeler | |
---|---|
String | ERROR(/String) temel bant sürümü veya belirlenemiyorsa null (cihazın radyosu yok veya sürüm dizisi okunamıyor) |
Atar | |
---|---|
DeviceNotAvailableException | cihazla bağlantı kesilirse ve kurtarılamazsa. |
pil almak
public abstract Integer getBattery ()
Bir cihazın mevcut pil seviyesini veya pil seviyesi mevcut değilse Null değerini döndürür.
İadeler | |
---|---|
Integer |
getBooleanProperty
public abstract boolean getBooleanProperty (String name, boolean defaultValue)
Verilen özelliğin boole değerini döndürür.
parametreler | |
---|---|
name | String : özellik adı |
defaultValue | boolean : özellik boşsa veya yoksa döndürülecek varsayılan değer. |
İadeler | |
---|---|
boolean | özelliğin değeri "1" , "y" , "yes" , "on" veya "true" ise false , özelliğin değeri "0" , "n" , "no" , "off" ise true , Aksi takdirde "false" veya defaultValue . |
Atar | |
---|---|
DeviceNotAvailableException |
getBootHistory
public abstractgetBootHistory ()
Yardımcı yöntem, önyükleme geçmişi haritasını önyükleme zamanı ve önyükleme nedeni ile toplar.
İadeler | |
---|---|
Önyükleme zamanı haritası (Epoch'tan bu yana saniye olarak UTC zamanı) ve önyükleme nedeni |
Atar | |
---|---|
DeviceNotAvailableException |
getBootHistorySince
public abstractgetBootHistorySince (long utcEpochTime, TimeUnit timeUnit)
Yardımcı yöntem, önyükleme geçmişi haritasını, önyükleme zamanı ve önyükleme nedeni ile cihazdan çağdan bu yana verilen süre ve belirtilen zaman birimini toplar. Milisaniye cinsinden geçerli aygıt utcEpochTime, getDeviceDate()
yöntemiyle elde edilebilir.
parametreler | |
---|---|
utcEpochTime | long : Epoch'tan bu yana cihaz süresi. |
timeUnit | TimeUnit : zaman birimi TimeUnit . |
İadeler | |
---|---|
Önyükleme zamanı haritası (Epoch'tan bu yana saniye olarak UTC zamanı) ve önyükleme nedeni |
Atar | |
---|---|
DeviceNotAvailableException |
GetBootloader Sürümü
public abstract String getBootloaderVersion ()
Bu cihazın önyükleyici sürümünü almak için kolaylık yöntemi.
Cihazın mevcut durumundan önyükleyici sürümünü almaya çalışacak. (yani, cihaz fastboot modundaysa, fastboot'tan sürümü almaya çalışacaktır)İadeler | |
---|---|
String | ERROR(/String) önyükleyici sürümü veya bulunamıyorsa null |
Atar | |
---|---|
DeviceNotAvailableException | cihazla bağlantı kesilirse ve kurtarılamazsa. |
getBuildAlias
public abstract String getBuildAlias ()
Cihazın şu anda çalışmakta olduğu yapının diğer adını alın.
Yapı takma adı genellikle yapı kimliğinden daha okunabilir bir dizedir (tipik olarak Nexus yapıları için bir sayı). Örneğin, son Android 4.2 sürümü JDQ39 yapı takma adına ve 573038 yapı kimliğine sahiptir.
İadeler | |
---|---|
String | yapı takma adı veya alınamadıysa yapı kimliğine geri dönün |
Atar | |
---|---|
| com.android.tradefed.device.DeviceNotAvailableException |
DeviceNotAvailableException |
getBuildFlavour
public abstract String getBuildFlavor ()
Cihaz için yapı lezzetini alın.
İadeler | |
---|---|
String | yapı aroması veya alınamadıysa boş |
Atar | |
---|---|
| com.android.tradefed.device.DeviceNotAvailableException |
DeviceNotAvailableException |
getBuildId
public abstract String getBuildId ()
Cihazın şu anda çalışmakta olduğu yapıyı alın.
İadeler | |
---|---|
String | yapı kimliği veya alınamadıysa IBuildInfo#UNKNOWN_BUILD_ID |
Atar | |
---|---|
| com.android.tradefed.device.DeviceNotAvailableException |
DeviceNotAvailableException |
getBuildSigningKeys
public abstract String getBuildSigningKeys ()
Cihaz görüntüsünü imzalamak için kullanılan anahtar tipini döndürür
Tipik olarak Android cihazlar, test anahtarlarıyla (AOSP'deki gibi) veya serbest bırakma anahtarlarıyla (bireysel cihaz üreticileri tarafından kontrol edilir) imzalanabilir.
İadeler | |
---|---|
String | Bulunursa imza anahtarı, aksi halde boş. |
Atar | |
---|---|
| com.android.tradefed.device.DeviceNotAvailableException |
DeviceNotAvailableException |
getCachedDeviceDescriptor
public abstract DeviceDescriptor getCachedDeviceDescriptor ()
Aygıt ayrılmışsa önbelleğe alınmış bir DeviceDescriptor
döndürür, aksi takdirde geçerli DeviceDescriptor
döndürür.
İadeler | |
---|---|
DeviceDescriptor |
getCachedDeviceDescriptor
public abstract DeviceDescriptor getCachedDeviceDescriptor (boolean shortDescriptor)
Aygıt ayrılmışsa önbelleğe alınmış bir DeviceDescriptor
döndürür, aksi takdirde geçerli DeviceDescriptor
döndürür.
parametreler | |
---|---|
shortDescriptor | boolean : Tanımlayıcının minimum bilgi ile sınırlanıp sınırlanmaması |
İadeler | |
---|---|
DeviceDescriptor |
getChildren
public abstract String[] getChildren (String deviceFilePath)
Bazen izinler nedeniyle çalışmayan IFileEntry
kullanmaya alternatif.
parametreler | |
---|---|
deviceFilePath | String : aramanın yapılacağı cihazdaki yoldur |
İadeler | |
---|---|
String[] | Aygıttaki bir yoldaki tüm dosyayı içeren dize dizisi. |
Atar | |
---|---|
| com.android.tradefed.device.DeviceNotAvailableException |
DeviceNotAvailableException |
getConnection
public abstract AbstractConnection getConnection ()
Cihazla ilişkili bağlantıyı döndürür.
İadeler | |
---|---|
AbstractConnection |
getDeviceClass
public abstract String getDeviceClass ()
Cihaz sınıfını alın.
İadeler | |
---|---|
String | ERROR(/String) aygıt sınıfı. |
getDeviceDate
public abstract long getDeviceDate ()
Epoch'tan bu yana aygıtın tarihini milisaniye cinsinden döndürür.
İadeler | |
---|---|
long | cihazın çağ biçimindeki tarihi. |
Atar | |
---|---|
| com.android.tradefed.device.DeviceNotAvailableException |
DeviceNotAvailableException |
getDeviceDescriptor
public abstract DeviceDescriptor getDeviceDescriptor ()
Gerçek cihaz nesnesini geçirmeden hakkında bilgi almak için cihaz bilgisinden bir DeviceDescriptor
döndürün.
İadeler | |
---|---|
DeviceDescriptor |
getDeviceDescriptor
public abstract DeviceDescriptor getDeviceDescriptor (boolean shortDescriptor)
Gerçek cihaz nesnesini geçirmeden hakkında bilgi almak için cihaz bilgisinden bir DeviceDescriptor
döndürün.
parametreler | |
---|---|
shortDescriptor | boolean : Tanımlayıcının minimum bilgi ile sınırlanıp sınırlanmaması |
İadeler | |
---|---|
DeviceDescriptor |
getDeviceState
public abstract TestDeviceState getDeviceState ()
Cihazın durumunu alın.
İadeler | |
---|---|
TestDeviceState |
getDeviceTimeOffset
public abstract long getDeviceTimeOffset (Date date)
Cihaz ile belirli bir ERROR(/Date)
arasındaki zaman farkını almak için yardımcı. Epoch zamanını dahili olarak kullanın.
parametreler | |
---|---|
date | Date |
İadeler | |
---|---|
long | milisaniye cinsinden fark |
Atar | |
---|---|
DeviceNotAvailableException |
getEmulatorÇıktı
public abstract InputStreamSource getEmulatorOutput ()
Öykünücü stdout ve stderr akışını alın
İadeler | |
---|---|
InputStreamSource | emülatör çıkışı |
getExternalStoreFreeSpace
public abstract long getExternalStoreFreeSpace ()
Cihazın harici depolama alanındaki boş alan miktarını belirlemek için yardımcı yöntem.
İadeler | |
---|---|
long | KB cinsinden boş alan miktarı |
Atar | |
---|---|
DeviceNotAvailableException | cihazla bağlantı kesilirse ve kurtarılamazsa. |
getFastbootProductType
public abstract String getFastbootProductType ()
Fastboot modundayken bu cihazın ürün tipini almanın kolaylık yöntemi.
Bu yöntem, yalnızca cihazın hızlı önyüklemede olması gerekiyorsa kullanılmalıdır. Bu durumda, genelgetProductType()
yönteminden biraz daha güvenli bir değişkendir, çünkü ITestDevice, cihaz yanlış durumdaysa veya yanıt vermiyorsa cihazı fastboot'a kurtarmayı bilecektir.İadeler | |
---|---|
String | ERROR(/String) ürün türü adı veya belirlenemiyorsa null |
Atar | |
---|---|
DeviceNotAvailableException | cihazla bağlantı kesilirse ve kurtarılamazsa. |
getFastbootProductVariant
public abstract String getFastbootProductVariant ()
Fastboot modundayken bu cihazın ürün tipini almanın kolaylık yöntemi.
Bu yöntem, yalnızca cihazın hızlı önyüklemede olması gerekiyorsa kullanılmalıdır. Bu durumda, genelgetProductType()
yönteminden biraz daha güvenli bir değişkendir, çünkü ITestDevice, cihaz yanlış durumdaysa veya yanıt vermiyorsa cihazı fastboot'a kurtarmayı bilecektir.İadeler | |
---|---|
String | ERROR(/String) ürün türü adı veya belirlenemiyorsa null |
Atar | |
---|---|
DeviceNotAvailableException | cihazla bağlantı kesilirse ve kurtarılamazsa. |
getFastbootSerialNumber
public abstract String getFastbootSerialNumber ()
Fastboot modu seri numarasını döndürür.
İadeler | |
---|---|
String |
getFastbootDeğişkeni
public abstract String getFastbootVariable (String variableName)
Verilen fastboot değişken değerini cihazdan alın.
parametreler | |
---|---|
variableName | String : değişken adı |
İadeler | |
---|---|
String | özellik değeri veya yoksa null |
Atar | |
---|---|
| Desteklenmeyenİşlemİstisna |
DeviceNotAvailableException |
getFileEntry
public abstract IFileEntry getFileEntry (String path)
Cihazdaki uzak bir dosyaya referans alın.
parametreler | |
---|---|
path | String : alınacak dosya yolu. Mutlak bir yol veya '/' ile ilgili yol olabilir. (yani hem "/system" hem de "system" sözdizimi desteklenir) |
İadeler | |
---|---|
IFileEntry | verilen path dosya bulunamıyorsa IFileEntry veya null |
Atar | |
---|---|
| com.android.tradefed.device.DeviceNotAvailableException |
DeviceNotAvailableException |
getIDevice
public abstract IDevice getIDevice ()
İlişkili ddmlib IDevice
başvurusunu döndürür.
IDevice
tahsis edilebilir. Bu nedenle, arayanlar IDevice
bir referans tutmamalıdır, çünkü bu referans eski hale gelebilir.İadeler | |
---|---|
IDevice | IDevice |
getIntProperty
public abstract long getIntProperty (String name, long defaultValue)
Cihazdan verilen özelliğin tamsayı değerini döndürür.
parametreler | |
---|---|
name | String : özellik adı |
defaultValue | long : özellik boşsa veya yoksa döndürülecek varsayılan değer. |
İadeler | |
---|---|
long | özellik boşsa, yoksa veya bir tamsayı değeri yoksa özellik değeri veya defaultValue . |
Atar | |
---|---|
DeviceNotAvailableException |
getLastExpectedRebootTimeMillis
public abstract long getLastExpectedRebootTimeMillis ()
ERROR(/System#currentTimeMillis())
tarafından döndürüldüğü şekliyle, Tradefed API'lerinin EPOCH'tan bu yana milisaniye cinsinden en son ne zaman yeniden başlatmayı tetiklediğini döndürür.
İadeler | |
---|---|
long |
getLaunchApiLevel
public abstract int getLaunchApiLevel ()
Cihazın ilk başlatılan API Düzeyini edinin. Varsayılanlar UNKNOWN_API_LEVEL
şeklindedir.
İadeler | |
---|---|
int | cihazın ilk başlatılan API Düzeyini gösteren bir tamsayı |
Atar | |
---|---|
| com.android.tradefed.device.DeviceNotAvailableException |
DeviceNotAvailableException |
getLogcat
public abstract InputStreamSource getLogcat ()
Logcat verilerinin anlık görüntü akışını yakalar.
İki modda çalışır:
TestDeviceOptions.getMaxLogcatDataSize()
baytına kadar geri dönerİadeler | |
---|---|
InputStreamSource |
getLogcat
public abstract InputStreamSource getLogcat (int maxBytes)
Yakalanan logcat verilerinin son maxBytes
anlık görüntü akışını yakalar.
getLogcat()
anlık görüntüsünün tamamını alma potansiyeline sahip büyük disk alanı cezasına maruz kalmadan, yakalanan logcat verilerinin sık sık anlık görüntülerini yakalamak istediğiniz durumlar için kullanışlıdır.
parametreler | |
---|---|
maxBytes | int : döndürülecek maksimum veri miktarı. Hafızaya rahatça sığabilecek bir miktar olmalı |
İadeler | |
---|---|
InputStreamSource |
getLogcatDump
public abstract InputStreamSource getLogcatDump ()
Cihaz için geçerli logcat dökümünü alın. getLogcat()
yönteminden farklı olarak, bu yöntem her zaman logcat'in statik bir dökümünü döndürür.
Cihaza ulaşılamıyorsa hiçbir şeyin iade edilmemesi dezavantajına sahiptir.
İadeler | |
---|---|
InputStreamSource | logcat verilerinin bir InputStreamSource . Logcat verileri yakalanamazsa boş bir akış döndürülür. |
getLogcatSince
public abstract InputStreamSource getLogcatSince (long date)
Sağlanan tarihten başlayarak yakalanan logcat verilerinin anlık görüntü akışını yakalar. Cihazdaki saat getDeviceDate()
kullanılmalıdır.
parametreler | |
---|---|
date | long : anlık görüntünün ne zaman başlatılacağına ilişkin epoch biçiminden bu yana milisaniye cinsinden. ('tarih +%s' kullanılarak elde edilebilir) |
İadeler | |
---|---|
InputStreamSource |
getMountPoint
public abstract String getMountPoint (String mountName)
Bir bağlama noktası döndürür.
IDevice
alınmış bilgi mevcut değilse, cihazı doğrudan sorgular. YAPILACAKLAR: bu davranışı IDevice#getMountPoint(String)
konumuna taşıyınparametreler | |
---|---|
mountName | String : bağlama noktasının adı |
İadeler | |
---|---|
String | bağlama noktası veya null |
Ayrıca bakınız:
getMountPointInfo
public abstract ITestDevice.MountPointInfo getMountPointInfo (String mountpoint)
Belirtilen bağlama noktası yoluna karşılık gelen bir MountPointInfo
döndürür veya bu yolda bağlı hiçbir şey yoksa veya /proc/mounts içinde bir bağlama noktası olarak görünmüyorsa null
döndürür.
parametreler | |
---|---|
mountpoint | String |
İadeler | |
---|---|
ITestDevice.MountPointInfo | "/proc/mounts" içindeki bilgileri içeren MountPointInfo ERROR(/List) |
Atar | |
---|---|
DeviceNotAvailableException |
Ayrıca bakınız:
getMountPointInfo
public abstractgetMountPointInfo ()
Cihazdaki /proc/mounts içindeki bilgilerin ayrıştırılmış bir sürümünü döndürür
İadeler | |
---|---|
"/proc/mounts" içindeki bilgileri içeren MountPointInfo ERROR(/List) |
Atar | |
---|---|
DeviceNotAvailableException |
GetPartitionFreeSpace
public abstract long getPartitionFreeSpace (String partition)
Aygıt bölümündeki boş alan miktarını belirlemek için yardımcı yöntem.
parametreler | |
---|---|
partition | String |
İadeler | |
---|---|
long | the amount of free space in KB |
Atar | |
---|---|
DeviceNotAvailableException | cihazla bağlantı kesilirse ve kurtarılamazsa. |
getProcessByName
public abstract ProcessInfo getProcessByName (String processName)
Helper method runs the "pidof" and "stat" command and returns ProcessInfo
object with PID and process start time of the given process.
parametreler | |
---|---|
processName | String : the proces name String. |
İadeler | |
---|---|
ProcessInfo | ProcessInfo of given processName |
Atar | |
---|---|
DeviceNotAvailableException |
getProcessPid
public abstract String getProcessPid (String process)
Returns the pid of the service or null if something went wrong.
parametreler | |
---|---|
process | String : The proces name String. |
İadeler | |
---|---|
String |
Atar | |
---|---|
DeviceNotAvailableException |
getProductType
public abstract String getProductType ()
Convenience method to get the product type of this device.
This method will work if device is in either adb or fastboot mode.İadeler | |
---|---|
String | the ERROR(/String) product type name. Will not be null |
Atar | |
---|---|
DeviceNotAvailableException | if connection with device is lost and cannot be recovered, or if product type can not be determined |
getProductVariant
public abstract String getProductVariant ()
Convenience method to get the product variant of this device.
This method will work if device is in either adb or fastboot mode.İadeler | |
---|---|
String | the ERROR(/String) product variant name or null if it cannot be determined |
Atar | |
---|---|
DeviceNotAvailableException | cihazla bağlantı kesilirse ve kurtarılamazsa. |
getProperty
public abstract String getProperty (String name)
Retrieve the given property value from the device.
parametreler | |
---|---|
name | String : the property name |
İadeler | |
---|---|
String | the property value or null if it does not exist |
Atar | |
---|---|
| com.android.tradefed.device.DeviceNotAvailableException |
DeviceNotAvailableException |
getRecoveryMode
public abstract ITestDevice.RecoveryMode getRecoveryMode ()
Get the current recovery mode used for the device.
İadeler | |
---|---|
ITestDevice.RecoveryMode | the current recovery mode used for the device. |
getSerialNumber
public abstract String getSerialNumber ()
Convenience method to get serial number of this device.
İadeler | |
---|---|
String | the ERROR(/String) serial number |
getTombstones
public abstractgetTombstones ()
Fetch and return the list of tombstones from the devices. Requires root.
method is best-effort so if one tombstone fails to be pulled for any reason it will be missing from the list. Only a DeviceNotAvailableException
will terminate the method early.
İadeler | |
---|---|
A list of tombstone files, empty if no tombstone. |
Atar | |
---|---|
DeviceNotAvailableException |
See also:
getTotalMemory
public abstract long getTotalMemory ()
Returns total physical memory size in bytes or -1 in case of internal error
İadeler | |
---|---|
long |
getUseFastbootErase
public abstract boolean getUseFastbootErase ()
Get whether to use fastboot erase or fastboot format to wipe a partition on the device.
İadeler | |
---|---|
boolean | true if fastboot erase will be used or false if fastboot format will be used. |
See also:
isAdbRoot
public abstract boolean isAdbRoot ()
İadeler | |
---|---|
boolean | true if device currently has adb root, false otherwise. |
Atar | |
---|---|
DeviceNotAvailableException | cihazla bağlantı kesilirse ve kurtarılamazsa. |
isAdbTcp
public abstract boolean isAdbTcp ()
İadeler | |
---|---|
boolean | true if device is connected to adb-over-tcp, false otherwise. |
isAppEnumerationSupported
public abstract boolean isAppEnumerationSupported ()
Check whether platform on device supports app enumeration
İadeler | |
---|---|
boolean | True if app enumeration is supported, false otherwise |
Atar | |
---|---|
| com.android.tradefed.device.DeviceNotAvailableException |
DeviceNotAvailableException |
isBypassLowTargetSdkBlockSupported
public abstract boolean isBypassLowTargetSdkBlockSupported ()
Check whether platform on device supports bypassing low target sdk block on app installs
İadeler | |
---|---|
boolean | True if bypass low target sdk block is supported, false otherwise |
Atar | |
---|---|
| com.android.tradefed.device.DeviceNotAvailableException |
DeviceNotAvailableException |
isDeviceEncrypted
public abstract boolean isDeviceEncrypted ()
Returns if the device is encrypted.
İadeler | |
---|---|
boolean | true if the device is encrypted. |
Atar | |
---|---|
DeviceNotAvailableException | cihazla bağlantı kesilirse ve kurtarılamazsa. |
isDirectory
public abstract boolean isDirectory (String deviceFilePath)
Return True if the path on the device is a directory, false otherwise.
parametreler | |
---|---|
deviceFilePath | String |
İadeler | |
---|---|
boolean |
Atar | |
---|---|
| com.android.tradefed.device.DeviceNotAvailableException |
DeviceNotAvailableException |
isEncryptionSupported
public abstract boolean isEncryptionSupported ()
Returns if encryption is supported on the device.
İadeler | |
---|---|
boolean | true if the device supports encryption. |
Atar | |
---|---|
| com.android.tradefed.device.DeviceNotAvailableException |
DeviceNotAvailableException |
isExecutable
public abstract boolean isExecutable (String fullPath)
Returns True if the file path on the device is an executable file, false otherwise.
parametreler | |
---|---|
fullPath | String |
İadeler | |
---|---|
boolean |
Atar | |
---|---|
| com.android.tradefed.device.DeviceNotAvailableException |
DeviceNotAvailableException |
isHeadless
public abstract boolean isHeadless ()
Return true if the device is headless (no screen), false otherwise.
İadeler | |
---|---|
boolean |
Atar | |
---|---|
DeviceNotAvailableException |
isRuntimePermissionSupported
public abstract boolean isRuntimePermissionSupported ()
Check whether platform on device supports runtime permission granting
İadeler | |
---|---|
boolean | True if runtime permission are supported, false otherwise. |
Atar | |
---|---|
| com.android.tradefed.device.DeviceNotAvailableException |
DeviceNotAvailableException |
isStateBootloaderOrFastbootd
public abstract boolean isStateBootloaderOrFastbootd ()
Returns true if device is in TestDeviceState#FASTBOOT
or TestDeviceState.FASTBOOTD
.
İadeler | |
---|---|
boolean |
logAnrs
public abstract boolean logAnrs (ITestLogger logger)
Collects and log ANRs from the device.
parametreler | |
---|---|
logger | ITestLogger : an ITestLogger to log the ANRs. |
İadeler | |
---|---|
boolean | True if the logging was successful, false otherwise. |
Atar | |
---|---|
DeviceNotAvailableException |
logOnDevice
public abstract void logOnDevice (String tag, Log.LogLevel level, String format, Object... args)
Log a message in the logcat of the device. This is a safe call that will not throw even if the logging fails.
parametreler | |
---|---|
tag | String : The tag under which we log our message in the logcat. |
level | Log.LogLevel : The debug level of the message in the logcat. |
format | String : The message format. |
args | Object : the args to be replaced via String.format(). |
nonBlockingReboot
public abstract void nonBlockingReboot ()
Issues a command to reboot device and returns on command complete and when device is no longer visible to adb.
Atar | |
---|---|
| com.android.tradefed.device.DeviceNotAvailableException |
DeviceNotAvailableException |
postBootSetup
public abstract void postBootSetup ()
Perform instructions to configure device for testing that after every boot.
Should be called after device is fully booted/available In normal circumstances this method doesn't need to be called explicitly, as implementations should perform these steps automatically when performing a reboot. Where it may need to be called is when device reboots due to other events (eg when a fastboot update command has completed)Atar | |
---|---|
DeviceNotAvailableException | cihazla bağlantı kesilirse ve kurtarılamazsa. |
postInvocationTearDown
public void postInvocationTearDown ()
Bu yöntem kullanımdan kaldırıldı.
Use postInvocationTearDown(Throwable)
instead.
Extra steps for device specific required clean up that will be executed after the invocation is done.
postInvocationTearDown
public abstract void postInvocationTearDown (Throwable invocationException)
Extra steps for device specific required clean up that will be executed after the invocation is done.
parametreler | |
---|---|
invocationException | Throwable : if any, the final exception raised by the invocation failure. |
preInvocationSetup
public void preInvocationSetup (IBuildInfo info, MultiMap<String, String> attributes)
Extra steps for device specific required setup that will be executed on the device prior to the invocation flow.
parametreler | |
---|---|
info | IBuildInfo : The IBuildInfo of the device. |
attributes | MultiMap : The attributes stored in the invocation context |
Atar | |
---|---|
| com.android.tradefed.targetprep.TargetSetupError |
| com.android.tradefed.device.DeviceNotAvailableException |
DeviceNotAvailableException | |
TargetSetupError |
pullDir
public abstract boolean pullDir (String deviceFilePath, File localDir)
Recursively pull directory contents from device.
parametreler | |
---|---|
deviceFilePath | String : the absolute file path of the remote source |
localDir | File : the local directory to pull files into |
İadeler | |
---|---|
boolean | true if file was pulled successfully. false otherwise. |
Atar | |
---|---|
DeviceNotAvailableException | cihazla bağlantı kesilirse ve kurtarılamazsa. |
pullFile
public abstract File pullFile (String remoteFilePath, int userId)
Retrieves a file off device, stores it in a local temporary ERROR(/File)
, and returns that File
.
parametreler | |
---|---|
remoteFilePath | String : the absolute path to file on device. |
userId | int : The user id to pull from |
İadeler | |
---|---|
File | A ERROR(/File) containing the contents of the device file, or null if the copy failed for any reason (including problems with the host filesystem) |
Atar | |
---|---|
DeviceNotAvailableException | cihazla bağlantı kesilirse ve kurtarılamazsa. |
pullFile
public abstract File pullFile (String remoteFilePath)
Retrieves a file off device, stores it in a local temporary ERROR(/File)
, and returns that File
.
parametreler | |
---|---|
remoteFilePath | String : the absolute path to file on device. |
İadeler | |
---|---|
File | A ERROR(/File) containing the contents of the device file, or null if the copy failed for any reason (including problems with the host filesystem) |
Atar | |
---|---|
DeviceNotAvailableException | cihazla bağlantı kesilirse ve kurtarılamazsa. |
pullFile
public abstract boolean pullFile (String remoteFilePath, File localFile)
Retrieves a file off device.
parametreler | |
---|---|
remoteFilePath | String : the absolute path to file on device. |
localFile | File : the local file to store contents in. If non-empty, contents will be replaced. |
İadeler | |
---|---|
boolean | true if file was retrieved successfully. false otherwise. |
Atar | |
---|---|
DeviceNotAvailableException | cihazla bağlantı kesilirse ve kurtarılamazsa. |
pullFile
public abstract boolean pullFile (String remoteFilePath, File localFile, int userId)
Retrieves a file off device.
parametreler | |
---|---|
remoteFilePath | String : the absolute path to file on device. |
localFile | File : the local file to store contents in. If non-empty, contents will be replaced. |
userId | int : The user id to pull from |
İadeler | |
---|---|
boolean | true if file was retrieved successfully. false otherwise. |
Atar | |
---|---|
DeviceNotAvailableException | cihazla bağlantı kesilirse ve kurtarılamazsa. |
pullFileContents
public abstract String pullFileContents (String remoteFilePath)
Retrieves a file off device, and returns the contents.
parametreler | |
---|---|
remoteFilePath | String : the absolute path to file on device. |
İadeler | |
---|---|
String | A ERROR(/String) containing the contents of the device file, or null if the copy failed for any reason (including problems with the host filesystem) |
Atar | |
---|---|
DeviceNotAvailableException |
pullFileFromExternal
public abstract File pullFileFromExternal (String remoteFilePath)
A convenience method to retrieve a file from the device's external storage, stores it in a local temporary ERROR(/File)
, and return a reference to that File
.
parametreler | |
---|---|
remoteFilePath | String : the path to file on device, relative to the device's external storage mountpoint |
İadeler | |
---|---|
File | A ERROR(/File) containing the contents of the device file, or null if the copy failed for any reason (including problems with the host filesystem) |
Atar | |
---|---|
DeviceNotAvailableException | cihazla bağlantı kesilirse ve kurtarılamazsa. |
pushDir
public abstract boolean pushDir (File localDir, String deviceFilePath,excludedDirectories)
Recursively push directory contents to device while excluding some directories that are filtered.
parametreler | |
---|---|
localDir | File : the local directory to push |
deviceFilePath | String : the absolute file path of the remote destination |
excludedDirectories |
İadeler | |
---|---|
boolean | true if file was pushed successfully. false otherwise. |
Atar | |
---|---|
DeviceNotAvailableException | cihazla bağlantı kesilirse ve kurtarılamazsa. |
pushDir
public abstract boolean pushDir (File localDir, String deviceFilePath)
Recursively push directory contents to device.
parametreler | |
---|---|
localDir | File : the local directory to push |
deviceFilePath | String : the absolute file path of the remote destination |
İadeler | |
---|---|
boolean | true if file was pushed successfully. false otherwise. |
Atar | |
---|---|
DeviceNotAvailableException | cihazla bağlantı kesilirse ve kurtarılamazsa. |
pushFile
public abstract boolean pushFile (File localFile, String deviceFilePath, boolean evaluateContentProviderNeeded)
Variant of pushFile(File, String)
which can optionally consider evaluating the need for the content provider.
parametreler | |
---|---|
localFile | File : the local file to push |
deviceFilePath | String : the remote destination absolute file path |
evaluateContentProviderNeeded | boolean : whether to check if we need the content provider |
İadeler | |
---|---|
boolean | true if file was pushed successfully. false otherwise. |
Atar | |
---|---|
DeviceNotAvailableException | cihazla bağlantı kesilirse ve kurtarılamazsa. |
pushFile
public abstract boolean pushFile (File localFile, String deviceFilePath)
Push a file to device. By default using a content provider.
parametreler | |
---|---|
localFile | File : the local file to push |
deviceFilePath | String : the remote destination absolute file path |
İadeler | |
---|---|
boolean | true if file was pushed successfully. false otherwise. |
Atar | |
---|---|
DeviceNotAvailableException | cihazla bağlantı kesilirse ve kurtarılamazsa. |
pushString
public abstract boolean pushString (String contents, String deviceFilePath)
Push file created from a string to device
parametreler | |
---|---|
contents | String : the contents of the file to push |
deviceFilePath | String : the remote destination absolute file path |
İadeler | |
---|---|
boolean | true if string was pushed successfully. false otherwise. |
Atar | |
---|---|
DeviceNotAvailableException | cihazla bağlantı kesilirse ve kurtarılamazsa. |
reboot
public abstract void reboot ()
Reboots the device into adb mode.
Blocks until device becomes available.Atar | |
---|---|
DeviceNotAvailableException | if device is not available after reboot |
reboot
public abstract void reboot (String reason)
Reboots the device into adb mode with given reason
to be persisted across reboot.
Blocks until device becomes available.
Last reboot reason can be obtained by querying sys.boot.reason
propety.
parametreler | |
---|---|
reason | String : a reason for this reboot, or null if no reason is specified. |
Atar | |
---|---|
DeviceNotAvailableException | if device is not available after reboot |
rebootIntoBootloader
public abstract void rebootIntoBootloader ()
Reboots the device into bootloader mode.
Blocks until device is in bootloader mode.Atar | |
---|---|
DeviceNotAvailableException | cihazla bağlantı kesilirse ve kurtarılamazsa. |
rebootIntoFastbootd
public abstract void rebootIntoFastbootd ()
Reboots the device into fastbootd mode.
Blocks until device is in fastbootd mode.
Atar | |
---|---|
DeviceNotAvailableException | cihazla bağlantı kesilirse ve kurtarılamazsa. |
rebootIntoRecovery
public abstract void rebootIntoRecovery ()
Reboots the device into adb recovery mode.
Blocks until device enters recoveryAtar | |
---|---|
DeviceNotAvailableException | if device is not available after reboot |
rebootIntoSideload
public abstract void rebootIntoSideload (boolean autoReboot)
Reboots the device into adb sideload mode (note that this is a special mode under recovery)
Blocks until device enters sideload mode
parametreler | |
---|---|
autoReboot | boolean : whether to automatically reboot the device after sideload |
Atar | |
---|---|
DeviceNotAvailableException | if device is not in sideload after reboot |
rebootIntoSideload
public abstract void rebootIntoSideload ()
Reboots the device into adb sideload mode (note that this is a special mode under recovery)
Blocks until device enters sideload mode
Atar | |
---|---|
DeviceNotAvailableException | if device is not in sideload after reboot |
rebootUntilOnline
public abstract void rebootUntilOnline ()
An alternate to reboot()
that only blocks until device is online ie visible to adb.
Atar | |
---|---|
DeviceNotAvailableException | if device is not available after reboot |
rebootUntilOnline
public abstract void rebootUntilOnline (String reason)
An alternate to reboot()
that only blocks until device is online ie visible to adb.
parametreler | |
---|---|
reason | String : a reason for this reboot, or null if no reason is specified. |
Atar | |
---|---|
DeviceNotAvailableException | if device is not available after reboot |
See also:
rebootUserspace
public abstract void rebootUserspace ()
Reboots only userspace part of device.
Blocks until device becomes available.
WARNING. Userspace reboot is currently under active development, use it on your own risk.
Atar | |
---|---|
DeviceNotAvailableException | if device is not available after reboot |
rebootUserspaceUntilOnline
public abstract void rebootUserspaceUntilOnline ()
An alternate to rebootUserspace()
()} that only blocks until device is online ie visible to adb.
Atar | |
---|---|
DeviceNotAvailableException | if device is not available after reboot |
remountSystemWritable
public abstract void remountSystemWritable ()
Make the system partition on the device writable. May reboot the device.
Atar | |
---|---|
| com.android.tradefed.device.DeviceNotAvailableException |
DeviceNotAvailableException |
remountVendorWritable
public abstract void remountVendorWritable ()
Make the vendor partition on the device writable. May reboot the device.
Atar | |
---|---|
| com.android.tradefed.device.DeviceNotAvailableException |
DeviceNotAvailableException |
runInstrumentationTests
public abstract boolean runInstrumentationTests (IRemoteAndroidTestRunner runner, ITestLifeCycleReceiver... listeners)
Convenience method for performing ERROR(/#runInstrumentationTests(com.android.ddmlib.testrunner.IRemoteAndroidTestRunner,Collection))
with one or more listeners passed as parameters.
parametreler | |
---|---|
runner | IRemoteAndroidTestRunner : the IRemoteAndroidTestRunner which runs the tests |
listeners | ITestLifeCycleReceiver : the test result listener(s) |
İadeler | |
---|---|
boolean | true if test command completed. false if it failed to complete, but recovery succeeded |
Atar | |
---|---|
DeviceNotAvailableException | cihazla bağlantı kesilirse ve kurtarılamazsa. ie test command failed to complete and recovery failed. |
runInstrumentationTests
public abstract boolean runInstrumentationTests (IRemoteAndroidTestRunner runner,listeners)
Runs instrumentation tests, and provides device recovery.
If connection with device is lost before test run completes, and recovery succeeds, all listeners will be informed of testRunFailed and "false" will be returned. The test command will not be rerun. It is left to callers to retry if necessary.
If connection with device is lost before test run completes, and recovery fails, all listeners will be informed of testRunFailed and DeviceNotAvailableException will be thrown.
parametreler | |
---|---|
runner | IRemoteAndroidTestRunner : the IRemoteAndroidTestRunner which runs the tests |
listeners |
İadeler | |
---|---|
boolean | true if test command completed. false if it failed to complete due to device communication exception, but recovery succeeded |
Atar | |
---|---|
DeviceNotAvailableException | cihazla bağlantı kesilirse ve kurtarılamazsa. ie test command failed to complete and recovery failed. |
runInstrumentationTestsAsUser
public abstract boolean runInstrumentationTestsAsUser (IRemoteAndroidTestRunner runner, int userId,listeners)
Same as ERROR(ITestDevice#runInstrumentationTests(IRemoteAndroidTestRunner, Collection)/com.android.tradefed.device.ITestDevice#runInstrumentationTests(com.android.ddmlib.testrunner.IRemoteAndroidTestRunner,Collection) ITestDevice#runInstrumentationTests(IRemoteAndroidTestRunner, Collection))
but runs the test for the given user.
parametreler | |
---|---|
runner | IRemoteAndroidTestRunner |
userId | int |
listeners |
İadeler | |
---|---|
boolean |
Atar | |
---|---|
DeviceNotAvailableException |
runInstrumentationTestsAsUser
public abstract boolean runInstrumentationTestsAsUser (IRemoteAndroidTestRunner runner, int userId, ITestLifeCycleReceiver... listeners)
Same as ITestDevice#runInstrumentationTests(IRemoteAndroidTestRunner, ITestLifeCycleReceiver...)
but runs the test for a given user.
parametreler | |
---|---|
runner | IRemoteAndroidTestRunner |
userId | int |
listeners | ITestLifeCycleReceiver |
İadeler | |
---|---|
boolean |
Atar | |
---|---|
DeviceNotAvailableException |
setDate
public abstract void setDate (Date date)
Sets the date on device
Note: setting date on device requires root
parametreler | |
---|---|
date | Date : specify a particular date; will use host date if null |
Atar | |
---|---|
| com.android.tradefed.device.DeviceNotAvailableException |
DeviceNotAvailableException |
setOptions
public abstract void setOptions (TestDeviceOptions options)
Set the TestDeviceOptions
for the device
parametreler | |
---|---|
options | TestDeviceOptions |
setProperty
public abstract boolean setProperty (String propKey, String propValue)
Sets the given property value on the device. Requires adb root is true.
parametreler | |
---|---|
propKey | String : The key targeted to be set. |
propValue | String : The property value to be set. |
İadeler | |
---|---|
boolean | returns True if the setprop command was successful, False otherwise. |
Atar | |
---|---|
| com.android.tradefed.device.DeviceNotAvailableException |
DeviceNotAvailableException |
setRecovery
public abstract void setRecovery (IDeviceRecovery recovery)
Set the IDeviceRecovery
to use for this device. Should be set when device is first allocated.
parametreler | |
---|---|
recovery | IDeviceRecovery : the IDeviceRecovery |
setRecoveryMode
public abstract void setRecoveryMode (ITestDevice.RecoveryMode mode)
Set the current recovery mode to use for the device.
Used to control what recovery method to use when a device communication problem is encountered. Its recommended to only use this method sparingly when needed (for example, when framework is down, etcparametreler | |
---|---|
mode | ITestDevice.RecoveryMode : whether 'recover till online only' mode should be on or not. |
setUseFastbootErase
public abstract void setUseFastbootErase (boolean useFastbootErase)
Set whether to use fastboot erase or fastboot format to wipe a partition on the device.
parametreler | |
---|---|
useFastbootErase | boolean : true if fastboot erase should be used or false if fastboot format should be used. |
See also:
startLogcat
public abstract void startLogcat ()
Start capturing logcat output from device in the background.
Will have no effect if logcat output is already being captured. Data can be later retrieved via getLogcat. When the device is no longer in use,stopLogcat()
must be called. startLogcat()
and stopLogcat()
do not normally need to be called when within a TF invocation context, as the TF framework will start and stop logcat.stopEmulatorOutput
public abstract void stopEmulatorOutput ()
Close and delete the emulator output.
stopLogcat
public abstract void stopLogcat ()
Stop capturing logcat output from device, and discard currently saved logcat data.
Will have no effect if logcat output is not being captured.switchToAdbTcp
public abstract String switchToAdbTcp ()
Switch device to adb-over-tcp mode.
İadeler | |
---|---|
String | the tcp serial number or null if device could not be switched |
Atar | |
---|---|
| com.android.tradefed.device.DeviceNotAvailableException |
DeviceNotAvailableException |
switchToAdbUsb
public abstract boolean switchToAdbUsb ()
Switch device to adb over usb mode.
İadeler | |
---|---|
boolean | true if switch was successful, false otherwise. |
Atar | |
---|---|
| com.android.tradefed.device.DeviceNotAvailableException |
DeviceNotAvailableException |
syncFiles
public abstract boolean syncFiles (File localFileDir, String deviceFilePath)
Incrementally syncs the contents of a local file directory to device.
Decides which files to push by comparing timestamps of local files with their remote equivalents. Only 'newer' or non-existent files will be pushed to device. Thus overhead should be relatively small if file set on device is already up to date. Hidden files (with names starting with ".") will be ignored. Example usage: syncFiles("/tmp/files", "/sdcard") will created a /sdcard/files directory if it doesn't already exist, and recursively push the /tmp/files contents to /sdcard/files.parametreler | |
---|---|
localFileDir | File : the local file directory containing files to recursively push. |
deviceFilePath | String : the remote destination absolute file path root. All directories in thos file path must be readable. ie pushing to /data/local/tmp when adb is not root will fail |
İadeler | |
---|---|
boolean | true if files were synced successfully. false otherwise. |
Atar | |
---|---|
DeviceNotAvailableException | cihazla bağlantı kesilirse ve kurtarılamazsa. |
unlockDevice
public abstract boolean unlockDevice ()
Unlocks the device if the device is in an encrypted state.
This method may restart the framework but will not callpostBootSetup()
. Therefore, the device might not be fully ready to be tested when this method returns.İadeler | |
---|---|
boolean | true if successful or if the device is unencrypted. |
Atar | |
---|---|
DeviceNotAvailableException | cihazla bağlantı kesilirse ve kurtarılamazsa. |
| if encryption is not supported on the device. |
waitForBootComplete
public abstract boolean waitForBootComplete (long timeOut)
Blocks until the device's boot complete flag is set.
parametreler | |
---|---|
timeOut | long : time in msecs to wait for the flag to be set |
İadeler | |
---|---|
boolean | true if device's boot complete flag is set within the timeout |
Atar | |
---|---|
| com.android.tradefed.device.DeviceNotAvailableException |
DeviceNotAvailableException |
waitForDeviceAvailable
public abstract boolean waitForDeviceAvailable ()
Waits for the device to be responsive and available for testing. Uses default timeout.
İadeler | |
---|---|
boolean | True if device is available, False if recovery is disabled and unavailable. |
Atar | |
---|---|
DeviceNotAvailableException | cihazla bağlantı kesilirse ve kurtarılamazsa. |
waitForDeviceAvailable
public abstract boolean waitForDeviceAvailable (long waitTime)
Waits for the device to be responsive and available for testing.
parametreler | |
---|---|
waitTime | long : the time in ms to wait |
İadeler | |
---|---|
boolean | True if device is available, False if recovery is disabled and unavailable. |
Atar | |
---|---|
DeviceNotAvailableException | if device is still unresponsive after waitTime expires. |
waitForDeviceAvailableInRecoverPath
public abstract boolean waitForDeviceAvailableInRecoverPath (long waitTime)
Waits for the device to be responsive and available without considering recovery path.
parametreler | |
---|---|
waitTime | long |
İadeler | |
---|---|
boolean | True if device is available, False if unavailable. |
Atar | |
---|---|
DeviceNotAvailableException | cihazla bağlantı kesilirse ve kurtarılamazsa. |
waitForDeviceBootloader
public abstract void waitForDeviceBootloader ()
Blocks until device is visible via fastboot. Use default timeout.
Atar | |
---|---|
DeviceNotAvailableException | cihazla bağlantı kesilirse ve kurtarılamazsa. |
waitForDeviceInRecovery
public abstract boolean waitForDeviceInRecovery (long waitTime)
Blocks for the device to be in the 'adb recovery' state (note this is distinct from IDeviceRecovery
).
parametreler | |
---|---|
waitTime | long : the time in ms to wait |
İadeler | |
---|---|
boolean | true if device boots into recovery before time expires. false otherwise |
waitForDeviceInSideload
public abstract boolean waitForDeviceInSideload (long waitTime)
Blocks for the device to be in the 'adb sideload' state
parametreler | |
---|---|
waitTime | long : the time in ms to wait |
İadeler | |
---|---|
boolean | true if device boots into sideload before time expires. false otherwise |
waitForDeviceNotAvailable
public abstract boolean waitForDeviceNotAvailable (long waitTime)
Blocks for the device to be not available ie missing from adb
parametreler | |
---|---|
waitTime | long : the time in ms to wait |
İadeler | |
---|---|
boolean | true if device becomes not available before time expires. false otherwise |
waitForDeviceOnline
public abstract void waitForDeviceOnline ()
Blocks until device is visible via adb. Uses default timeout
Note the device may not necessarily be responsive to commands on completion. UsewaitForDeviceAvailable()
instead.Atar | |
---|---|
DeviceNotAvailableException | cihazla bağlantı kesilirse ve kurtarılamazsa. |
waitForDeviceOnline
public abstract void waitForDeviceOnline (long waitTime)
Blocks until device is visible via adb.
Note the device may not necessarily be responsive to commands on completion. UsewaitForDeviceAvailable()
instead.parametreler | |
---|---|
waitTime | long : the time in ms to wait |
Atar | |
---|---|
DeviceNotAvailableException | cihazla bağlantı kesilirse ve kurtarılamazsa. |
waitForDeviceShell
public abstract boolean waitForDeviceShell (long waitTime)
Waits for device to be responsive to a basic adb shell command.
parametreler | |
---|---|
waitTime | long : the time in ms to wait |
İadeler | |
---|---|
boolean | true if device becomes responsive before waitTime elapses. |