নেটিভডিভাইস
public class NativeDevice
extends Object implements IConfigurationReceiver , IManagedTestDevice , ITestLoggerReceiver
| java.lang.Object | |
| ↳ | com.android.tradefed.device.NativeDevice |
নন-ফুল স্ট্যাক অ্যান্ড্রয়েড ডিভাইসগুলির জন্য ITestDevice এর ডিফল্ট বাস্তবায়ন।
সারসংক্ষেপ
নেস্টেড ক্লাস | |
|---|---|
class | NativeDevice.AdbAction একটি OS 'adb ....' কমান্ড চালানোর জন্য একটি |
class | NativeDevice.AdbShellAction |
class | NativeDevice.RebootDeviceAction ডিভাইস রিবুট করার জন্য |
ধ্রুবক | |
|---|---|
String | DEBUGFS_PATH |
int | INVALID_USER_IDযেকোনো অবৈধ/খুঁজে না পাওয়া ইউজার আইডির জন্য ফেরত আসা মান: UserHandle দ্বারা সংজ্ঞায়িত -10000 মান। |
long | MAX_HOST_DEVICE_TIME_OFFSET |
int | MAX_RETRY_ATTEMPTSডিফল্টভাবে কমান্ড পুনরায় চেষ্টা করার সংখ্যা |
String | SD_CARD |
String | STORAGE_EMULATED |
ক্ষেত্র | |
|---|---|
protected TestDeviceOptions | mOptions |
protected final IDeviceStateMonitor | mStateMonitor |
সরকারি নির্মাণকারী | |
|---|---|
NativeDevice ( IDevice device, IDeviceStateMonitor stateMonitor, IDeviceMonitor allocationMonitor) একটি | |
জনসাধারণের পদ্ধতি | |
|---|---|
String | adbInstallPackage (File packageFile, boolean reinstall, String... extraArgs)adb কমান্ড ব্যবহার করে ডিভাইসে একটি অ্যান্ড্রয়েড প্যাকেজ ইনস্টল করুন। |
String | adbInstallPackage (File packageFile, boolean reinstall, boolean grantPermissions, String... extraArgs)adb কমান্ড ব্যবহার করে ডিভাইসে একটি অ্যান্ড্রয়েড প্যাকেজ ইনস্টল করুন। |
void | batchPrefetchStartupBuildProps ()প্রতিটি প্রপসের জন্য 'adb getprop' কল করার পরিবর্তে আমাদের প্রয়োজনীয় সমস্ত প্রপস প্রিফেচ করার মাধ্যমে মাইক্রো অপ্টিমাইজেশন (প্রায় ৪০০ মিলিসেকেন্ড)। |
boolean | canSwitchToHeadlessSystemUser ()হেডলেস সিস্টেম ব্যবহারকারীতে স্যুইচ করার অনুমতি আছে কিনা তা ফেরত দেয়। |
boolean | checkApiLevelAgainstNextRelease (int strictMinLevel)ন্যূনতম সমর্থিত স্তরের নিরিখে কোনো একটি ফিচার বর্তমানে সমর্থিত আছে কি না, তা যাচাই করুন। |
boolean | checkConnectivity ()ডিভাইসটিতে নেটওয়ার্ক সংযোগ আছে কিনা তা যাচাই করুন। |
boolean | clearErrorDialogs ()ডিভাইস UI-তে বর্তমানে প্রদর্শিত যেকোনো ত্রুটির ডায়ালগ বাতিল করার চেষ্টা করুন। |
void | clearLastConnectedWifiNetwork ()সর্বশেষ সংযুক্ত ওয়াইফাই নেটওয়ার্কটি মুছে দেয়। |
void | clearLogcat ()জমে থাকা সমস্ত লগক্যাট ডেটা মুছে দেয়। |
IWifiHelper.WifiConnectionResult | connectToWifiNetworkIfNeededWithResult (String wifiSsid, String wifiPsk, boolean scanSsid) |
IWifiHelper.WifiConnectionResult | connectToWifiNetworkIfNeededWithResult (String wifiSsid, String wifiPsk) |
IWifiHelper.WifiConnectionResult | connectToWifiNetworkWithResult (String wifiSsid, String wifiPsk, boolean scanSsid)ওয়াইফাই নেটওয়ার্কের সাথে সংযুক্ত হয়। |
IWifiHelper.WifiConnectionResult | connectToWifiNetworkWithResult (Map<String, String> wifiSsidToPsk)ওয়াইফাই নেটওয়ার্কের সাথে সংযুক্ত হয়। |
IWifiHelper.WifiConnectionResult | connectToWifiNetworkWithResult (Map<String, String> wifiSsidToPsk, boolean scanSsid)ওয়াইফাই নেটওয়ার্কের সাথে সংযুক্ত হয়। |
IWifiHelper.WifiConnectionResult | connectToWifiNetworkWithResult (String wifiSsid, String wifiPsk)ওয়াইফাই নেটওয়ার্কের সাথে সংযুক্ত হয়। |
int | createUser (String name, boolean guest, boolean ephemeral)প্রদত্ত নাম এবং ফ্ল্যাগ ব্যবহার করে একজন ব্যবহারকারী তৈরি করুন। |
int | createUser (String name, boolean guest, boolean ephemeral, boolean forTesting)প্রদত্ত নাম এবং ফ্ল্যাগ ব্যবহার করে একজন ব্যবহারকারী তৈরি করুন। |
int | createUser (String name)প্রদত্ত নাম এবং ডিফল্ট ফ্ল্যাগ ০ ব্যবহার করে একজন ব্যবহারকারী তৈরি করুন। |
int | createUserNoThrow (String name)প্রদত্ত নাম এবং ডিফল্ট ফ্ল্যাগ ০ ব্যবহার করে একজন ব্যবহারকারী তৈরি করুন। |
DeviceInspectionResult | debugDeviceNotAvailable ()ডিভাইসটি অনুপলব্ধ হয়ে পড়লে, সেটি পরিদর্শন করুন এবং বিস্তারিত তথ্য ফেরত দিন। |
void | deleteFile (String deviceFilePath, int userId)ডিভাইস থেকে কোনো ফাইল বা ডিরেক্টরি মুছে ফেলার সহায়ক পদ্ধতি। |
void | deleteFile (String deviceFilePath)ডিভাইস থেকে কোনো ফাইল বা ডিরেক্টরি মুছে ফেলার সহায়ক পদ্ধতি। |
void | deregisterDeviceActionReceiver ( IDeviceActionReceiver deviceActionReceiver) নিবন্ধিত |
boolean | deviceSoftRestarted ( ProcessInfo prevSystemServerProcess) ডিভাইসটি সফট-রিস্টার্ট হয়েছে কিনা তা পরীক্ষা করার জন্য একটি সহায়ক মেথড, যা বর্তমান system_server-কে পূর্ববর্তী system_server-এর সাথে তুলনা করে |
boolean | deviceSoftRestartedSince (long utcEpochTime, TimeUnit timeUnit) ডিভাইসটি সফট-রিস্টার্ট হয়েছে কিনা, তা ডিভাইসের ইপক থেকে প্রাপ্ত UTC সময় এবং এর |
boolean | disableAdbRoot ()adb root বন্ধ করে দেয়। |
void | disableKeyguard ()কীগার্ড নিষ্ক্রিয় করার প্রচেষ্টা। |
boolean | disableNetworkMonitor ()ডিভাইসে নেটওয়ার্ক পর্যবেক্ষণ নিষ্ক্রিয় করে। |
boolean | disconnectFromWifi ()ওয়াইফাই নেটওয়ার্ক থেকে সংযোগ বিচ্ছিন্ন হয়ে যায়। |
boolean | doesFileExist (String deviceFilePath, int userId)কোনো নির্দিষ্ট ব্যবহারকারীর জন্য ডিভাইসে ফাইলটি আছে কিনা তা নির্ধারণ করার সহায়ক পদ্ধতি। |
boolean | doesFileExist (String deviceFilePath)ডিভাইসে ফাইলটি আছে কিনা তা নির্ধারণ করার জন্য সহায়ক পদ্ধতি। |
File | dumpHeap (String process, String devicePath)সিস্টেম_সার্ভার থেকে হিপ ডাম্প করার চেষ্টা। |
boolean | enableAdbRoot ()adb root চালু করে। |
boolean | enableNetworkMonitor ()ডিভাইসে নেটওয়ার্ক পর্যবেক্ষণ সক্ষম করে। |
String | executeAdbCommand (long timeout, String... cmdArgs)একটি সহায়ক মেথড যা একটি adb কমান্ডকে নির্দিষ্ট টাইমআউট সহ সিস্টেম কমান্ড হিসেবে কার্যকর করে। |
String | executeAdbCommand (String... cmdArgs)একটি সহায়ক মেথড যা adb কমান্ডকে সিস্টেম কমান্ড হিসেবে কার্যকর করে। |
String | executeAdbCommand (long timeout, Map<String, String> envMap, String... cmdArgs)একটি সহায়ক মেথড যা একটি adb কমান্ডকে নির্দিষ্ট টাইমআউট সহ সিস্টেম কমান্ড হিসেবে কার্যকর করে। |
CommandResult | executeAdbV2Command (String... cmdArgs)একটি সহায়ক মেথড যা adb কমান্ডকে সিস্টেম কমান্ড হিসেবে কার্যকর করে। |
CommandResult | executeAdbV2Command (long timeout, String... cmdArgs)একটি সহায়ক মেথড যা একটি adb কমান্ডকে নির্দিষ্ট টাইমআউট সহ সিস্টেম কমান্ড হিসেবে কার্যকর করে। |
CommandResult | executeAdbV2Command (long timeout, Map<String, String> envMap, String... cmdArgs)একটি সহায়ক মেথড যা একটি adb কমান্ডকে নির্দিষ্ট টাইমআউট সহ সিস্টেম কমান্ড হিসেবে কার্যকর করে। |
CommandResult | executeAdbV2Command (long timeout, Map<String, String> envMap, int retryAttempts, String... cmdArgs)একটি সহায়ক মেথড যা একটি adb কমান্ডকে নির্দিষ্ট টাইমআউট সহ সিস্টেম কমান্ড হিসেবে কার্যকর করে। |
CommandResult | executeFastbootCommand (String... cmdArgs)একটি সহায়ক মেথড যা ২ মিনিটের ডিফল্ট টাইমআউট সহ একটি ফাস্টবুট কমান্ডকে সিস্টেম কমান্ড হিসেবে কার্যকর করে। |
CommandResult | executeFastbootCommand (long timeout, String... cmdArgs)সহায়ক মেথড যা একটি ফাস্টবুট কমান্ডকে সিস্টেম কমান্ড হিসেবে কার্যকর করে। |
CommandResult | executeLongFastbootCommand (String... cmdArgs)একটি সহায়ক মেথড যা একটি দীর্ঘস্থায়ী ফাস্টবুট কমান্ডকে সিস্টেম কমান্ড হিসেবে কার্যকর করে। |
CommandResult | executeLongFastbootCommand (Map<String, String> envVarMap, String... cmdArgs)একটি সহায়ক মেথড যা একটি দীর্ঘস্থায়ী ফাস্টবুট কমান্ডকে সিস্টেম এনভায়রনমেন্ট ভেরিয়েবলসহ সিস্টেম কমান্ড হিসেবে কার্যকর করে। |
String | executeShellCommand (String command) সহায়ক মেথড যা একটি adb শেল কমান্ড কার্যকর করে এবং আউটপুট একটি |
void | executeShellCommand (String command, IShellOutputReceiver receiver, long maxTimeToOutputShellResponse, TimeUnit timeUnit, int retryAttempts)একটি adb শেল কমান্ড কার্যকর করে, যেখানে কমান্ডের আচরণ নিয়ন্ত্রণের জন্য আরও প্যারামিটার থাকে। |
void | executeShellCommand (String command, IShellOutputReceiver receiver, long maxTimeoutForCommand, long maxTimeToOutputShellResponse, TimeUnit timeUnit, int retryAttempts)একটি adb শেল কমান্ড কার্যকর করে, যেখানে কমান্ডের আচরণ নিয়ন্ত্রণের জন্য আরও প্যারামিটার থাকে। |
void | executeShellCommand (String command, IShellOutputReceiver receiver)প্রদত্ত adb শেল কমান্ডটি কার্যকর করে এবং কমান্ড ব্যর্থ হলে একাধিকবার চেষ্টা করে। |
CommandResult | executeShellV2Command (String cmd) একটি সহায়ক মেথড যা একটি adb শেল কমান্ড কার্যকর করে এবং কমান্ডের স্ট্যাটাস আউটপুট, stdout ও stderr দিয়ে ফলাফলগুলোকে |
CommandResult | executeShellV2Command (String cmd, File pipeAsInput, OutputStream pipeToOutput, long maxTimeoutForCommand, TimeUnit timeUnit, int retryAttempts)একটি adb শেল কমান্ড কার্যকর করে, যেখানে কমান্ডের আচরণ নিয়ন্ত্রণের জন্য আরও প্যারামিটার থাকে। |
CommandResult | executeShellV2Command (String cmd, long maxTimeoutForCommand, TimeUnit timeUnit)একটি adb শেল কমান্ড কার্যকর করে, যেখানে কমান্ডের আচরণ নিয়ন্ত্রণের জন্য আরও প্যারামিটার থাকে। |
CommandResult | executeShellV2Command (String cmd, File pipeAsInput) একটি সহায়ক মেথড যা একটি adb শেল কমান্ড কার্যকর করে এবং কমান্ডের স্ট্যাটাস আউটপুট, stdout ও stderr দিয়ে ফলাফলগুলোকে |
CommandResult | executeShellV2Command (String cmd, long maxTimeoutForCommand, TimeUnit timeUnit, int retryAttempts)একটি adb শেল কমান্ড কার্যকর করে, যেখানে কমান্ডের আচরণ নিয়ন্ত্রণের জন্য আরও প্যারামিটার থাকে। |
CommandResult | executeShellV2Command (String cmd, OutputStream pipeToOutput) একটি সহায়ক মেথড যা একটি adb শেল কমান্ড কার্যকর করে এবং কমান্ডের স্ট্যাটাস আউটপুট ও stderr দিয়ে যথাযথভাবে পূরণ করে ফলাফলকে একটি |
CommandResult | executeShellV2Command (String cmd, File pipeAsInput, OutputStream pipeToOutput, OutputStream pipeToError, long maxTimeoutForCommand, TimeUnit timeUnit, int retryAttempts)একটি adb শেল কমান্ড কার্যকর করে, যেখানে কমান্ডের আচরণ নিয়ন্ত্রণের জন্য আরও প্যারামিটার থাকে। |
CommandResult | executeShellV2Command (String cmd, File pipeAsInput, OutputStream pipeToOutput, OutputStream pipeToError, long maxTimeoutForCommand, long maxTimeToOutputShellResponse, TimeUnit timeUnit, int retryAttempts)একটি adb শেল কমান্ড কার্যকর করে, যেখানে কমান্ডের আচরণ নিয়ন্ত্রণের জন্য আরও প্যারামিটার থাকে। |
CommandResult | executeShellV2Command (String cmd, IShellOutputReceiver receiver) একটি সহায়ক মেথড যা একটি adb শেল কমান্ড কার্যকর করে এবং কমান্ডের স্ট্যাটাস আউটপুট, stdout ও stderr দিয়ে ফলাফলগুলোকে |
CommandResult | fastbootOemRamdumpNow ()একটি সহায়ক মেথড যা ফাস্টবুট মোড থেকে র্যামডাম্প চালু করে। |
CommandResult | fastbootWipePartition (String partition)সহায়ক মেথড যা ডিভাইসের পার্টিশন মুছে ফেলে। |
Set< ITestDevice.ApexInfo > | getActiveApexes ()ডিভাইসে সক্রিয় করা APEX-গুলো সম্পর্কে তথ্য সংগ্রহ করুন। |
String | getAdbPath ()ব্যবহৃত adb বাইনারির পাথ ফেরত দেয়। |
Map<String, String> | getAllSettings (String namespace)অনুরোধকৃত নেমস্পেসের কী-ভ্যালু পেয়ারগুলো ফেরত দিন। |
DeviceAllocationState | getAllocationState ()ডিভাইসের বর্তমান বরাদ্দ অবস্থা ফেরত দিন |
String | getAndroidId (int userId)একটি userId-এর সাথে সংশ্লিষ্ট android-id খুঁজে বের করে ফেরত দিন, খুঁজে না পেলে null দিন। |
Map<Integer, String> | getAndroidIds ()প্রাপ্ত ইউজার আইডিগুলোর সাথে মিলে যাওয়া অ্যান্ড্রয়েড আইডিগুলোর একটি ম্যাপ তৈরি করুন। |
int | getApiLevel ()ডিভাইসটির এপিআই লেভেল জানুন। |
int | getApiLevelFull () |
PackageInfo | getAppPackageInfo (String packageName)ডিভাইসে ইনস্টল করা একটি প্যাকেজ সম্পর্কে তথ্য সংগ্রহ করুন। |
List< PackageInfo > | getAppPackageInfos ()ডিভাইসে ইনস্টল করা প্যাকেজগুলোর তথ্য সংগ্রহ করুন। |
String | getBasebandVersion ()এই ডিভাইসটির বেসব্যান্ড (রেডিও) সংস্করণ পাওয়ার সুবিধাজনক পদ্ধতি। |
Integer | getBattery ()ডিভাইসের বর্তমান ব্যাটারি লেভেল ফেরত দেয়, অথবা ব্যাটারি লেভেল উপলব্ধ না থাকলে Null ফেরত দেয়। |
boolean | getBooleanProperty (String name, boolean defaultValue)প্রদত্ত প্রপার্টির বুলিয়ান মান ফেরত দেয়। |
Map<Long, String> | getBootHistory ()হেল্পার মেথডটি বুট টাইম এবং বুট রিজন সহ বুট হিস্ট্রি ম্যাপ সংগ্রহ করে। |
Map<Long, String> | getBootHistorySince (long utcEpochTime, TimeUnit timeUnit)এই হেল্পার মেথডটি ডিভাইস থেকে নির্দিষ্ট সময় একক এবং প্রদত্ত 'epoch' সময় থেকে বুট টাইম ও বুট রিজন সহ বুট হিস্ট্রি ম্যাপ সংগ্রহ করে। |
String | getBootloaderVersion ()এই ডিভাইসটির বুটলোডার সংস্করণ পাওয়ার একটি সুবিধাজনক পদ্ধতি। |
InputStreamSource | getBugreport ()ডিভাইস থেকে একটি বাগরিপোর্ট সংগ্রহ করে। |
InputStreamSource | getBugreportz ()ডিভাইস থেকে একটি বাগরিপোর্ট পুনরুদ্ধার করে। |
String | getBuildAlias ()ডিভাইসটিতে বর্তমানে যে বিল্ডটি চলছে, তার অ্যালিয়াসটি পুনরুদ্ধার করুন। |
String | getBuildFlavor ()ডিভাইসটির জন্য বিল্ড ফ্লেভারটি পুনরুদ্ধার করুন। |
String | getBuildId ()ডিভাইসটি বর্তমানে যে বিল্ডটি চালাচ্ছে তা পুনরুদ্ধার করুন। |
String | getBuildSigningKeys ()ডিভাইস ইমেজ স্বাক্ষর করতে ব্যবহৃত কী-টাইপটি ফেরত দেয়। সাধারণত অ্যান্ড্রয়েড ডিভাইসগুলো টেস্ট-কী (যেমন AOSP-তে) অথবা রিলিজ-কী (যা স্বতন্ত্র ডিভাইস প্রস্তুতকারকদের দ্বারা নিয়ন্ত্রিত হয়) দিয়ে সাইন করা হতে পারে। |
DeviceDescriptor | getCachedDeviceDescriptor () ডিভাইসটি বরাদ্দ করা থাকলে একটি ক্যাশ করা |
DeviceDescriptor | getCachedDeviceDescriptor (boolean shortDescriptor) ডিভাইসটি বরাদ্দ করা থাকলে একটি ক্যাশ করা |
String[] | getChildren (String path) |
AbstractConnection | getConnection ()ডিভাইসটির সাথে যুক্ত বর্তমান সংযোগ। |
ContentProviderHandler | getContentProvider (int userId) |
DeviceFoldableState | getCurrentFoldableState ()ডিভাইসটির বর্তমান ভাঁজযোগ্য অবস্থা ফেরত দেয়, অথবা কোনো সমস্যা ঘটলে null ফেরত দেয়। |
int | getCurrentUser ()বর্তমান চলমান ব্যবহারকারীর আইডি ফেরত দিন। |
String | getDeviceClass ()ডিভাইস ক্লাসটি নিন। |
long | getDeviceDate ()ইপক থেকে মিলিসেকেন্ডে ডিভাইসটির তারিখ ফেরত দিন। |
DeviceDescriptor | getDeviceDescriptor () প্রকৃত ডিভাইস অবজেক্টটি পাস না করেই ডিভাইসটির তথ্য পেতে, ডিভাইস ইনফরমেশন থেকে একটি |
DeviceDescriptor | getDeviceDescriptor (boolean shortDescriptor) প্রকৃত ডিভাইস অবজেক্টটি পাস না করেই ডিভাইসটির তথ্য পেতে, ডিভাইস ইনফরমেশন থেকে একটি |
TestDeviceState | getDeviceState ()ডিভাইসটির অবস্থা জানুন। |
long | getDeviceTimeOffset (Date date) ডিভাইস এবং একটি নির্দিষ্ট |
InputStreamSource | getEmulatorOutput ()এমুলেটরের stdout এবং stderr-এর স্ট্রিমটি নিন। |
Process | getEmulatorProcess () এই এমুলেটরের সাথে সম্পর্কিত |
final File | getExecuteShellCommandLog () যে লগটিতে |
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) নন-রুট পাথ থেকে |
Set< DeviceFoldableState > | getFoldableStates ()ডিভাইসটিতে থাকা ভাঁজযোগ্য অবস্থাগুলোর তালিকা ফেরত দেয়। |
IDevice | getIDevice () সংশ্লিষ্ট ddmlib |
Set<String> | getInstalledPackageNames ()ডিভাইসে উপস্থিত অ্যাপ্লিকেশন প্যাকেজের নামগুলো সংগ্রহ করুন। |
long | getIntProperty (String name, long defaultValue)ডিভাইস থেকে প্রদত্ত প্রপার্টির পূর্ণসংখ্যা মান ফেরত দেয়। |
String | getIpAddress ()ডিভাইসটির আইপি অ্যাড্রেস সংগ্রহ করে। |
KeyguardControllerState | getKeyguardState ()কীগার্ডের বর্তমান অবস্থা পেতে একটি অবজেক্ট রিটার্ন করুন, অথবা সমর্থিত না হলে null রিটার্ন করুন। |
long | getLastExpectedRebootTimeMillis () |
int | getLaunchApiLevel ()ডিভাইসটির প্রথম চালু হওয়া এপিআই লেভেলটি সংগ্রহ করুন। |
InputStreamSource | getLogcat ()লগক্যাট ডেটার একটি স্ন্যাপশট স্ট্রিম গ্রহণ করে। |
InputStreamSource | getLogcat (int maxBytes) ক্যাপচার করা লগক্যাট ডেটার শেষ |
InputStreamSource | getLogcatDump ()ডিভাইসটির বর্তমান লগক্যাটের একটি ডাম্প নিন। |
InputStreamSource | getLogcatSince (long date)প্রদত্ত তারিখ থেকে শুরু করে সংগৃহীত লগক্যাট ডেটার একটি স্ন্যাপশট স্ট্রিম গ্রহণ করে। |
String | getMacAddress ()ডিভাইসটির MAC অ্যাড্রেস ফেরত দেয়, ডিভাইস থেকে কোয়েরি করতে ব্যর্থ হলে null ফেরত দেয়। |
Integer | getMainUserId ()মূল ব্যবহারকারীর আইডি ফেরত দেয়। |
Set<String> | getMainlineModuleInfo ()ডিভাইসটিতে ইনস্টল করা মেইনলাইন মডিউলগুলো সম্পর্কে তথ্য জানুন। |
int | getMaxNumberOfRunningUsersSupported ()একই সাথে সর্বাধিক সংখ্যক সমর্থিত ব্যবহারকারী পান। |
int | getMaxNumberOfUsersSupported (String userType)প্রদত্ত ব্যবহারকারীর ধরনের সর্বাধিক সংখ্যক সমর্থিত ব্যবহারকারী খুঁজুন। |
int | getMaxNumberOfUsersSupported ()গেস্টদের বাদ দিয়ে সর্বাধিক সংখ্যক সমর্থিত পরিবর্তনযোগ্য ব্যবহারকারী পান। |
Process | getMicrodroidProcess () |
IDeviceStateMonitor | getMonitor () ডিভাইসের সাথে সংশ্লিষ্ট |
String | getMountPoint (String mountName)একটি মাউন্ট পয়েন্ট ফেরত দেয়। |
ITestDevice.MountPointInfo | getMountPointInfo (String mountpoint) নির্দিষ্ট মাউন্টপয়েন্ট পাথের সাথে সঙ্গতিপূর্ণ একটি |
List< ITestDevice.MountPointInfo > | getMountPointInfo ()ডিভাইসের /proc/mounts-এ থাকা তথ্যের একটি পার্স করা সংস্করণ ফেরত দেয়। |
TestDeviceOptions | getOptions ()ডিভাইসটির জন্য পরীক্ষার বিকল্পগুলো নিয়ে আসুন। |
long | getPartitionFreeSpace (String partition)ডিভাইস পার্টিশনে খালি জায়গার পরিমাণ নির্ণয় করার সহায়ক পদ্ধতি। |
Integer | getPrimaryUserId ()প্রাথমিক ব্যবহারকারীর আইডি ফেরত দেয়। |
ProcessInfo | getProcessByName (String processName) হেল্পার মেথডটি 'pidof' এবং 'stat' কমান্ডগুলো চালায় এবং প্রদত্ত প্রসেসটির PID ও শুরুর সময়সহ |
String | getProcessPid (String process)সার্ভিসটির পিআইডি (pid) ফেরত দেয়, অথবা কোনো সমস্যা হলে নাল (null) ফেরত দেয়। |
String | getProductType ()এই ডিভাইসটির পণ্যের ধরন পাওয়ার সুবিধাজনক পদ্ধতি। |
String | getProductVariant ()এই ডিভাইসটির প্রোডাক্ট ভ্যারিয়েন্টটি পাওয়ার সুবিধাজনক পদ্ধতি। |
String | getProperty (String name)ডিভাইস থেকে প্রদত্ত প্রপার্টির মানটি পুনরুদ্ধার করুন। |
ITestDevice.RecoveryMode | getRecoveryMode ()ডিভাইসটির জন্য ব্যবহৃত বর্তমান রিকভারি মোডটি খুঁজে বের করুন। |
int | getRemainingCreatableUserCount (String userType)এই ডিভাইসে প্রদত্ত ব্যবহারকারী প্রকারের কতজন ব্যবহারকারী তৈরি করা যাবে তা ফেরত দেয়। |
InputStreamSource | getScreenshot (Long displayId, String format, boolean rescale)প্রদত্ত ডিসপ্লে আইডি থেকে সমর্থিত ফরম্যাটে ডিভাইসটির একটি স্ক্রিনশট নেয়। |
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 ()সিম কার্ড অপারেটর ফেরত দিন অথবা উপলব্ধ না থাকলে বা ডিভাইসটি উপলব্ধ না থাকলে নাল (null) নির্বাচন করুন। |
String | getSimState ()সিম কার্ডের অবস্থা ফেরত দিন অথবা উপলব্ধ না থাকলে বা ডিভাইসটি উপলব্ধ না থাকলে null দিন। |
List<File> | getTombstones ()ডিভাইসগুলো থেকে সমাধিফলকের তালিকা সংগ্রহ করে ফেরত দিন। |
long | getTotalMemory ()মোট ফিজিক্যাল মেমরির আকার বাইটে ফেরত দেয় অথবা অভ্যন্তরীণ ত্রুটির ক্ষেত্রে -১ ফেরত দেয়। |
String | getTrackingSerial ()ডিভাইস ব্যবস্থাপনার উদ্দেশ্যে ডিভাইসটি ট্র্যাক করতে ব্যবহৃত সিরিয়াল নম্বরটি সংগ্রহ করুন। |
Set<String> | getUninstallablePackageNames ()যে অ্যাপ্লিকেশন প্যাকেজগুলো আনইনস্টল করা যাবে, সেগুলোর নাম খুঁজে বের করুন। |
boolean | getUseFastbootErase ()ডিভাইসের পার্টিশন মুছে ফেলার জন্য fastboot erase নাকি fastboot format ব্যবহার করবেন, তা জেনে নিন। |
int | getUserFlags (int userId)প্রদত্ত ব্যবহারকারীর ফ্ল্যাগগুলো খুঁজে বের করে ফেরত দিন। |
Map<Integer, UserInfo > | getUserInfos () ডিভাইসে থাকা useId এবং |
int | getUserSerialNumber (int userId)যদি userId-এর সাথে যুক্ত সিরিয়াল নম্বরটি পাওয়া যায়, তবে সেটি ফেরত দিন, অন্যথায় -10000 ফেরত দিন। |
int | getUserVisibleOnDisplay (int displayId)প্রদত্ত ডিসপ্লেতে দৃশ্যমান ব্যবহারকারীর আইডি খুঁজে বের করে। |
IManagedTestDevice.DeviceEventResponse | handleAllocationEvent (DeviceEvent event)প্রদত্ত DeviceEvent-টি প্রক্রিয়া করুন। DeviceEvent-টি প্রসেস করুন, যা এই ডিভাইসটিকে একটি নতুন অ্যালোকেশন স্টেটে স্থানান্তর করতেও পারে বা নাও করতে পারে। |
boolean | hasFeature (String feature)কোনো ডিভাইসে কোনো ফিচার উপলব্ধ আছে কিনা তা যাচাই করুন। |
void | initializeConnection ( IBuildInfo info, MultiMap <String, String> attributes)ডিভাইসটির সাথে সংযোগ স্থাপন করুন। |
String | installPackage (File packageFile, boolean reinstall, boolean grantPermissions, String... extraArgs)ডিভাইসে একটি অ্যান্ড্রয়েড প্যাকেজ ইনস্টল করুন। |
String | installPackage (File packageFile, boolean reinstall, String... extraArgs)ডিভাইসে একটি অ্যান্ড্রয়েড প্যাকেজ ইনস্টল করুন। |
String | installPackageForUser (File packageFile, boolean reinstall, boolean grantPermissions, int userId, String... extraArgs)নির্দিষ্ট ব্যবহারকারীর ডিভাইসে একটি অ্যান্ড্রয়েড প্যাকেজ ইনস্টল করুন। |
String | installPackageForUser (File packageFile, boolean reinstall, int userId, String... extraArgs)নির্দিষ্ট ব্যবহারকারীর ডিভাইসে একটি অ্যান্ড্রয়েড প্যাকেজ ইনস্টল করুন। |
boolean | installPackageWithIncrementalMode (File[] apkFiles, String[] extraArgs, String userId)ইনক্রিমেন্টাল মোডে এপিকে ইনস্টল করে। |
void | invalidatePropertyCache () |
boolean | isAdbRoot () |
boolean | isAdbTcp () |
boolean | isAppEnumerationSupported ()ডিভাইসের প্ল্যাটফর্মটি অ্যাপ গণনা সমর্থন করে কিনা তা পরীক্ষা করুন |
boolean | isBypassLowTargetSdkBlockSupported ()ডিভাইসের প্ল্যাটফর্মটি অ্যাপ ইনস্টলের ক্ষেত্রে লো টার্গেট এসডিকে ব্লক বাইপাস করতে সমর্থন করে কিনা তা পরীক্ষা করুন। |
boolean | isDebugfsMounted ()debugfs মাউন্ট করা আছে কিনা তা পরীক্ষা করুন। |
boolean | isDeviceEncrypted ()ডিভাইসটি এনক্রিপ্ট করা থাকলে ফেরত দেয়। |
boolean | isDirectory (String path)ডিভাইসের পাথটি একটি ডিরেক্টরি হলে True রিটার্ন করুন, অন্যথায় false। |
boolean | isEnableAdbRoot () |
boolean | isEncryptionSupported ()ডিভাইসটিতে এনক্রিপশন সমর্থিত হলে ফেরত আসে। |
boolean | isExecutable (String fullPath)ডিভাইসের ফাইল পাথটি একটি এক্সিকিউটেবল ফাইল হলে True রিটার্ন করে, অন্যথায় false। |
boolean | isFastbootEnabled ()ডিভাইসটির জন্য ফাস্টবুট উপলব্ধ থাকলে ফিরে যান। |
boolean | isHeadless ()ডিভাইসটি হেডলেস (স্ক্রিনবিহীন) হলে true, অন্যথায় false রিটার্ন করুন। |
boolean | isHeadlessSystemUserMode ()ডিভাইসটি হেডলেস সিস্টেম ইউজার মোড ব্যবহার করে কিনা তা ফেরত দেয়। |
boolean | isMainUserPermanentAdmin ()প্রধান ব্যবহারকারী একজন স্থায়ী অ্যাডমিন কিনা এবং তাকে মুছে ফেলা বা নন-অ্যাডমিন পদে অবনমন করা যাবে না কিনা, তা ফেরত দেয়। |
boolean | isMultiUserSupported ()এই ডিভাইসটি নিজস্ব লগইন এবং কাস্টমাইজযোগ্য স্থানসহ একাধিক পরিবর্তনযোগ্য ব্যবহারকারীকে সমর্থন করে কিনা তা জানায়। |
boolean | isPackageInstalled (String packageName, String userId)কোনো নির্দিষ্ট প্যাকেজ নাম এবং ইউজার আইডি দিয়ে ডিভাইসটিতে অনুসন্ধান করে যাচাই করুন যে, সেটি সেই ব্যবহারকারীর জন্য বর্তমানে ইনস্টল করা আছে কি না। |
boolean | isPackageInstalled (String packageName)কোনো নির্দিষ্ট প্যাকেজ নাম দিয়ে ডিভাইসটিতে অনুসন্ধান করে সেটি বর্তমানে ইনস্টল করা আছে কি না তা যাচাই করুন। |
boolean | isRuntimePermissionSupported ()ডিভাইসের প্ল্যাটফর্মটি রানটাইম অনুমতি প্রদান সমর্থন করে কিনা তা পরীক্ষা করুন। |
boolean | isShellV2Support () |
boolean | isStateBootloaderOrFastbootd () ডিভাইসটি |
boolean | isUserRunning (int userId)প্রদত্ত ব্যবহারকারী সক্রিয় আছে কিনা তা যাচাই করুন। |
boolean | isUserSecondary (int userId)নির্দিষ্ট ব্যবহারকারীটি তার ফ্ল্যাগ অনুযায়ী একজন দ্বিতীয় ব্যবহারকারী কিনা তা ফেরত দিন। |
boolean | isUserVisible (int userId)প্রদত্ত ব্যবহারকারী দৃশ্যমান কিনা তা যাচাই করে। |
boolean | isUserVisibleOnDisplay (int userId, int displayId)প্রদত্ত ব্যবহারকারী প্রদত্ত ডিসপ্লেতে দৃশ্যমান কিনা তা যাচাই করে। |
boolean | isVisibleBackgroundUsersOnDefaultDisplaySupported () ডিভাইসটি |
boolean | isVisibleBackgroundUsersSupported ()ডিভাইসটি ব্যবহারকারীদের ব্যাকগ্রাউন্ডে দৃশ্যমান অবস্থায় চালু হওয়ার অনুমতি দেয় কিনা তা ফেরত দেয়। |
boolean | isWifiEnabled ()ওয়াইফাই চালু আছে কিনা তা পরীক্ষা করুন। |
Set<Long> | listDisplayIds ()'dumpsys SurfaceFlinger' দ্বারা রিপোর্ট করা অনুযায়ী ডিভাইসে উপলব্ধ ডিসপ্লে আইডিগুলির তালিকা সংগ্রহ করুন। |
Set<Integer> | listDisplayIdsForStartingVisibleBackgroundUsers () |
ArrayList<Integer> | listUsers ()ডিভাইসটিতে থাকা ব্যবহারকারীদের তালিকা সংগ্রহ করে। |
boolean | logAnrs ( ITestLogger logger)ডিভাইস থেকে ANR সংগ্রহ ও লগ করে। |
boolean | logBugreport (String dataName, ITestLogger listener)বাগ রিপোর্ট গ্রহণ করে তা রিপোর্টকারীদের কাছে লগ করার জন্য একটি সহায়ক মেথড। |
void | logOnDevice (String tag, Log.LogLevel level, String format, Object... args)ডিভাইসটির লগক্যাটে একটি বার্তা লিপিবদ্ধ করুন। |
void | mountDebugfs ()debugfs মাউন্ট করুন। |
void | nonBlockingReboot ()ডিভাইসটি রিবুট করার জন্য একটি কমান্ড জারি করে এবং কমান্ডটি সম্পন্ন হলে ও ডিভাইসটি adb-এর কাছে আর দৃশ্যমান না থাকলে রিটার্ন করে। |
void | postAdbRootAction ()যদি adb root-এর পরে এবং ডিভাইসটি পুনরায় অনলাইন হওয়ার আগে কিছু নির্দিষ্ট পদক্ষেপ নেওয়ার প্রয়োজন হয়, তবে এটি ওভাররাইড করুন। |
void | postAdbUnrootAction ()যদি adb unroot করার পরে এবং ডিভাইসটি পুনরায় অনলাইন হওয়ার আগে কিছু নির্দিষ্ট পদক্ষেপ নেওয়ার প্রয়োজন হয়, তবে এটি ওভাররাইড করুন। |
void | postBootSetup ()প্রতি বুটের পরে পরীক্ষার জন্য ডিভাইসটি কনফিগার করতে নির্দেশাবলী অনুসরণ করুন। |
void | postInvocationTearDown (Throwable exception)আহ্বান সম্পন্ন হওয়ার পর ডিভাইস-নির্দিষ্ট প্রয়োজনীয় পরিষ্করণমূলক অতিরিক্ত পদক্ষেপসমূহ সম্পাদিত হবে। |
void | preInvocationSetup ( IBuildInfo info, MultiMap <String, String> attributes)ডিভাইস-নির্দিষ্ট প্রয়োজনীয় সেটআপের জন্য অতিরিক্ত পদক্ষেপ, যা ইনভোকেশন ফ্লো-এর আগে ডিভাইসে সম্পন্ন করা হবে। |
boolean | pullDir (String deviceFilePath, File localDir, int userId)ডিভাইস থেকে ডিরেক্টরির বিষয়বস্তু পুনরাবৃত্তিমূলকভাবে টেনে আনুন। |
boolean | pullDir (String deviceFilePath, File localDir)ডিভাইস থেকে ডিরেক্টরির বিষয়বস্তু পুনরাবৃত্তিমূলকভাবে টেনে আনুন। |
boolean | pullDir (String deviceFilePath, File localDir, int userId, long timeout)ডিভাইস থেকে ডিরেক্টরির বিষয়বস্তু পুনরাবৃত্তিমূলকভাবে টেনে আনুন। |
boolean | pullFile (String remoteFilePath, File localFile, int userId, long timeout)ডিভাইস থেকে একটি ফাইল পুনরুদ্ধার করে। |
boolean | pullFile (String remoteFilePath, File localFile)ডিভাইস থেকে একটি ফাইল পুনরুদ্ধার করে। |
File | pullFile (String remoteFilePath, int userId) ডিভাইস থেকে একটি ফাইল পুনরুদ্ধার করে, সেটিকে একটি স্থানীয় অস্থায়ী |
File | pullFile (String remoteFilePath) ডিভাইস থেকে একটি ফাইল পুনরুদ্ধার করে, সেটিকে একটি স্থানীয় অস্থায়ী |
boolean | pullFile (String remoteFilePath, File localFile, int userId)ডিভাইস থেকে একটি ফাইল পুনরুদ্ধার করে। |
String | pullFileContents (String remoteFilePath)ডিভাইস থেকে একটি ফাইল পুনরুদ্ধার করে এবং এর বিষয়বস্তু ফেরত দেয়। |
File | pullFileFromExternal (String remoteFilePath) ডিভাইসের এক্সটার্নাল স্টোরেজ থেকে একটি ফাইল পুনরুদ্ধার করে, সেটিকে একটি স্থানীয় অস্থায়ী |
boolean | pushDir (File localFileDir, String deviceFilePath, int userId)ডিরেক্টরির বিষয়বস্তু পুনরাবৃত্তিমূলকভাবে ডিভাইসে প্রেরণ করুন। |
boolean | pushDir (File localFileDir, String deviceFilePath, Set<String> excludedDirectories)ফিল্টার করা কিছু ডিরেক্টরি বাদ দিয়ে, ডিরেক্টরির বিষয়বস্তু রিকার্সিভলি ডিভাইসে পুশ করুন। |
boolean | pushDir (File localFileDir, String deviceFilePath)ডিরেক্টরির বিষয়বস্তু পুনরাবৃত্তিমূলকভাবে ডিভাইসে প্রেরণ করুন। |
boolean | pushFile (File localFile, String remoteFilePath, boolean evaluateContentProviderNeeded) |
boolean | pushFile (File localFile, String remoteFilePath)ডিভাইসে একটি ফাইল পাঠান। |
boolean | pushFile (File localFile, String remoteFilePath, int userId)ডিভাইসে একটি ফাইল পাঠান। |
boolean | pushString (String contents, String remoteFilePath)একটি স্ট্রিং থেকে তৈরি ফাইল ডিভাইসে পুশ করুন। |
void | reboot (String reason) ডিভাইসটিকে adb মোডে রিবুট করে এবং প্রদত্ত |
String | reboot (String command, String reason) প্রদত্ত |
void | reboot ()ডিভাইসটিকে adb মোডে রিবুট করে। |
void | rebootIntoBootloader ()ডিভাইসটিকে বুটলোডার মোডে রিবুট করে। |
void | rebootIntoFastbootd ()ডিভাইসটিকে ফাস্টবুটডি মোডে রিবুট করে। |
void | rebootIntoRecovery ()ডিভাইসটিকে adb রিকভারি মোডে রিবুট করে। |
void | rebootIntoSideload ()ডিভাইসটিকে adb সাইডলোড মোডে রিবুট করে (উল্লেখ্য যে, এটি রিকভারির অধীনে একটি বিশেষ মোড)। ডিভাইসটি সাইডলোড মোডে প্রবেশ না করা পর্যন্ত ব্লক থাকে। |
void | rebootIntoSideload (boolean autoReboot)ডিভাইসটিকে adb সাইডলোড মোডে রিবুট করে (উল্লেখ্য যে, এটি রিকভারির অধীনে একটি বিশেষ মোড)। ডিভাইসটি সাইডলোড মোডে প্রবেশ না করা পর্যন্ত ব্লক থাকে। |
void | rebootUntilOnline () |
void | rebootUntilOnline (String reason) |
void | rebootUserspace ()ডিভাইসের শুধুমাত্র ইউজারস্পেস অংশটি রিবুট করে। |
void | rebootUserspaceUntilOnline () |
boolean | recoverDevice ()ডিভাইস যোগাযোগ পুনরুদ্ধারের প্রচেষ্টা। |
void | registerDeviceActionReceiver ( IDeviceActionReceiver deviceActionReceiver) এই ডিভাইসের জন্য একটি |
void | remountSystemReadOnly ()ডিভাইসটির সিস্টেম পার্টিশনটিকে রিড-অনলি করুন। |
void | remountSystemWritable ()ডিভাইসের সিস্টেম পার্টিশনটিকে রাইটেবল করুন। |
void | remountVendorReadOnly ()ডিভাইসের ভেন্ডর পার্টিশনটিকে রিড-অনলি করুন। |
void | remountVendorWritable ()ডিভাইসের ভেন্ডর পার্টিশনটিকে রাইটেবল করুন। |
boolean | removeAdmin (String componentName, int userId) প্রদত্ত ব্যবহারকারীর ডিভাইস অ্যাডমিনকে অপসারণ করুন এবং সফল হলে |
void | removeOwners ()সর্বশক্তি দিয়ে বিদ্যমান সকল ডিভাইস প্রোফাইল মালিকদের অপসারণ করুন। |
boolean | removeUser (int userId)ডিভাইস থেকে কোনো নির্দিষ্ট ব্যবহারকারীকে অপসারণ করুন। |
void | resetContentProviderSetup ()এটিকে পুনরায় সক্রিয় করতে কন্টেন্ট প্রোভাইডার সেটআপের ফ্ল্যাগটি রিসেট করুন। |
boolean | runInstrumentationTests ( IRemoteAndroidTestRunner runner, Collection< ITestLifeCycleReceiver > listeners)ইনস্ট্রুমেন্টেশন পরীক্ষা চালায় এবং ডিভাইস পুনরুদ্ধারের সুবিধা প্রদান করে। |
boolean | runInstrumentationTests ( IRemoteAndroidTestRunner runner, ITestLifeCycleReceiver... listeners) এক বা একাধিক লিসেনারকে প্যারামিটার হিসেবে পাস করে |
boolean | runInstrumentationTestsAsUser ( IRemoteAndroidTestRunner runner, int userId, Collection< ITestLifeCycleReceiver > listeners) |
boolean | runInstrumentationTestsAsUser ( IRemoteAndroidTestRunner runner, int userId, ITestLifeCycleReceiver... listeners) |
void | setAdbPath (String adbPath)ব্যবহৃতব্য adb বাইনারির পথ নির্ধারণ করে। |
void | setConfiguration ( IConfiguration configuration) ব্যবহৃত |
final void | setConnectionAvdInfo ( GceAvdInfo avdInfo) |
void | setDate (Date date)ডিভাইসে তারিখ সেট করে দ্রষ্টব্য: ডিভাইসে তারিখ সেট করতে রুট প্রয়োজন। |
boolean | setDeviceOwner (String componentName, int userId)প্রদত্ত ব্যবহারকারীর ক্ষেত্রে একটি ডিভাইস অ্যাডমিন কম্পোনেন্টকে ডিভাইসের মালিক হিসেবে সেট করুন। |
void | setDeviceState ( TestDeviceState deviceState)ডিভাইসটির অবস্থা হালনাগাদ করুন। |
void | setEmulatorOutputStream ( SizeLimitedOutputStream output) এমুলেটরের জন্য আউটপুট লগ করতে |
void | setEmulatorProcess (Process p) এই ডিভাইসটি যখন একটি এমুলেটর হয়, তখন |
void | setFastbootEnabled (boolean fastbootEnabled)ডিভাইসটির জন্য ফাস্টবুট অপশন সেট করুন। |
void | setFastbootPath (String fastbootPath)ব্যবহৃতব্য ফাস্টবুট বাইনারির পাথ নির্ধারণ করে। |
void | setIDevice ( IDevice newDevice)এই ITestDevice-এর সাথে যুক্ত IDevice-টি আপডেট করুন। |
void | setLogStartDelay (int delay)অনলাইন ডিভাইসের জন্য লগক্যাট ক্যাপচার শুরু করার আগে কতক্ষণ অপেক্ষা করতে হবে, তা মিলিসেকেন্ডে (ms) নির্ধারণ করে। |
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 | setTestLogger ( ITestLogger testLogger) |
void | setTrackingSerial (String trackingSerial)ডিভাইস ব্যবস্থাপনার উদ্দেশ্যে, ডিভাইসটিকে রেফারেন্স করার জন্য আমরা যে সিরিয়ালটি ব্যবহার করি, তা ট্র্যাক করুন। |
void | setUseFastbootErase (boolean useFastbootErase)ডিভাইসের কোনো পার্টিশন মুছে ফেলার জন্য fastboot erase নাকি fastboot format ব্যবহার করা হবে, তা নির্ধারণ করুন। |
void | startLogcat ()ব্যাকগ্রাউন্ডে ডিভাইস থেকে লগক্যাট আউটপুট ক্যাপচার করা শুরু করুন। |
boolean | startTradeInModeTesting (int timeoutMs)টেস্টিং ট্রেড-ইন মোড সক্রিয় করুন। |
boolean | startUser (int userId)কোনো নির্দিষ্ট ব্যবহারকারী বর্তমানে বন্ধ থাকলে, তাকে ব্যাকগ্রাউন্ডে চালু করে। |
boolean | startUser (int userId, boolean waitFlag)কোনো নির্দিষ্ট ব্যবহারকারী বর্তমানে বন্ধ থাকলে, তাকে ব্যাকগ্রাউন্ডে চালু করে। |
boolean | startVisibleBackgroundUser (int userId, int displayId, boolean waitFlag)প্রদত্ত ব্যবহারকারীকে ব্যাকগ্রাউন্ডে চালু করে, যা প্রদত্ত ডিসপ্লেতে দৃশ্যমান থাকে (অর্থাৎ, ব্যবহারকারীকে সেই ডিসপ্লেতে অ্যাক্টিভিটি চালু করার সুযোগ দেয়)। |
void | stopEmulatorOutput ()এমুলেটরের আউটপুট বন্ধ করুন এবং মুছে ফেলুন। |
void | stopLogcat ()ডিভাইস থেকে লগক্যাট আউটপুট সংগ্রহ করা বন্ধ করুন এবং বর্তমানে সংরক্ষিত লগক্যাট ডেটা বাতিল করুন। |
void | stopTradeInModeTesting ()ট্রেড-ইন মোড টেস্টিং বন্ধ করুন। |
boolean | stopUser (int userId)কোনো নির্দিষ্ট ব্যবহারকারীকে থামিয়ে দেয়। |
boolean | stopUser (int userId, boolean waitFlag, boolean forceFlag)কোনো নির্দিষ্ট ব্যবহারকারীকে থামান। |
String | switchToAdbTcp ()ডিভাইসটিকে adb-over-tcp মোডে পরিবর্তন করুন। |
boolean | switchToAdbUsb ()ডিভাইসটিকে ইউএসবি মোডের মাধ্যমে এডিবি-তে পরিবর্তন করুন। |
boolean | switchUser (int userId)ডিফল্ট টাইমআউট সহ অন্য একটি ইউজার আইডিতে স্যুইচ করুন। |
boolean | switchUser (int userId, long timeout)প্রদত্ত টাইমআউটকে ডেডলাইন হিসেবে ব্যবহার করে অন্য একটি ইউজার আইডিতে সুইচ করুন। |
boolean | syncFiles (File localFileDir, String deviceFilePath)পর্যায়ক্রমে স্থানীয় ফাইল ডিরেক্টরির বিষয়বস্তু ডিভাইসের সাথে সিঙ্ক করে। |
Bugreport | takeBugreport () একটি বাগরিপোর্ট গ্রহণ করে এবং সেটিকে পরিচালনা করার জন্য একটি |
String | uninstallPackage (String packageName)ডিভাইস থেকে একটি অ্যান্ড্রয়েড প্যাকেজ আনইনস্টল করুন। |
String | uninstallPackageForUser (String packageName, int userId)কোনো নির্দিষ্ট ব্যবহারকারীর ডিভাইস থেকে একটি অ্যান্ড্রয়েড প্যাকেজ আনইনস্টল করুন। |
boolean | unlockDevice ()ডিভাইসটি এনক্রিপ্টেড অবস্থায় থাকলে তা আনলক করে। |
void | unmountDebugfs ()debugfs আনমাউন্ট করুন। |
boolean | waitForBootComplete (long timeOut)ডিভাইসের বুট কমপ্লিট ফ্ল্যাগ সেট না হওয়া পর্যন্ত ব্লক করে রাখে। |
boolean | waitForDeviceAvailable ()ডিভাইসটি সাড়া দেওয়া এবং পরীক্ষার জন্য উপলব্ধ হওয়ার অপেক্ষা করা হচ্ছে। |
boolean | waitForDeviceAvailable (long waitTime)ডিভাইসটি সাড়া দেওয়া এবং পরীক্ষার জন্য উপলব্ধ হওয়ার অপেক্ষা করা হচ্ছে। |
boolean | waitForDeviceAvailableInRecoverPath (long waitTime)রিকভারি পাথ বিবেচনা না করে ডিভাইসটি সাড়া দেওয়া এবং উপলব্ধ হওয়ার জন্য অপেক্ষা করে। |
void | waitForDeviceBootloader ()ফাস্টবুট-এর মাধ্যমে ডিভাইসটি দৃশ্যমান না হওয়া পর্যন্ত ব্লক থাকে। |
void | waitForDeviceFastbootD () |
boolean | waitForDeviceInRecovery (long waitTime) ডিভাইসটিকে 'adb recovery' অবস্থায় থাকার জন্য ব্লক করা হয় (উল্লেখ্য, এটি |
boolean | waitForDeviceInSideload (long waitTime)ডিভাইসটিকে 'adb sideload' অবস্থায় থাকার জন্য ব্লকগুলি |
boolean | waitForDeviceNotAvailable (long waitTime)ডিভাইসটির জন্য ব্লকগুলো অনুপলব্ধ, অর্থাৎ adb-তে অনুপস্থিত। |
void | waitForDeviceOnline ()adb-এর মাধ্যমে ডিভাইসটি দৃশ্যমান না হওয়া পর্যন্ত ব্লক থাকে। |
void | waitForDeviceOnline (long waitTime)adb-এর মাধ্যমে ডিভাইসটি দৃশ্যমান না হওয়া পর্যন্ত ব্লক থাকে। |
boolean | waitForDeviceShell (long waitTime)একটি সাধারণ adb শেল কমান্ডে ডিভাইসটির সাড়া দেওয়ার জন্য অপেক্ষা করে। |
সুরক্ষিত পদ্ধতি | |
|---|---|
void | addExtraConnectionBuilderArgs ( DefaultConnection.ConnectionBuilder builder) |
String[] | buildAdbShellCommand (String command, boolean forceExitStatusDetection, boolean oldShellCommand)প্রদত্ত adb শেল কমান্ড সেশন এবং আর্গুমেন্টগুলোর জন্য OS কমান্ড তৈরি করে। |
void | checkApiLevelAgainst (String feature, int strictMinLevel) |
NativeDevice.RebootDeviceAction | createRebootDeviceAction ( NativeDevice.RebootMode rebootMode, String reason) রিবুট করার সময় ব্যবহার করার জন্য একটি |
IRunUtil | createRunUtil () |
void | doAdbReboot ( NativeDevice.RebootMode rebootMode, String reason)adb reboot চালান। |
void | ensureRuntimePermissionSupported ()রানটাইম পারমিশন সমর্থিত না হলে এক্সেপশন থ্রো করার জন্য সহায়ক মেথড। |
int | getApiLevelSafe () |
ITestLogger | getLogger () |
IRunUtil | getRunUtil () ব্যবহার করার জন্য |
String | internalGetProperty (String propName, String fastbootVar, String description)ডিফল্টরূপে ddmlib ক্যাশে থেকে একটি ডিভাইস প্রপার্টি আনা হয় এবং ডিভাইসটি ফাস্টবুটে আছে কি না, তার উপর নির্ভর করে বিকল্প হিসেবে `adb shell getprop` অথবা `fastboot getvar` ব্যবহার করা হয়। |
boolean | isInRebootCallback ()রিবুট কলব্যাকগুলো বর্তমানে কার্যকর করা হচ্ছে কি না, তা ফেরত দেয়। |
boolean | isNewer (File localFile, IFileEntry entry) স্থানীয় ফাইলটি দূরবর্তী ফাইলের চেয়ে নতুন হলে |
void | notifyRebootEnded () রিবুট শেষ হওয়ার ঘটনা সম্পর্কে সমস্ত |
void | notifyRebootStarted () রিবুট শুরু হওয়ার ইভেন্ট সম্পর্কে সমস্ত |
boolean | performDeviceAction (String actionDescription, NativeDevice.DeviceAction action, int retryAttempts)এই ডিভাইসে একটি কাজ সম্পাদন করে। |
void | postAdbReboot ( NativeDevice.RebootMode rebootMode)রিবুট করার পর যে অতিরিক্ত পদক্ষেপগুলো নেওয়া যেতে পারে। |
void | prePostBootSetup ()প্রতিটি ডিভাইসের ধরনকে (AndroidNativeDevice, TestDevice) নির্দিষ্ট পোস্ট বুট সেটআপের জন্য এই পদ্ধতিটি ওভাররাইড করার অনুমতি দেয়। |
boolean | pullFileWithAdbCommand (String remoteFilePath, File localFile, long timeout) |
void | setClock (Clock clock)ব্যবহারের জন্য ক্লক ইনস্ট্যান্সটি সেট করুন। |
void | setMicrodroidProcess (Process process)টেস্টডিভাইসটিকে মাইক্রোড্রয়েড হিসেবে চিহ্নিত করে এবং এর সিআইডি (CID) নির্ধারণ করে। |
void | setTestDeviceOptions (Map<String, String> deviceOptions) |
CommandResult | simpleFastbootCommand (long timeout, String[] fullCmd)একটি সাধারণ ফাস্টবুট কমান্ড কার্যকর করে এবং কমান্ডটির অবস্থা প্রতিবেদন করে। |
CommandResult | simpleFastbootCommand (long timeout, Map<String, String> envVarMap, String[] fullCmd)এনভায়রনমেন্ট ভেরিয়েবল ব্যবহার করে একটি সাধারণ ফাস্টবুট কমান্ড সম্পাদন করে এবং কমান্ডটির অবস্থা প্রতিবেদন করে। |
boolean | waitForDeviceNotAvailable (String operationDesc, long time)ডিভাইসটি অনুপলব্ধ হওয়া পর্যন্ত অপেক্ষা করুন (adb-তে রিপোর্ট করা বন্ধ করুন)। |
ধ্রুবক
ডিবাগস_পাথ
public static final String DEBUGFS_PATH
ধ্রুবক মান: "/sys/kernel/debug"
অবৈধ_ব্যবহারকারীর_আইডি
public static final int INVALID_USER_ID
যেকোনো অবৈধ/খুঁজে না পাওয়া ইউজার আইডির জন্য ফেরত আসা মান: UserHandle দ্বারা সংজ্ঞায়িত -10000 মান।
ধ্রুবক মান: -10000 (0xffffd8f0)
MAX_HOST_DEVICE_TIME_OFFSET
protected static final long MAX_HOST_DEVICE_TIME_OFFSET
ধ্রুবক মান: 5000 (0x0000000000001388)
সর্বোচ্চ পুনঃচেষ্টার সংখ্যা
protected static final int MAX_RETRY_ATTEMPTS
ডিফল্টভাবে কমান্ড পুনরায় চেষ্টা করার সংখ্যা
ধ্রুবক মান: 2 (0x00000002)
এসডি_কার্ড
protected static final String SD_CARD
ধ্রুবক মান: "/sdcard/"
স্টোরেজ_অনুকৃত
protected static final String STORAGE_EMULATED
ধ্রুবক মান: "/storage/emulated/"
ক্ষেত্র
mOptions
protected TestDeviceOptions mOptions
এমস্টেটমনিটর
protected final IDeviceStateMonitor mStateMonitor
সরকারি নির্মাণকারী
নেটিভডিভাইস
public NativeDevice (IDevice device, IDeviceStateMonitor stateMonitor, IDeviceMonitor allocationMonitor)
একটি TestDevice তৈরি করে।
| প্যারামিটার | |
|---|---|
device | IDevice : সংশ্লিষ্ট IDevice |
stateMonitor | IDeviceStateMonitor : ব্যবহার করার জন্য IDeviceStateMonitor মেকানিজম |
allocationMonitor | IDeviceMonitor : অ্যালোকেশন অবস্থার পরিবর্তন সম্পর্কে জানানোর জন্য ব্যবহৃত IDeviceMonitor । এটি null হতে পারে। |
জনসাধারণের পদ্ধতি
adbInstallPackage
public String adbInstallPackage (File packageFile,
boolean reinstall,
String... extraArgs)adb কমান্ড ব্যবহার করে ডিভাইসে একটি অ্যান্ড্রয়েড প্যাকেজ ইনস্টল করুন।
| প্যারামিটার | |
|---|---|
packageFile | File : ইনস্টল করার জন্য এপিকে ফাইল |
reinstall | boolean : পুনরায় ইনস্টল করা প্রয়োজন হলে true |
extraArgs | String : ঐচ্ছিক অতিরিক্ত আর্গুমেন্ট যা পাস করা যাবে। উপলব্ধ অপশনগুলোর জন্য 'adb shell pm -h' দেখুন। |
| ফেরত | |
|---|---|
String | ত্রুটি কোড সহ একটি String , অথবা সফল হলে null । |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
adbInstallPackage
public String adbInstallPackage (File packageFile,
boolean reinstall,
boolean grantPermissions,
String... extraArgs)adb কমান্ড ব্যবহার করে ডিভাইসে একটি অ্যান্ড্রয়েড প্যাকেজ ইনস্টল করুন।
দ্রষ্টব্য: শুধুমাত্র সেইসব ক্ষেত্রেই এই ফাংশনটি কল করা উচিত, যেখানে ইনস্টলের সময় রানটাইম অনুমতি প্রদানের উপর সুস্পষ্ট নিয়ন্ত্রণ প্রয়োজন।
| প্যারামিটার | |
|---|---|
packageFile | File : ইনস্টল করার জন্য এপিকে ফাইল |
reinstall | boolean : পুনরায় ইনস্টল করা প্রয়োজন হলে true |
grantPermissions | boolean : ইনস্টলের সময় সমস্ত রানটাইম অনুমতি দেওয়া হবে কিনা |
extraArgs | String : ঐচ্ছিক অতিরিক্ত আর্গুমেন্ট যা পাস করা যাবে। উপলব্ধ অপশনগুলোর জন্য 'adb shell pm -h' দেখুন। |
| ফেরত | |
|---|---|
String | ত্রুটি কোড সহ একটি String , অথবা সফল হলে null । |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
ব্যাচপ্রিফেচস্টার্টআপবিল্ডপ্রপস
public void batchPrefetchStartupBuildProps ()
প্রতিটি প্রপসের জন্য 'adb getprop' কল করার পরিবর্তে আমাদের প্রয়োজনীয় সমস্ত প্রপস আগে থেকে ফেচ করে নেওয়ার মাধ্যমে মাইক্রো অপটিমাইজেশন (প্রায় ৪০০ মিলিসেকেন্ড) করা হয়। অর্থাৎ, একটি প্রপস ফেচ করার মতোই সমস্ত প্রপস ফেচ করাও সমান দ্রুত। device.getApiLevel(), checkApiLevelAgainstNextRelease এবং getBuildAlias-এর মতো কাজগুলো আড়ালে `adb getprop` কল করে। আমরা সেগুলোকে একটি কলে ফেচ করে NativeDevice.setProperty কল করি। এমনকি যদি আমরা এটি নাও করি, NativeDevice নিজেই setProperty কল করবে এবং ভবিষ্যতের কলের জন্য ফলাফলটি ক্যাশ করে রাখবে। আমরা শুধু এটি সামান্য আগে করছি। যদি ডিভাইসটি রিকভারি মোডে থাকে বা প্রপস ফেচ করার সময় অন্য কোনো ত্রুটি হয়, আমরা সেগুলোকে উপেক্ষা করি।
canSwitchToHeadlessSystemUser
public boolean canSwitchToHeadlessSystemUser ()
হেডলেস সিস্টেম ব্যবহারকারীতে স্যুইচ করার অনুমতি আছে কিনা তা ফেরত দেয়।
| ফেরত | |
|---|---|
boolean | |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
CheckApiLevel AgainstNextRelease
public boolean checkApiLevelAgainstNextRelease (int strictMinLevel)
ন্যূনতম সমর্থিত স্তরের ভিত্তিতে কোনো ফিচার বর্তমানে সমর্থিত কিনা তা যাচাই করুন। এপিআই লেভেল বাড়ানোর আগে, এই পদ্ধতিটি এখনও অপ্রকাশিত ফিচারগুলোকেও বিবেচনা করে।
| প্যারামিটার | |
|---|---|
strictMinLevel | int : বৈশিষ্ট্যটি সমর্থন করে এমন সর্বনিম্ন সম্ভাব্য স্তর। |
| ফেরত | |
|---|---|
boolean | স্তরটি সমর্থিত হলে সত্য। অন্যথায় মিথ্যা। |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
সংযোগ পরীক্ষা করুন
public boolean checkConnectivity ()
ডিভাইসটিতে নেটওয়ার্ক সংযোগ আছে কিনা তা যাচাই করুন।
| ফেরত | |
|---|---|
boolean | ডিভাইসে সচল নেটওয়ার্ক সংযোগ থাকলে true , অন্যথায় false । |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
clearErrorDialogs
public boolean clearErrorDialogs ()
ডিভাইস UI-তে বর্তমানে প্রদর্শিত যেকোনো ত্রুটির ডায়ালগ বাতিল করার চেষ্টা করুন।
| ফেরত | |
|---|---|
boolean | যদি কোনো ডায়ালগ উপস্থিত না থাকে বা ডায়ালগগুলি সফলভাবে শেষ করা হয় তবে true । অন্যথায় false । |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
শেষ সংযুক্ত ওয়াইফাই নেটওয়ার্ক পরিষ্কার করুন
public void clearLastConnectedWifiNetwork ()
সর্বশেষ সংযুক্ত ওয়াইফাই নেটওয়ার্কটি মুছে ফেলে। ডিভাইস রিবুট হওয়ার পর পূর্ববর্তী পরীক্ষায় ব্যবহৃত ওয়াইফাই নেটওয়ার্কে সংযোগ এড়ানোর জন্য, নতুন করে চালু করার সময় এটি কল করা উচিত।
clearLogcat
public void clearLogcat ()
জমে থাকা সমস্ত লগক্যাট ডেটা মুছে দেয়।
এটি তখন কাজে আসে যখন আপনি নিশ্চিত করতে চান যেITestDevice.getLogcat() শুধুমাত্র একটি নির্দিষ্ট সময়ের পরে তৈরি হওয়া লগ ডেটা ফেরত দেবে (যেমন একটি নতুন ডিভাইস বিল্ড ফ্ল্যাশ করার পরে, ইত্যাদি)। প্রয়োজনে ফলাফলের সাথে ওয়াইফাই নেটওয়ার্কের সাথে সংযোগ করুন
public IWifiHelper.WifiConnectionResult connectToWifiNetworkIfNeededWithResult (String wifiSsid, String wifiPsk, boolean scanSsid)
connectToWifiNetwork(String,String) এর একটি বিকল্প যা কেবল তখনই সংযোগ স্থাপন করে যখন ডিভাইসটিতে বর্তমানে নেটওয়ার্ক সংযোগ থাকে না।
| প্যারামিটার | |
|---|---|
scanSsid | boolean : এই নেটওয়ার্কের জন্য লুকানো SSID স্ক্যান করা হবে কিনা |
| ফেরত | |
|---|---|
IWifiHelper.WifiConnectionResult | WifiConnectionResult সংযোগের অবস্থা নির্দেশ করে। |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
প্রয়োজনে ফলাফলের সাথে ওয়াইফাই নেটওয়ার্কের সাথে সংযোগ করুন
public IWifiHelper.WifiConnectionResult connectToWifiNetworkIfNeededWithResult (String wifiSsid, String wifiPsk)
connectToWifiNetwork(String,String) এর একটি বিকল্প যা কেবল তখনই সংযোগ স্থাপন করে যখন ডিভাইসটিতে বর্তমানে নেটওয়ার্ক সংযোগ থাকে না।
| ফেরত | |
|---|---|
IWifiHelper.WifiConnectionResult | WifiConnectionResult সংযোগের অবস্থা নির্দেশ করে। |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
ফলাফলের সাথে ওয়াইফাই নেটওয়ার্কের সাথে সংযোগ করুন
public IWifiHelper.WifiConnectionResult connectToWifiNetworkWithResult (String wifiSsid, String wifiPsk, boolean scanSsid)
ওয়াইফাই নেটওয়ার্কের সাথে সংযুক্ত হয়।
নির্দিষ্ট ওয়াইফাই নেটওয়ার্কে সফলভাবে সংযোগ স্থাপন না হওয়া পর্যন্ত ওয়াইফাই চালু করে এবং ব্লক করে রাখে। একবার সংযোগ স্থাপিত হলে, ITestDevice.disconnectFromWifi() অথবা ITestDevice.clearLastConnectedWifiNetwork() কল না করা পর্যন্ত প্রতিটি রিবুটের পর ইনস্ট্যান্সটি সংযোগটি পুনরুদ্ধার করার চেষ্টা করবে।
| প্যারামিটার | |
|---|---|
wifiSsid | String : সংযোগ করার জন্য ওয়াইফাই এসএসআইডি |
wifiPsk | String : PSK পাসফ্রেজ অথবা এনক্রিপ্ট করা না থাকলে null |
scanSsid | boolean : এই নেটওয়ার্কের জন্য লুকানো SSID স্ক্যান করা হবে কিনা। |
| ফেরত | |
|---|---|
IWifiHelper.WifiConnectionResult | WifiConnectionResult সংযোগের অবস্থা নির্দেশ করে। |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
ফলাফলের সাথে ওয়াইফাই নেটওয়ার্কের সাথে সংযোগ করুন
public IWifiHelper.WifiConnectionResult connectToWifiNetworkWithResult (Map<String, String> wifiSsidToPsk)
ওয়াইফাই নেটওয়ার্কের সাথে সংযুক্ত হয়।
wifiSsidToPsk ম্যাপে দেওয়া ওয়াইফাই নেটওয়ার্কগুলোর কোনো একটির সাথে সফলভাবে সংযোগ স্থাপন না হওয়া পর্যন্ত এটি ওয়াইফাই চালু করে এবং ব্লক করে রাখে। একবার সংযোগ স্থাপিত হলে, ITestDevice.disconnectFromWifi() অথবা ITestDevice.clearLastConnectedWifiNetwork() কল না করা পর্যন্ত ইনস্ট্যান্সটি প্রতিটি রিবুটের পর সংযোগটি পুনরুদ্ধার করার চেষ্টা করবে।
| প্যারামিটার | |
|---|---|
wifiSsidToPsk | Map : ওয়াইফাই এসএসআইডি থেকে পাসওয়ার্ডের একটি মানচিত্র। |
| ফেরত | |
|---|---|
IWifiHelper.WifiConnectionResult | WifiConnectionResult সংযোগের অবস্থা নির্দেশ করে। |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
ফলাফলের সাথে ওয়াইফাই নেটওয়ার্কের সাথে সংযোগ করুন
public IWifiHelper.WifiConnectionResult connectToWifiNetworkWithResult (Map<String, String> wifiSsidToPsk, boolean scanSsid)
ওয়াইফাই নেটওয়ার্কের সাথে সংযুক্ত হয়।
wifiSsidToPsk ম্যাপে দেওয়া ওয়াইফাই নেটওয়ার্কগুলোর কোনো একটির সাথে সফলভাবে সংযোগ স্থাপন না হওয়া পর্যন্ত এটি ওয়াইফাই চালু করে এবং ব্লক করে রাখে। একবার সংযোগ স্থাপিত হলে, ITestDevice.disconnectFromWifi() অথবা ITestDevice.clearLastConnectedWifiNetwork() কল না করা পর্যন্ত ইনস্ট্যান্সটি প্রতিটি রিবুটের পর সংযোগটি পুনরুদ্ধার করার চেষ্টা করবে।
| প্যারামিটার | |
|---|---|
wifiSsidToPsk | Map : ওয়াইফাই এসএসআইডি থেকে পাসওয়ার্ডের একটি মানচিত্র। |
scanSsid | boolean : এই নেটওয়ার্কের জন্য লুকানো SSID স্ক্যান করা হবে কিনা। |
| ফেরত | |
|---|---|
IWifiHelper.WifiConnectionResult | WifiConnectionResult সংযোগের অবস্থা নির্দেশ করে। |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
ফলাফলের সাথে ওয়াইফাই নেটওয়ার্কের সাথে সংযোগ করুন
public IWifiHelper.WifiConnectionResult connectToWifiNetworkWithResult (String wifiSsid, String wifiPsk)
ওয়াইফাই নেটওয়ার্কের সাথে সংযুক্ত হয়।
নির্দিষ্ট ওয়াইফাই নেটওয়ার্কে সফলভাবে সংযোগ স্থাপন না হওয়া পর্যন্ত ওয়াইফাই চালু করে এবং ব্লক করে রাখে। একবার সংযোগ স্থাপিত হলে, ITestDevice.disconnectFromWifi() অথবা ITestDevice.clearLastConnectedWifiNetwork() কল না করা পর্যন্ত প্রতিটি রিবুটের পর ইনস্ট্যান্সটি সংযোগটি পুনরুদ্ধার করার চেষ্টা করবে।
| প্যারামিটার | |
|---|---|
wifiSsid | String : সংযোগ করার জন্য ওয়াইফাই এসএসআইডি |
wifiPsk | String : PSK পাসফ্রেজ অথবা এনক্রিপ্ট করা না থাকলে null |
| ফেরত | |
|---|---|
IWifiHelper.WifiConnectionResult | WifiConnectionResult সংযোগের অবস্থা নির্দেশ করে। |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
ব্যবহারকারী তৈরি করুন
public int createUser (String name,
boolean guest,
boolean ephemeral)প্রদত্ত নাম এবং ফ্ল্যাগ ব্যবহার করে একজন ব্যবহারকারী তৈরি করুন।
| প্যারামিটার | |
|---|---|
name | String : ডিভাইসে তৈরি করার জন্য ব্যবহারকারীর। |
guest | boolean : ব্যবহারকারী তৈরির সময় --guest ফ্ল্যাগটি সক্রিয় করুন |
ephemeral | boolean : তৈরির সময় --ephemeral ইউজার ফ্ল্যাগটি সক্রিয় করুন |
| ফেরত | |
|---|---|
int | তৈরি করা ব্যবহারকারীর আইডি |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
IllegalStateException | |
ব্যবহারকারী তৈরি করুন
public int createUser (String name,
boolean guest,
boolean ephemeral,
boolean forTesting)প্রদত্ত নাম এবং ফ্ল্যাগ ব্যবহার করে একজন ব্যবহারকারী তৈরি করুন।
| প্যারামিটার | |
|---|---|
name | String : ডিভাইসে তৈরি করার জন্য ব্যবহারকারীর। |
guest | boolean : ব্যবহারকারী তৈরির সময় --guest ফ্ল্যাগটি সক্রিয় করুন |
ephemeral | boolean : তৈরির সময় --ephemeral ইউজার ফ্ল্যাগটি সক্রিয় করুন |
forTesting | boolean : তৈরির সময় --for-testing টেস্ট ফ্ল্যাগটি সক্রিয় করুন |
| ফেরত | |
|---|---|
int | তৈরি করা ব্যবহারকারীর আইডি |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
IllegalStateException | |
ব্যবহারকারী তৈরি করুন
public int createUser (String name)
প্রদত্ত নাম এবং ডিফল্ট ফ্ল্যাগ ০ ব্যবহার করে একজন ব্যবহারকারী তৈরি করুন।
| প্যারামিটার | |
|---|---|
name | String : ডিভাইসে তৈরি করার জন্য ব্যবহারকারীর। |
| ফেরত | |
|---|---|
int | ব্যবহারকারী আইডির জন্য পূর্ণসংখ্যা তৈরি করা হয়েছে |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
IllegalStateException | |
createUserNoThrow
public int createUserNoThrow (String name)
প্রদত্ত নাম এবং ডিফল্ট ফ্ল্যাগ ০ ব্যবহার করে একজন ব্যবহারকারী তৈরি করুন।
| প্যারামিটার | |
|---|---|
name | String : ডিভাইসে তৈরি করার জন্য ব্যবহারকারীর। |
| ফেরত | |
|---|---|
int | তৈরি করা ইউজার আইডির জন্য পূর্ণসংখ্যা অথবা ত্রুটির জন্য -১। |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
debugDeviceNotAvailable
public DeviceInspectionResult debugDeviceNotAvailable ()
ডিভাইসটি অনুপলব্ধ হয়ে পড়লে, সেটি পরিদর্শন করুন এবং বিস্তারিত তথ্য ফেরত দিন।
| ফেরত | |
|---|---|
DeviceInspectionResult | |
ফাইল মুছে ফেলুন
public void deleteFile (String deviceFilePath,
int userId)ডিভাইস থেকে কোনো ফাইল বা ডিরেক্টরি মুছে ফেলার সহায়ক পদ্ধতি।
| প্যারামিটার | |
|---|---|
deviceFilePath | String : ডিভাইসে ফাইলটির সম্পূর্ণ পাথ। |
userId | int : যে ব্যবহারকারীর আইডি থেকে মুছে ফেলতে হবে |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
ফাইল মুছে ফেলুন
public void deleteFile (String deviceFilePath)
ডিভাইস থেকে কোনো ফাইল বা ডিরেক্টরি মুছে ফেলার সহায়ক পদ্ধতি।
| প্যারামিটার | |
|---|---|
deviceFilePath | String : ডিভাইসে ফাইলটির সম্পূর্ণ পাথ। |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
ডিরেজিস্টারডিভাইসঅ্যাকশনরিসিভার
public void deregisterDeviceActionReceiver (IDeviceActionReceiver deviceActionReceiver)
নিবন্ধিত IDeviceActionReceiver টি অপসারণ করে।
| প্যারামিটার | |
|---|---|
deviceActionReceiver | IDeviceActionReceiver : একটি IDeviceActionReceiver যা অপসারণ করা হবে। |
ডিভাইসসফটরিস্টার্ট করা হয়েছে
public boolean deviceSoftRestarted (ProcessInfo prevSystemServerProcess)
ডিভাইসটি সফট-রিস্টার্ট হয়েছে কিনা তা পরীক্ষা করার জন্য একটি সহায়ক মেথড, যা বর্তমান system_server-কে পূর্ববর্তী system_server-এর ProcessInfo সাথে তুলনা করে। ProcessInfo পেতে getProcessByName(String) ব্যবহার করুন।
| প্যারামিটার | |
|---|---|
prevSystemServerProcess | ProcessInfo : পূর্ববর্তী system_server প্রসেস ProcessInfo . |
| ফেরত | |
|---|---|
boolean | ডিভাইসটি সফট-রিস্টার্ট করা হলে true |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
ডিভাইসসফটরিস্টার্টেডসিন্স
public boolean deviceSoftRestartedSince (long utcEpochTime,
TimeUnit timeUnit)ডিভাইসের ইপক থেকে প্রাপ্ত UTC সময় এবং এর TimeUnit থেকে ডিভাইসটি সফট-রিস্টার্ট হয়েছে কিনা তা পরীক্ষা করার জন্য একটি সহায়ক মেথড। সফট-রিস্টার্ট বলতে ডিভাইসের হার্ড রিবুট ছাড়া সিস্টেম সার্ভার রিস্টার্ট হওয়াকে বোঝায় (উদাহরণস্বরূপ: অনুরোধকৃত রিবুট)। মিলিসেকেন্ডে ডিভাইসের বর্তমান utcEpochTime, getDeviceDate() মেথডের মাধ্যমে পাওয়া যায়।
| প্যারামিটার | |
|---|---|
utcEpochTime | long : epoch থেকে ডিভাইসের সময় (সেকেন্ডে)। |
timeUnit | TimeUnit : প্রদত্ত utcEpochTime-এর জন্য TimeUnit একক। |
| ফেরত | |
|---|---|
boolean | ডিভাইসটি সফট-রিস্টার্ট করা হলে true |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
disableAdbRoot
public boolean disableAdbRoot ()
adb root বন্ধ করে দেয়।
adb root নিষ্ক্রিয় করলে ডিভাইসটি adb থেকে সংযোগ বিচ্ছিন্ন হয়ে যেতে পারে। ডিভাইসটি উপলব্ধ না হওয়া পর্যন্ত এই পদ্ধতিটি ব্লক হয়ে থাকবে।| ফেরত | |
|---|---|
boolean | সফল হলে true । |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
নিষ্ক্রিয়Keyguard
public void disableKeyguard ()
কীগার্ড নিষ্ক্রিয় করার প্রচেষ্টা।
প্রথমে ইনপুট ডিসপ্যাচ প্রস্তুত হওয়ার জন্য অপেক্ষা করুন, এটি প্রায় তখনই ঘটে যখন ডিভাইসটি BOOT_COMPLETE রিপোর্ট করে, যা দৃশ্যত অ্যাসিঙ্ক্রোনাসভাবে ঘটে, কারণ বর্তমান ফ্রেমওয়ার্ক ইমপ্লিমেন্টেশনে মাঝে মাঝে রেস কন্ডিশন দেখা দেয়। তারপর কীগার্ড বাতিল করার জন্য কমান্ড পাঠানো হয় (এটি শুধুমাত্র নন-সিকিউর কীগার্ডের ক্ষেত্রে কাজ করে)।
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
নেটওয়ার্ক মনিটর নিষ্ক্রিয় করুন
public boolean disableNetworkMonitor ()
ডিভাইসে নেটওয়ার্ক পর্যবেক্ষণ নিষ্ক্রিয় করে।
| ফেরত | |
|---|---|
boolean | পর্যবেক্ষণ সফলভাবে নিষ্ক্রিয় করা হলে true । ব্যর্থ হলে false । |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
ওয়াইফাই থেকে সংযোগ বিচ্ছিন্ন করুন
public boolean disconnectFromWifi ()
ওয়াইফাই নেটওয়ার্ক থেকে সংযোগ বিচ্ছিন্ন হয়ে যায়।
পরিচিত নেটওয়ার্কের তালিকা থেকে সমস্ত নেটওয়ার্ক মুছে দেয় এবং ওয়াইফাই নিষ্ক্রিয় করে দেয়।| ফেরত | |
|---|---|
boolean | ওয়াইফাই নেটওয়ার্ক থেকে সফলভাবে সংযোগ বিচ্ছিন্ন হলে true । সংযোগ বিচ্ছিন্ন করতে ব্যর্থ হলে false । |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
ফাইলটি কি বিদ্যমান?
public boolean doesFileExist (String deviceFilePath,
int userId)কোনো নির্দিষ্ট ব্যবহারকারীর জন্য ডিভাইসে ফাইলটি আছে কিনা তা নির্ধারণ করার সহায়ক পদ্ধতি।
| প্যারামিটার | |
|---|---|
deviceFilePath | String : ডিভাইসে যাচাই করার জন্য ফাইলের সম্পূর্ণ পাথ |
userId | int : যে ইউজার আইডির মাধ্যমে ফাইলের অস্তিত্ব যাচাই করা হবে |
| ফেরত | |
|---|---|
boolean | ফাইলটি বিদ্যমান থাকলে true , অন্যথায় false । |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
ফাইলটি কি বিদ্যমান?
public boolean doesFileExist (String deviceFilePath)
ডিভাইসে ফাইলটি আছে কিনা তা নির্ধারণ করার জন্য সহায়ক পদ্ধতি।
| প্যারামিটার | |
|---|---|
deviceFilePath | String : the absolute path of file on device to check |
| ফেরত | |
|---|---|
boolean | true if file exists, false otherwise. |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
dumpHeap
public File dumpHeap (String process,
String devicePath)Attempt to dump the heap from the system_server. It is the caller responsibility to clean up the dumped file.
| প্যারামিটার | |
|---|---|
process | String : the name of the device process to dumpheap on. |
devicePath | String : the path on the device where to put the dump. This must be a location where permissions allow it. |
| ফেরত | |
|---|---|
File | the File containing the report. Null if something failed. |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
enableAdbRoot
public boolean enableAdbRoot ()
Turns on adb root. If the "enable-root" setting is "false", will log a message and return without enabling root.
Enabling adb root may cause device to disconnect from adb. This method will block until device is available.
| ফেরত | |
|---|---|
boolean | true if successful. |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
enableNetworkMonitor
public boolean enableNetworkMonitor ()
Enables network monitoring on device.
| ফেরত | |
|---|---|
boolean | true if monitoring is enabled successfully. false if it failed. |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
executeAdbCommand
public String executeAdbCommand (long timeout,
String... cmdArgs)Helper method which executes a adb command as a system command with a specified timeout.
executeShellCommand(String) should be used instead wherever possible, as that method provides better failure detection and performance.
| প্যারামিটার | |
|---|---|
timeout | long : the time in milliseconds before the device is considered unresponsive, 0L for no timeout |
cmdArgs | String : the adb command and arguments to run |
| ফেরত | |
|---|---|
String | the stdout from command. null if command failed to execute. |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
executeAdbCommand
public String executeAdbCommand (String... cmdArgs)
Helper method which executes a adb command as a system command.
executeShellCommand(String) should be used instead wherever possible, as that method provides better failure detection and performance.| প্যারামিটার | |
|---|---|
cmdArgs | String : the adb command and arguments to run |
| ফেরত | |
|---|---|
String | the stdout from command. null if command failed to execute. |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
executeAdbCommand
public String executeAdbCommand (long timeout,
Map<String, String> envMap,
String... cmdArgs)Helper method which executes a adb command as a system command with a specified timeout.
executeShellCommand(String) should be used instead wherever possible, as that method provides better failure detection and performance.
| প্যারামিটার | |
|---|---|
timeout | long : the time in milliseconds before the device is considered unresponsive, 0L for no timeout |
envMap | Map : environment to set for the command |
cmdArgs | String : the adb command and arguments to run |
| ফেরত | |
|---|---|
String | the stdout from command. null if command failed to execute. |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
executeAdbV2Command
public CommandResult executeAdbV2Command (String... cmdArgs)
Helper method which executes a adb command as a system command.
executeShellCommand(String) should be used instead wherever possible, as that method provides better failure detection and performance.
| প্যারামিটার | |
|---|---|
cmdArgs | String : the adb command and arguments to run |
| ফেরত | |
|---|---|
CommandResult | the CommandResult containing output of command. |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
executeAdbV2Command
public CommandResult executeAdbV2Command (long timeout, String... cmdArgs)
Helper method which executes a adb command as a system command with a specified timeout.
executeShellCommand(String) should be used instead wherever possible, as that method provides better failure detection and performance.
| প্যারামিটার | |
|---|---|
timeout | long : the time in milliseconds before the device is considered unresponsive, 0L for no timeout |
cmdArgs | String : the adb command and arguments to run |
| ফেরত | |
|---|---|
CommandResult | the CommandResult containing output of command. |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
executeAdbV2Command
public CommandResult executeAdbV2Command (long timeout, Map<String, String> envMap, String... cmdArgs)
Helper method which executes a adb command as a system command with a specified timeout.
executeShellCommand(String) should be used instead wherever possible, as that method provides better failure detection and performance.
| প্যারামিটার | |
|---|---|
timeout | long : the time in milliseconds before the device is considered unresponsive, 0L for no timeout |
envMap | Map : environment to set for the command |
cmdArgs | String : the adb command and arguments to run |
| ফেরত | |
|---|---|
CommandResult | the CommandResult containing output of command. |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
executeAdbV2Command
public CommandResult executeAdbV2Command (long timeout, Map<String, String> envMap, int retryAttempts, String... cmdArgs)
Helper method which executes a adb command as a system command with a specified timeout.
executeShellCommand(String) should be used instead wherever possible, as that method provides better failure detection and performance.
| প্যারামিটার | |
|---|---|
timeout | long : the time in milliseconds before the device is considered unresponsive, 0L for no timeout |
envMap | Map : environment to set for the command |
retryAttempts | int : the maximum number of times to retry command if it fails due to a exception. DeviceNotResponsiveException will be thrown if retryAttempts are performed without success. |
cmdArgs | String : the adb command and arguments to run |
| ফেরত | |
|---|---|
CommandResult | the CommandResult containing output of command. |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
executeFastbootCommand
public CommandResult executeFastbootCommand (String... cmdArgs)
Helper method which executes a fastboot command as a system command with a default timeout of 2 minutes.
Expected to be used when device is already in fastboot mode.
| প্যারামিটার | |
|---|---|
cmdArgs | String : the fastboot command and arguments to run |
| ফেরত | |
|---|---|
CommandResult | the CommandResult containing output of command |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
UnsupportedOperationException | |
executeFastbootCommand
public CommandResult executeFastbootCommand (long timeout, String... cmdArgs)
Helper method which executes a fastboot command as a system command.
Expected to be used when device is already in fastboot mode.| প্যারামিটার | |
|---|---|
timeout | long : the time in milliseconds before the command expire |
cmdArgs | String : the fastboot command and arguments to run |
| ফেরত | |
|---|---|
CommandResult | the CommandResult containing output of command |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
UnsupportedOperationException | |
executeLongFastbootCommand
public CommandResult executeLongFastbootCommand (String... cmdArgs)
Helper method which executes a long running fastboot command as a system command.
Identical toexecuteFastbootCommand(String...) except uses a longer timeout.| প্যারামিটার | |
|---|---|
cmdArgs | String : the fastboot command and arguments to run |
| ফেরত | |
|---|---|
CommandResult | the CommandResult containing output of command |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
UnsupportedOperationException | |
executeLongFastbootCommand
public CommandResult executeLongFastbootCommand (Map<String, String> envVarMap, String... cmdArgs)
Helper method which executes a long running fastboot command as a system command with system environment variables.
Identical to executeFastbootCommand(String...) except uses a longer timeout.
| প্যারামিটার | |
|---|---|
envVarMap | Map : the system environment variables that the fastboot command run with |
cmdArgs | String : the fastboot command and arguments to run |
| ফেরত | |
|---|---|
CommandResult | the CommandResult containing output of command |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
UnsupportedOperationException | |
executeShellCommand
public String executeShellCommand (String command)
Helper method which executes a adb shell command and returns output as a String .
| প্যারামিটার | |
|---|---|
command | String : the adb shell command to run |
| ফেরত | |
|---|---|
String | the shell output |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
executeShellCommand
public void executeShellCommand (String command,
IShellOutputReceiver receiver,
long maxTimeToOutputShellResponse,
TimeUnit timeUnit,
int retryAttempts)Executes a adb shell command, with more parameters to control command behavior.
| প্যারামিটার | |
|---|---|
command | String : the adb shell command to run |
receiver | IShellOutputReceiver : the IShellOutputReceiver to direct shell output to. |
maxTimeToOutputShellResponse | long : the maximum amount of time during which the command is allowed to not output any response; unit as specified in timeUnit |
timeUnit | TimeUnit : unit for maxTimeToOutputShellResponse |
retryAttempts | int : the maximum number of times to retry command if it fails due to a exception. DeviceNotResponsiveException will be thrown if retryAttempts are performed without success. |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
executeShellCommand
public void executeShellCommand (String command,
IShellOutputReceiver receiver,
long maxTimeoutForCommand,
long maxTimeToOutputShellResponse,
TimeUnit timeUnit,
int retryAttempts)Executes a adb shell command, with more parameters to control command behavior.
| প্যারামিটার | |
|---|---|
command | String : the adb shell command to run |
receiver | IShellOutputReceiver : the IShellOutputReceiver to direct shell output to. |
maxTimeoutForCommand | long : the maximum timeout for the command to complete; unit as specified in timeUnit |
maxTimeToOutputShellResponse | long : the maximum amount of time during which the command is allowed to not output any response; unit as specified in timeUnit |
timeUnit | TimeUnit : unit for maxTimeToOutputShellResponse |
retryAttempts | int : the maximum number of times to retry command if it fails due to a exception. DeviceNotResponsiveException will be thrown if retryAttempts are performed without success. |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
executeShellCommand
public void executeShellCommand (String command,
IShellOutputReceiver receiver)Executes the given adb shell command, retrying multiple times if command fails.
A simpler form ofexecuteShellCommand(String,IShellOutputReceiver,long,TimeUnit,int) with default values.| প্যারামিটার | |
|---|---|
command | String : the adb shell command to run |
receiver | IShellOutputReceiver : the IShellOutputReceiver to direct shell output to. |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
executeShellV2Command
public CommandResult executeShellV2Command (String cmd)
Helper method which executes a adb shell command and returns the results as a CommandResult properly populated with the command status output, stdout and stderr.
| প্যারামিটার | |
|---|---|
cmd | String : The command that should be run. |
| ফেরত | |
|---|---|
CommandResult | The result in CommandResult . |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
executeShellV2Command
public CommandResult executeShellV2Command (String cmd, File pipeAsInput, OutputStream pipeToOutput, long maxTimeoutForCommand, TimeUnit timeUnit, int retryAttempts)
Executes a adb shell command, with more parameters to control command behavior.
| প্যারামিটার | |
|---|---|
cmd | String : the adb shell command to run |
pipeAsInput | File : A File that will be piped as input to the command, or null. |
pipeToOutput | OutputStream : OutputStream where the std output will be redirected, or null. |
maxTimeoutForCommand | long : the maximum timeout for the command to complete; unit as specified in timeUnit |
timeUnit | TimeUnit : unit for maxTimeToOutputShellResponse |
retryAttempts | int : the maximum number of times to retry command if it fails due to a exception. DeviceNotResponsiveException will be thrown if retryAttempts are performed without success. |
| ফেরত | |
|---|---|
CommandResult | |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
executeShellV2Command
public CommandResult executeShellV2Command (String cmd, long maxTimeoutForCommand, TimeUnit timeUnit)
Executes a adb shell command, with more parameters to control command behavior.
| প্যারামিটার | |
|---|---|
cmd | String : the adb shell command to run |
maxTimeoutForCommand | long : the maximum timeout for the command to complete; unit as specified in timeUnit |
timeUnit | TimeUnit : unit for maxTimeToOutputShellResponse |
| ফেরত | |
|---|---|
CommandResult | |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
executeShellV2Command
public CommandResult executeShellV2Command (String cmd, File pipeAsInput)
Helper method which executes an adb shell command and returns the results as a CommandResult properly populated with the command status output, stdout and stderr.
| প্যারামিটার | |
|---|---|
cmd | String : The command that should be run. |
pipeAsInput | File : A File that will be piped as input to the command, or null. |
| ফেরত | |
|---|---|
CommandResult | The result in CommandResult . |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
executeShellV2Command
public CommandResult executeShellV2Command (String cmd, long maxTimeoutForCommand, TimeUnit timeUnit, int retryAttempts)
Executes a adb shell command, with more parameters to control command behavior.
| প্যারামিটার | |
|---|---|
cmd | String : the adb shell command to run |
maxTimeoutForCommand | long : the maximum timeout for the command to complete; unit as specified in timeUnit |
timeUnit | TimeUnit : unit for maxTimeToOutputShellResponse |
retryAttempts | int : the maximum number of times to retry command if it fails due to a exception. DeviceNotResponsiveException will be thrown if retryAttempts are performed without success. |
| ফেরত | |
|---|---|
CommandResult | |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
executeShellV2Command
public CommandResult executeShellV2Command (String cmd, OutputStream pipeToOutput)
Helper method which executes an adb shell command and returns the results as a CommandResult properly populated with the command status output and stderr. stdout is directed to the specified stream.
| প্যারামিটার | |
|---|---|
cmd | String : The command that should be run. |
pipeToOutput | OutputStream : OutputStream where the std output will be redirected, or null. |
| ফেরত | |
|---|---|
CommandResult | The result in CommandResult . |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
executeShellV2Command
public CommandResult executeShellV2Command (String cmd, File pipeAsInput, OutputStream pipeToOutput, OutputStream pipeToError, long maxTimeoutForCommand, TimeUnit timeUnit, int retryAttempts)
Executes a adb shell command, with more parameters to control command behavior.
| প্যারামিটার | |
|---|---|
cmd | String : the adb shell command to run |
pipeAsInput | File : A File that will be piped as input to the command, or null. |
pipeToOutput | OutputStream : OutputStream where the std output will be redirected, or null. |
pipeToError | OutputStream : OutputStream where the std error will be redirected, or null. |
maxTimeoutForCommand | long : the maximum timeout for the command to complete; unit as specified in timeUnit |
timeUnit | TimeUnit : unit for maxTimeToOutputShellResponse |
retryAttempts | int : the maximum number of times to retry command if it fails due to a exception. DeviceNotResponsiveException will be thrown if retryAttempts are performed without success. |
| ফেরত | |
|---|---|
CommandResult | |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
executeShellV2Command
public CommandResult executeShellV2Command (String cmd, File pipeAsInput, OutputStream pipeToOutput, OutputStream pipeToError, long maxTimeoutForCommand, long maxTimeToOutputShellResponse, TimeUnit timeUnit, int retryAttempts)
Executes a adb shell command, with more parameters to control command behavior.
| প্যারামিটার | |
|---|---|
cmd | String : the adb shell command to run |
pipeAsInput | File : A File that will be piped as input to the command, or null. |
pipeToOutput | OutputStream : OutputStream where the std output will be redirected, or null. |
pipeToError | OutputStream : OutputStream where the std error will be redirected, or null. |
maxTimeoutForCommand | long : the maximum timeout for the command to complete; unit as specified in timeUnit |
maxTimeToOutputShellResponse | long : the maximum amount of time during which the command is allowed to not output any response; unit as specified in timeUnit |
timeUnit | TimeUnit : unit for maxTimeToOutputShellResponse |
retryAttempts | int : the maximum number of times to retry command if it fails due to a exception. DeviceNotResponsiveException will be thrown if retryAttempts are performed without success. |
| ফেরত | |
|---|---|
CommandResult | |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
executeShellV2Command
public CommandResult executeShellV2Command (String cmd, IShellOutputReceiver receiver)
Helper method which executes a adb shell command and returns the results as a CommandResult properly populated with the command status output, stdout and stderr.
| প্যারামিটার | |
|---|---|
cmd | String : The command that should be run. |
receiver | IShellOutputReceiver : the IShellOutputReceiver to direct shell output to. |
| ফেরত | |
|---|---|
CommandResult | The result in CommandResult . |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
fastbootOemRamdumpNow
public CommandResult fastbootOemRamdumpNow ()
Helper method which triggers ramdump from a fastboot mode.
This method executes the "oem ramdump now" command. UnlikeERROR(/#executeFastbootCommand()) , it does not attempt retries or device recovery if the command fails or the status is invalid, as a device crash is the intended outcome. Expected to be used when device is already in fastboot mode.| ফেরত | |
|---|---|
CommandResult | the CommandResult containing output of command |
fastbootWipePartition
public CommandResult fastbootWipePartition (String partition)
Helper method which wipes a partition for the device.
IfgetUseFastbootErase() is true , then fastboot erase will be used to wipe the partition. The device must then create a filesystem the next time the device boots. Otherwise, fastboot format is used which will create a new filesystem on the device. Expected to be used when device is already in fastboot mode.| প্যারামিটার | |
|---|---|
partition | String : the partition to wipe |
| ফেরত | |
|---|---|
CommandResult | the CommandResult containing output of command |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
getActiveApexes
public Set<ITestDevice.ApexInfo> getActiveApexes ()
Fetch the information about APEXes activated on the device.
| ফেরত | |
|---|---|
Set< ITestDevice.ApexInfo > | Set of ApexInfo currently activated on the device |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
getAdbPath
public String getAdbPath ()
Returns the path of the adb binary being used.
| ফেরত | |
|---|---|
String | |
getAllSettings
public Map<String, String> getAllSettings (String namespace)
Return key value pairs of requested namespace.
| প্যারামিটার | |
|---|---|
namespace | String : must be one of {"system", "secure", "global"} |
| ফেরত | |
|---|---|
Map<String, String> | the map of key value pairs. Null if namespace is not supported. |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
getAllocationState
public DeviceAllocationState getAllocationState ()
Return the current allocation state of device
| ফেরত | |
|---|---|
DeviceAllocationState | |
getAndroidId
public String getAndroidId (int userId)
Find and return the android-id associated to a userId, null if not found.
| প্যারামিটার | |
|---|---|
userId | int |
| ফেরত | |
|---|---|
String | |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
getAndroidIds
public Map<Integer, String> getAndroidIds ()
Create a Map of android ids found matching user ids. There is no insurance that each user id will found an android id associated in this function so some user ids may match null.
| ফেরত | |
|---|---|
Map<Integer, String> | Map of android ids found matching user ids. |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
getApiLevel
public int getApiLevel ()
Get the device API Level. Defaults to UNKNOWN_API_LEVEL .
| ফেরত | |
|---|---|
int | an integer indicating the API Level of device |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
getApiLevelFull
public int getApiLevelFull ()
Similar to getApiLevel() , but returns the full version.
| ফেরত | |
|---|---|
int | an integer indicating the full API Level of device |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
getAppPackageInfo
public PackageInfo getAppPackageInfo (String packageName)
Fetch information about a package installed on device.
| প্যারামিটার | |
|---|---|
packageName | String |
| ফেরত | |
|---|---|
PackageInfo | the PackageInfo or null if information could not be retrieved |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
getAppPackageInfos
public List<PackageInfo> getAppPackageInfos ()
Fetch information of packages installed on the device.
| ফেরত | |
|---|---|
List< PackageInfo > | List of PackageInfo s installed on the device. |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
getBasebandVersion
public String getBasebandVersion ()
Convenience method to get baseband (radio) version of this device. Getting the radio version is device specific, so it might not return the correct information for all devices. This method relies on the gsm.version.baseband propery to return the correct version information. This is not accurate for some CDMA devices and the version returned here might not match the version reported from fastboot and might not return the version for the CDMA radio. TL;DR this method only reports accurate version if the gsm.version.baseband property is the same as the version returned by fastboot getvar version-baseband .
| ফেরত | |
|---|---|
String | the String baseband version or null if it cannot be determined (device has no radio or version string cannot be read) |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
getBattery
public Integer getBattery ()
Returns the current battery level of a device or Null if battery level unavailable.
| ফেরত | |
|---|---|
Integer | |
getBooleanProperty
public boolean getBooleanProperty (String name,
boolean defaultValue)Returns boolean value of the given property.
| প্যারামিটার | |
|---|---|
name | String : the property name |
defaultValue | boolean : default value to return if property is empty or doesn't exist. |
| ফেরত | |
|---|---|
boolean | true if the property has value "1" , "y" , "yes" , "on" , or "true" , false if the property has value of "0" , "n" , "no" , "off" , "false" , or defaultValue otherwise. |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
getBootHistory
public Map<Long, String> getBootHistory ()
Helper method collects the boot history map with boot time and boot reason.
| ফেরত | |
|---|---|
Map<Long, String> | Map of boot time (UTC time in second since Epoch) and boot reason |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
getBootHistorySince
public Map<Long, String> getBootHistorySince (long utcEpochTime,
TimeUnit timeUnit)Helper method collects the boot history map with boot time and boot reason since the given time since epoch from device and the time unit specified. The current device utcEpochTime in Millisecond can be obtained by method getDeviceDate() .
| প্যারামিটার | |
|---|---|
utcEpochTime | long : the device time since Epoch. |
timeUnit | TimeUnit : the time unit TimeUnit . |
| ফেরত | |
|---|---|
Map<Long, String> | Map of boot time (UTC time in second since Epoch) and boot reason |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
getBootloaderVersion
public String getBootloaderVersion ()
Convenience method to get the bootloader version of this device.
Will attempt to retrieve bootloader version from the device's current state. (ie if device is in fastboot mode, it will attempt to retrieve version from fastboot)| ফেরত | |
|---|---|
String | the String bootloader version or null if it cannot be found |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
UnsupportedOperationException | |
getBugreport
public InputStreamSource getBugreport ()
Retrieves a bugreport from the device.
The implementation of this is guaranteed to continue to work on a device without an sdcard (or where the sdcard is not yet mounted).
| ফেরত | |
|---|---|
InputStreamSource | An InputStreamSource which will produce the bugreport contents on demand. In case of failure, the InputStreamSource will produce an empty InputStream . |
getBugreportz
public InputStreamSource getBugreportz ()
Retrieves a bugreportz from the device. Zip format bugreport contains the main bugreport and other log files that are useful for debugging.
Only supported for 'adb version' > 1.0.36
| ফেরত | |
|---|---|
InputStreamSource | a InputStreamSource of the zip file containing the bugreportz, return null in case of failure. |
getBuildAlias
public String getBuildAlias ()
Retrieve the alias of the build that the device is currently running.
Build alias is usually a more readable string than build id (typically a number for Nexus builds). For example, final Android 4.2 release has build alias JDQ39, and build id 573038
| ফেরত | |
|---|---|
String | the build alias or fall back to build id if it could not be retrieved |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
getBuildFlavor
public String getBuildFlavor ()
Retrieve the build flavor for the device.
| ফেরত | |
|---|---|
String | the build flavor or null if it could not be retrieved |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
getBuildId
public String getBuildId ()
Retrieve the build the device is currently running.
| ফেরত | |
|---|---|
String | the build id or IBuildInfo.UNKNOWN_BUILD_ID if it could not be retrieved |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
getBuildSigningKeys
public String getBuildSigningKeys ()
Returns the key type used to sign the device image
Typically Android devices may be signed with test-keys (like in AOSP) or release-keys (controlled by individual device manufacturers)
| ফেরত | |
|---|---|
String | The signing key if found, null otherwise. |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
getCachedDeviceDescriptor
public DeviceDescriptor getCachedDeviceDescriptor ()
Returns a cached DeviceDescriptor if the device is allocated, otherwise returns the current DeviceDescriptor .
| ফেরত | |
|---|---|
DeviceDescriptor | |
getCachedDeviceDescriptor
public DeviceDescriptor getCachedDeviceDescriptor (boolean shortDescriptor)
Returns a cached DeviceDescriptor if the device is allocated, otherwise returns the current DeviceDescriptor .
| প্যারামিটার | |
|---|---|
shortDescriptor | boolean : Whether or not to limit descriptor to bare minimum info |
| ফেরত | |
|---|---|
DeviceDescriptor | |
getChildren
public String[] getChildren (String path)
Alternative to using IFileEntry that sometimes won't work because of permissions.
| প্যারামিটার | |
|---|---|
path | String : is the path on the device where to do the search |
| ফেরত | |
|---|---|
String[] | Array of string containing all the file in a path on the device. |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
getConnection
public AbstractConnection getConnection ()
The current connection associated with the device.
| ফেরত | |
|---|---|
AbstractConnection | |
getContentProvider
public ContentProviderHandler getContentProvider (int userId)
Returns the ContentProviderHandler or null if not available.
Content provider can be reused if it was constructed before with the same userId .
| প্যারামিটার | |
|---|---|
userId | int : the user id to initialize the content provider with. |
| ফেরত | |
|---|---|
ContentProviderHandler | |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
getCurrentFoldableState
public DeviceFoldableState getCurrentFoldableState ()
Returns the current foldable state of the device or null if some issues occurred.
| ফেরত | |
|---|---|
DeviceFoldableState | |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
getCurrentUser
public int getCurrentUser ()
Return the id of the current running user. In case of error, return -10000.
| ফেরত | |
|---|---|
int | |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
getDeviceClass
public String getDeviceClass ()
Get the device class.
| ফেরত | |
|---|---|
String | the String device class. |
getDeviceDate
public long getDeviceDate ()
Return the date of the device in millisecond since epoch.
| ফেরত | |
|---|---|
long | the date of the device in epoch format. |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
getDeviceDescriptor
public DeviceDescriptor getDeviceDescriptor ()
Return a DeviceDescriptor from the device information to get info on it without passing the actual device object.
| ফেরত | |
|---|---|
DeviceDescriptor | |
getDeviceDescriptor
public DeviceDescriptor getDeviceDescriptor (boolean shortDescriptor)
Return a DeviceDescriptor from the device information to get info on it without passing the actual device object.
| প্যারামিটার | |
|---|---|
shortDescriptor | boolean : Whether or not to limit descriptor to bare minimum info |
| ফেরত | |
|---|---|
DeviceDescriptor | |
getDeviceState
public TestDeviceState getDeviceState ()
Get the device's state.
| ফেরত | |
|---|---|
TestDeviceState | |
getDeviceTimeOffset
public long getDeviceTimeOffset (Date date)
Helper to get the time difference between the device and a given Date . Use Epoch time internally.
| প্যারামিটার | |
|---|---|
date | Date |
| ফেরত | |
|---|---|
long | the difference in milliseconds |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
getEmulatorOutput
public InputStreamSource getEmulatorOutput ()
Get the stream of emulator stdout and stderr
| ফেরত | |
|---|---|
InputStreamSource | emulator output |
getEmulatorProcess
public Process getEmulatorProcess ()
Return the Process corresponding to this emulator.
| ফেরত | |
|---|---|
Process | the Process or null |
getExecuteShellCommandLog
public final File getExecuteShellCommandLog ()
The log that contains all the executeShellCommand(String) logs.
| ফেরত | |
|---|---|
File | |
getExternalStoreFreeSpace
public long getExternalStoreFreeSpace ()
Helper method to determine amount of free space on device external storage.
| ফেরত | |
|---|---|
long | the amount of free space in KB |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
getFastbootPath
public String getFastbootPath ()
Returns the path of the fastboot binary being used. Still requires isFastbootEnabled() to be true, to have fastboot functions enabled.
| ফেরত | |
|---|---|
String | |
getFastbootProductType
public String getFastbootProductType ()
Convenience method to get the product type of this device when its in fastboot mode.
This method should only be used if device should be in fastboot. Its a bit safer variant than the genericgetProductType() method in this case, because ITestDevice will know to recover device into fastboot if device is in incorrect state or is unresponsive.| ফেরত | |
|---|---|
String | the String product type name or null if it cannot be determined |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
UnsupportedOperationException | |
getFastbootProductVariant
public String getFastbootProductVariant ()
Convenience method to get the product type of this device when its in fastboot mode.
This method should only be used if device should be in fastboot. Its a bit safer variant than the genericgetProductType() method in this case, because ITestDevice will know to recover device into fastboot if device is in incorrect state or is unresponsive.| ফেরত | |
|---|---|
String | the String product type name or null if it cannot be determined |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
UnsupportedOperationException | |
getFastbootSerialNumber
public String getFastbootSerialNumber ()
Returns the fastboot mode serial number.
| ফেরত | |
|---|---|
String | |
getFastbootVariable
public String getFastbootVariable (String variableName)
Retrieve the given fastboot variable value from the device.
| প্যারামিটার | |
|---|---|
variableName | String : the variable name |
| ফেরত | |
|---|---|
String | the property value or null if it does not exist |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
UnsupportedOperationException | |
getFastbootVersion
public String getFastbootVersion ()
Returns the version string of the fastboot binary being used. Or null if something goes wrong.
| ফেরত | |
|---|---|
String | |
getFileEntry
public IFileEntry getFileEntry (String path)
Retrieve a reference to a remote file on device.
| প্যারামিটার | |
|---|---|
path | String : the file path to retrieve. Can be an absolute path or path relative to '/'. (ie both "/system" and "system" syntax is supported) |
| ফেরত | |
|---|---|
IFileEntry | the IFileEntry or null if file at given path cannot be found |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
getFileEntry
public IFileEntry getFileEntry (FileListingService.FileEntry entry)
Unofficial helper to get a FileEntry from a non-root path. FIXME: Refactor the FileEntry system to have it available from any path. (even non root).
| প্যারামিটার | |
|---|---|
entry | FileListingService.FileEntry : a FileEntry not necessarily root as Ddmlib requires. |
| ফেরত | |
|---|---|
IFileEntry | a FileEntryWrapper representing the FileEntry. |
| নিক্ষেপ | |
|---|---|
| com.android.tradefed.device.DeviceNotAvailableException |
DeviceNotAvailableException | |
ভাঁজযোগ্য অবস্থাগুলো পান
public Set<DeviceFoldableState> getFoldableStates ()
Returns the list of foldable states on the device. Can be obtained with "cmd device_state print-states".
| ফেরত | |
|---|---|
Set< DeviceFoldableState > | |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
getIDevice
public IDevice getIDevice ()
Returns a reference to the associated ddmlib IDevice .
IDevice may be allocated by DDMS each time the device disconnects and reconnects from adb. Thus callers should not keep a reference to the IDevice , because that reference may become stale.| ফেরত | |
|---|---|
IDevice | the IDevice |
getInstalledPackageNames
public Set<String> getInstalledPackageNames ()
Fetch the application package names present on the device.
| ফেরত | |
|---|---|
Set<String> | Set of String package names currently installed on the device. |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
getIntProperty
public long getIntProperty (String name,
long defaultValue)Returns integer value of the given property from the device.
| প্যারামিটার | |
|---|---|
name | String : the property name |
defaultValue | long : default value to return if property is empty or doesn't exist. |
| ফেরত | |
|---|---|
long | the property value or defaultValue if the property is empty, doesn't exist, or doesn't have an integer value. |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
getIpAddress
public String getIpAddress ()
Gets the device's IP address.
| ফেরত | |
|---|---|
String | the device's IP address, or null if device has no IP address |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
getKeyguardState
public KeyguardControllerState getKeyguardState ()
Return an object to get the current state of the keyguard or null if not supported.
| ফেরত | |
|---|---|
KeyguardControllerState | a KeyguardControllerState containing a snapshot of the state of the keyguard and returns Null if the Keyguard query is not supported. |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
getLastExpectedRebootTimeMillis
public long getLastExpectedRebootTimeMillis ()
Returns the last time Tradefed APIs triggered a reboot in milliseconds since EPOCH as returned by System.currentTimeMillis() .
| ফেরত | |
|---|---|
long | |
getLaunchApiLevel
public int getLaunchApiLevel ()
Get the device's first launched API Level. Defaults to UNKNOWN_API_LEVEL .
| ফেরত | |
|---|---|
int | an integer indicating the first launched API Level of device |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
getLogcat
public InputStreamSource getLogcat ()
Grabs a snapshot stream of the logcat data.
Works in two modes:
TestDeviceOptions.getMaxLogcatDataSize() bytes of the current contents of the background logcat capture| ফেরত | |
|---|---|
InputStreamSource | |
getLogcat
public InputStreamSource getLogcat (int maxBytes)
Grabs a snapshot stream of the last maxBytes of captured logcat data.
Useful for cases when you want to capture frequent snapshots of the captured logcat data without incurring the potentially big disk space penalty of getting the entire getLogcat() snapshot.
| প্যারামিটার | |
|---|---|
maxBytes | int : the maximum amount of data to return. Should be an amount that can comfortably fit in memory |
| ফেরত | |
|---|---|
InputStreamSource | |
getLogcatDump
public InputStreamSource getLogcatDump ()
Get a dump of the current logcat for device. Unlike getLogcat() , this method will always return a static dump of the logcat.
Has the disadvantage that nothing will be returned if device is not reachable.
| ফেরত | |
|---|---|
InputStreamSource | a InputStreamSource of the logcat data. An empty stream is returned if fail to capture logcat data. |
getLogcatSince
public InputStreamSource getLogcatSince (long date)
Grabs a snapshot stream of captured logcat data starting the date provided. The time on the device should be used getDeviceDate() .
| প্যারামিটার | |
|---|---|
date | long : in millisecond since epoch format of when to start the snapshot until present. (can be be obtained using 'date +%s') |
| ফেরত | |
|---|---|
InputStreamSource | |
getMacAddress
public String getMacAddress ()
Returns the MAC address of the device, null if it fails to query from the device.
| ফেরত | |
|---|---|
String | |
getMainUserId
public Integer getMainUserId ()
Returns the main user id.
| ফেরত | |
|---|---|
Integer | the userId of the main user if there is one, and null if there is no main user. |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
getMainlineModuleInfo
public Set<String> getMainlineModuleInfo ()
Get the information about the mainline modules installed on the device.
| ফেরত | |
|---|---|
Set<String> | Set of String mainline modules currently installed on the device. |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
getMaxNumberOfRunningUsersSupported
public int getMaxNumberOfRunningUsersSupported ()
Get the maximum number of supported simultaneously running users. Defaults to 0.
| ফেরত | |
|---|---|
int | an integer indicating the number of simultaneously running users |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
getMaxNumberOfUsersSupported
public int getMaxNumberOfUsersSupported (String userType)
Get the maximum number of supported users of the given user type. Defaults to 0.
| প্যারামিটার | |
|---|---|
userType | String : the type of user, as defined in UserManager, such as "android.os.usertype.full.SECONDARY". |
| ফেরত | |
|---|---|
int | an integer indicating the number of supported users of the given user type |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
getMaxNumberOfUsersSupported
public int getMaxNumberOfUsersSupported ()
Get the maximum number of supported switchable users, not including Guests. After api version 36, does not include non-switchable users (like profiles). Defaults to 0.
| ফেরত | |
|---|---|
int | an integer indicating the number of supported switchable users |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
getMicrodroidProcess
public Process getMicrodroidProcess ()
| ফেরত | |
|---|---|
Process | Returns the Process of the Microdroid VM. If TestDevice is not a Microdroid, returns null. |
getMonitor
public IDeviceStateMonitor getMonitor ()
Return the IDeviceStateMonitor associated with device.
| ফেরত | |
|---|---|
IDeviceStateMonitor | |
getMountPoint
public String getMountPoint (String mountName)
Returns a mount point.
Queries the device directly if the cached info inIDevice is not available. TODO: move this behavior to IDevice.getMountPoint(String)| প্যারামিটার | |
|---|---|
mountName | String : the name of the mount point |
| ফেরত | |
|---|---|
String | the mount point or null |
getMountPointInfo
public ITestDevice.MountPointInfo getMountPointInfo (String mountpoint)
Returns a MountPointInfo corresponding to the specified mountpoint path, or null if that path has nothing mounted or otherwise does not appear in /proc/mounts as a mountpoint.
| প্যারামিটার | |
|---|---|
mountpoint | String |
| ফেরত | |
|---|---|
ITestDevice.MountPointInfo | A List of MountPointInfo containing the information in "/proc/mounts" |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
getMountPointInfo
public List<ITestDevice.MountPointInfo> getMountPointInfo ()
Returns a parsed version of the information in /proc/mounts on the device
| ফেরত | |
|---|---|
List< ITestDevice.MountPointInfo > | A List of MountPointInfo containing the information in "/proc/mounts" |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
getOptions
public TestDeviceOptions getOptions ()
Fetch the test options for the device.
| ফেরত | |
|---|---|
TestDeviceOptions | TestDeviceOptions related to the device under test. |
getPartitionFreeSpace
public long getPartitionFreeSpace (String partition)
Helper method to determine amount of free space on device partition.
| প্যারামিটার | |
|---|---|
partition | String |
| ফেরত | |
|---|---|
long | the amount of free space in KB |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
getPrimaryUserId
public Integer getPrimaryUserId ()
Returns the primary user id.
| ফেরত | |
|---|---|
Integer | the userId of the primary user if there is one, and null if there is no primary user. |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
getProcessByName
public ProcessInfo getProcessByName (String processName)
Helper method runs the "pidof" and "stat" command and returns ProcessInfo object with PID and process start time of the given process.
| প্যারামিটার | |
|---|---|
processName | String : the proces name String. |
| ফেরত | |
|---|---|
ProcessInfo | ProcessInfo of given processName |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
getProcessPid
public String getProcessPid (String process)
Returns the pid of the service or null if something went wrong.
| প্যারামিটার | |
|---|---|
process | String : The proces name String. |
| ফেরত | |
|---|---|
String | |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
getProductType
public String getProductType ()
Convenience method to get the product type of this device.
This method will work if device is in either adb or fastboot mode.| ফেরত | |
|---|---|
String | the String product type name. Will not be null |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
getProductVariant
public String getProductVariant ()
Convenience method to get the product variant of this device.
This method will work if device is in either adb or fastboot mode.| ফেরত | |
|---|---|
String | the String product variant name or null if it cannot be determined |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
getProperty
public String getProperty (String name)
Retrieve the given property value from the device.
| প্যারামিটার | |
|---|---|
name | String : the property name |
| ফেরত | |
|---|---|
String | the property value or null if it does not exist |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
getRecoveryMode
public ITestDevice.RecoveryMode getRecoveryMode ()
Get the current recovery mode used for the device.
| ফেরত | |
|---|---|
ITestDevice.RecoveryMode | the current recovery mode used for the device. |
getRemainingCreatableUserCount
public int getRemainingCreatableUserCount (String userType)
Returns how many users of the given user type can be created on this device.
| প্যারামিটার | |
|---|---|
userType | String : the type of user, as defined in UserManager, such as "android.os.usertype.full.SECONDARY". |
| ফেরত | |
|---|---|
int | how many users of the given user type can be added |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
getScreenshot
public InputStreamSource getScreenshot (Long displayId, String format, boolean rescale)
Grabs a screenshot from the device given display id with supported format. Allow rescale to support smaller size
| প্যারামিটার | |
|---|---|
displayId | Long : the display id of the screen to get screenshot from. |
format | String : supported PNG, JPEG |
rescale | boolean : if screenshot should be rescaled to reduce the size of resulting image |
| ফেরত | |
|---|---|
InputStreamSource | a InputStreamSource of the screenshot in format, or null if the screenshot was not successful. |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
getScreenshot
public InputStreamSource getScreenshot (String format)
Grabs a screenshot from the device. Recommended to use getScreenshot(format) instead with JPEG encoding for smaller size
| প্যারামিটার | |
|---|---|
format | String : supported PNG, JPEG |
| ফেরত | |
|---|---|
InputStreamSource | a InputStreamSource of the screenshot in format, or null if the screenshot was not successful. |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
getScreenshot
public InputStreamSource getScreenshot (long displayId)
Grabs a screenshot from the device given display id. Format is PNG.
TODO: extend the implementations above to support 'format' and 'rescale'
| প্যারামিটার | |
|---|---|
displayId | long : the display id of the screen to get screenshot from. |
| ফেরত | |
|---|---|
InputStreamSource | a InputStreamSource of the screenshot in format, or null if the screenshot was not successful. |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
getScreenshot
public InputStreamSource getScreenshot (String format, boolean rescale)
Grabs a screenshot from the device. Recommended to use getScreenshot(String) instead with JPEG encoding for smaller size.
| প্যারামিটার | |
|---|---|
format | String : supported PNG, JPEG |
rescale | boolean : if screenshot should be rescaled to reduce the size of resulting image |
| ফেরত | |
|---|---|
InputStreamSource | a InputStreamSource of the screenshot in format, or null if the screenshot was not successful. |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
getScreenshot
public InputStreamSource getScreenshot ()
Grabs a screenshot from the device.
| ফেরত | |
|---|---|
InputStreamSource | a InputStreamSource of the screenshot in png format, or null if the screenshot was not successful. |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
getSerialNumber
public String getSerialNumber ()
Convenience method to get serial number of this device.
| ফেরত | |
|---|---|
String | the String serial number |
getSetting
public String getSetting (int userId,
String namespace,
String key)Return the value of the requested setting. namespace must be one of: {"system", "secure", "global"}
| প্যারামিটার | |
|---|---|
userId | int |
namespace | String |
key | String |
| ফেরত | |
|---|---|
String | the value associated with the namespace:key of a user. Null if not found. |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
getSetting
public String getSetting (String namespace,
String key) See getSetting(int,String,String) and performed on system user.
| প্যারামিটার | |
|---|---|
namespace | String |
key | String |
| ফেরত | |
|---|---|
String | |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
getSimOperator
public String getSimOperator ()
Return the SIM card operator or null if not available or if device is not available.
| Returns | |
|---|---|
String | |
getSimState
public String getSimState ()
Return the SIM card state or null if not available or device is not available.
| ফেরত | |
|---|---|
String | |
getTombstones
public List<File> getTombstones ()
Fetch and return the list of tombstones from the devices. Requires root.
method is best-effort so if one tombstone fails to be pulled for any reason it will be missing from the list. Only a DeviceNotAvailableException will terminate the method early.
| Returns | |
|---|---|
List<File> | A list of tombstone files, empty if no tombstone. |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
getTotalMemory
public long getTotalMemory ()
Returns total physical memory size in bytes or -1 in case of internal error
| Returns | |
|---|---|
long | |
getTrackingSerial
public String getTrackingSerial ()
For device management purpose get the serial used to track the device.
| Returns | |
|---|---|
String | |
getUninstallablePackageNames
public Set<String> getUninstallablePackageNames ()
Fetch the application package names that can be uninstalled. This is presently defined as non-system packages, and updated system packages.
| Returns | |
|---|---|
Set<String> | Set of uninstallable String package names currently installed on the device. |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
getUseFastbootErase
public boolean getUseFastbootErase ()
Get whether to use fastboot erase or fastboot format to wipe a partition on the device.
| Returns | |
|---|---|
boolean | true if fastboot erase will be used or false if fastboot format will be used. |
getUserFlags
public int getUserFlags (int userId)
Find and return the flags of a given user. Flags are defined in "android.content.pm.UserInfo" class in Android Open Source Project.
| প্যারামিটার | |
|---|---|
userId | int |
| Returns | |
|---|---|
int | the flags associated with the userId provided if found, -10000 in any other cases. |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
getUserInfos
public Map<Integer, UserInfo> getUserInfos ()
Gets the Map of useId to UserInfo on the device. Will throw DeviceRuntimeException if output from device is not as expected.
| Returns | |
|---|---|
Map<Integer, UserInfo > | the list of UserInfo objects. |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
getUserSerialNumber
public int getUserSerialNumber (int userId)
Return the serial number associated to the userId if found, -10000 in any other cases.
| প্যারামিটার | |
|---|---|
userId | int |
| Returns | |
|---|---|
int | |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
getUserVisibleOnDisplay
public int getUserVisibleOnDisplay (int displayId)
Gets the user id of the visible user on the given display.
| প্যারামিটার | |
|---|---|
displayId | int : the id of the display. |
| Returns | |
|---|---|
int | the user id of the visible user on the given display. It does not differentiate a visible background user from the current foreground user as both types are visible. To differentiate, further compare with the result of getCurrentUser(). |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
handleAllocationEvent
public IManagedTestDevice.DeviceEventResponse handleAllocationEvent (DeviceEvent event)
Process the given DeviceEvent. May transition device to new state. Will inform the IDeviceMonitor of any state transitions.
Process the DeviceEvent, which may or may not transition this device to a new allocation state.
| প্যারামিটার | |
|---|---|
event | DeviceEvent |
| Returns | |
|---|---|
IManagedTestDevice.DeviceEventResponse | |
hasFeature
public boolean hasFeature (String feature)
Check if a feature is available on a device.
| প্যারামিটার | |
|---|---|
feature | String : which format should be "feature: |
| Returns | |
|---|---|
boolean | True if feature is found, false otherwise. |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
initializeConnection
public void initializeConnection (IBuildInfo info, MultiMap<String, String> attributes)
Initialize the connection to the device. This is called by preInvocationSetup but in rare cases might need to be called separately when creating the connection during device setup.
| প্যারামিটার | |
|---|---|
info | IBuildInfo |
attributes | MultiMap |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
TargetSetupError | |
installPackage
public String installPackage (File packageFile,
boolean reinstall,
boolean grantPermissions,
String... extraArgs)Install an Android package on device.
Note: Only use cases that requires explicit control of granting runtime permission at install time should call this function.
| প্যারামিটার | |
|---|---|
packageFile | File : the apk file to install |
reinstall | boolean : true if a reinstall should be performed |
grantPermissions | boolean : if all runtime permissions should be granted at install time |
extraArgs | String : optional extra arguments to pass. See 'adb shell pm -h' for available options. |
| ফেরত | |
|---|---|
String | a String with an error code, or null if success. |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
installPackage
public String installPackage (File packageFile,
boolean reinstall,
String... extraArgs)Install an Android package on device.
| প্যারামিটার | |
|---|---|
packageFile | File : the apk file to install |
reinstall | boolean : true if a reinstall should be performed |
extraArgs | String : optional extra arguments to pass. See 'adb shell pm -h' for available options. |
| Returns | |
|---|---|
String | a String with an error code, or null if success. |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
installPackageForUser
public String installPackageForUser (File packageFile,
boolean reinstall,
boolean grantPermissions,
int userId,
String... extraArgs)Install an Android package on device for a given user.
Note: Only use cases that requires explicit control of granting runtime permission at install time should call this function.
| প্যারামিটার | |
|---|---|
packageFile | File : the apk file to install |
reinstall | boolean : true if a reinstall should be performed |
grantPermissions | boolean : if all runtime permissions should be granted at install time |
userId | int : the integer user id to install for. |
extraArgs | String : optional extra arguments to pass. See 'adb shell pm -h' for available options. |
| Returns | |
|---|---|
String | a String with an error code, or null if success. |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
installPackageForUser
public String installPackageForUser (File packageFile,
boolean reinstall,
int userId,
String... extraArgs)Install an Android package on device for a given user.
| প্যারামিটার | |
|---|---|
packageFile | File : the apk file to install |
reinstall | boolean : true if a reinstall should be performed |
userId | int : the integer user id to install for. |
extraArgs | String : optional extra arguments to pass. See 'adb shell pm -h' for available options. |
| Returns | |
|---|---|
String | a String with an error code, or null if success. |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
installPackageWithIncrementalMode
public boolean installPackageWithIncrementalMode (File[] apkFiles,
String[] extraArgs,
String userId)Installs apks with incremental mode.
| প্যারামিটার | |
|---|---|
apkFiles | File : the apk files to install. |
extraArgs | String |
userId | String |
| Returns | |
|---|---|
boolean | |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
invalidatePropertyCache
public void invalidatePropertyCache ()
isAdbTcp
public boolean isAdbTcp ()
| Returns | |
|---|---|
boolean | |
isAppEnumerationSupported
public boolean isAppEnumerationSupported ()
Check whether platform on device supports app enumeration
| Returns | |
|---|---|
boolean | True if app enumeration is supported, false otherwise |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
isBypassLowTargetSdkBlockSupported
public boolean isBypassLowTargetSdkBlockSupported ()
Check whether platform on device supports bypassing low target sdk block on app installs
| Returns | |
|---|---|
boolean | True if bypass low target sdk block is supported, false otherwise |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
isDebugfsMounted
public boolean isDebugfsMounted ()
Check if debugfs is mounted.
| Returns | |
|---|---|
boolean | true if debugfs is mounted |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
isDeviceEncrypted
public boolean isDeviceEncrypted ()
Returns if the device is encrypted.
| Returns | |
|---|---|
boolean | true if the device is encrypted. |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
isDirectory
public boolean isDirectory (String path)
Return True if the path on the device is a directory, false otherwise.
| প্যারামিটার | |
|---|---|
path | String |
| Returns | |
|---|---|
boolean | |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
isEnableAdbRoot
public boolean isEnableAdbRoot ()
| Returns | |
|---|---|
boolean | true if adb root should be enabled on device |
isEncryptionSupported
public boolean isEncryptionSupported ()
Returns if encryption is supported on the device.
| Returns | |
|---|---|
boolean | true if the device supports encryption. |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
isExecutable
public boolean isExecutable (String fullPath)
Returns True if the file path on the device is an executable file, false otherwise.
| প্যারামিটার | |
|---|---|
fullPath | String |
| Returns | |
|---|---|
boolean | |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
isFastbootEnabled
public boolean isFastbootEnabled ()
Return if fastboot is available for the device.
| Returns | |
|---|---|
boolean | |
isHeadless
public boolean isHeadless ()
Return true if the device is headless (no screen), false otherwise.
| Returns | |
|---|---|
boolean | |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
isHeadlessSystemUserMode
public boolean isHeadlessSystemUserMode ()
Returns whether the device uses headless system user mode.
| Returns | |
|---|---|
boolean | |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
isMainUserPermanentAdmin
public boolean isMainUserPermanentAdmin ()
Returns whether the main user is a permanent admin and can't be deleted or downgraded to non-admin status.
| Returns | |
|---|---|
boolean | |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
isMultiUserSupported
public boolean isMultiUserSupported ()
Returns whether this device supports multiple switchable users with their own login and customizable space.
Note that, even if false, multiple users might still be possible, as long as no login UI is required; eg, profiles might still be supported, as they do not require a login UI.
This also checks config_enableMultiUserUI. By demand, we are allowed to assume that devices for which this is true are configured to allow adding secondary users via adb.
| Returns | |
|---|---|
boolean | whether the device supports multiple switchable users. |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
isPackageInstalled
public boolean isPackageInstalled (String packageName,
String userId)Query the device for a given package name and given user id to check if it's currently installed or not for that user.
| প্যারামিটার | |
|---|---|
packageName | String : the package we are checking if it's installed. |
userId | String : The user id we are checking the package is installed for. If null, primary user zero will be used. |
| ফেরত | |
|---|---|
boolean | True if the package is reported as installed. False otherwise. |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
isPackageInstalled
public boolean isPackageInstalled (String packageName)
Query the device for a given package name to check if it's currently installed or not.
| প্যারামিটার | |
|---|---|
packageName | String |
| Returns | |
|---|---|
boolean | True if the package is reported as installed. False otherwise. |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
isRuntimePermissionSupported
public boolean isRuntimePermissionSupported ()
Check whether platform on device supports runtime permission granting
| Returns | |
|---|---|
boolean | True if runtime permission are supported, false otherwise. |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
isShellV2Support
public boolean isShellV2Support ()
| Returns | |
|---|---|
boolean | |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
isStateBootloaderOrFastbootd
public boolean isStateBootloaderOrFastbootd ()
Returns true if device is in TestDeviceState.FASTBOOT or TestDeviceState.FASTBOOTD .
| Returns | |
|---|---|
boolean | |
isUserRunning
public boolean isUserRunning (int userId)
Check if a given user is running.
| প্যারামিটার | |
|---|---|
userId | int |
| Returns | |
|---|---|
boolean | True if the user is running, false in every other cases. |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
isUserSecondary
public boolean isUserSecondary (int userId)
Return whether the specified user is a secondary user according to it's flags.
| প্যারামিটার | |
|---|---|
userId | int |
| Returns | |
|---|---|
boolean | true if the user is secondary, false otherwise. |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
isUserVisible
public boolean isUserVisible (int userId)
Checks if the given user is visible.
A "visible" user is a user that is interacting with the "human" user and hence is able to launch launch activities (typically in the default display).
| প্যারামিটার | |
|---|---|
userId | int |
| Returns | |
|---|---|
boolean | |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
isUserVisibleOnDisplay
public boolean isUserVisibleOnDisplay (int userId,
int displayId)Checks if the given user is visible in the given display.
A "visible" user is a user that is interacting with the "human" user and hence is able to launch launch activities in that display.
| প্যারামিটার | |
|---|---|
userId | int |
displayId | int |
| Returns | |
|---|---|
boolean | |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
isVisibleBackgroundUsersOnDefaultDisplaySupported
public boolean isVisibleBackgroundUsersOnDefaultDisplaySupported ()
Returns whether the device allow users to be started visible in the background in the ERROR(/java.android.view.Display#DEFAULT_DISPLAY) .
If it does, you could call startVisibleBackgroundUser(int, int, boolean) , passing a display returned by listDisplayIdsForStartingVisibleBackgroundUsers() (which should include ERROR(/java.android.view.Display#DEFAULT_DISPLAY) ).
| Returns | |
|---|---|
boolean | |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
isVisibleBackgroundUsersSupported
public boolean isVisibleBackgroundUsersSupported ()
Returns whether the device allow users to be started visible in the background.
If it does, you could call startVisibleBackgroundUser(int, int, boolean) , passing a display returned by listDisplayIdsForStartingVisibleBackgroundUsers() .
| Returns | |
|---|---|
boolean | |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
isWifiEnabled
public boolean isWifiEnabled ()
Test if wifi is enabled.
Checks if wifi is enabled on device. Useful for asserting wifi status before tests that shouldn't run with wifi, eg mobile data tests.| ফেরত | |
|---|---|
boolean | true if wifi is enabled. false if disabled |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
listDisplayIds
public Set<Long> listDisplayIds ()
Collect the list of available displays id on the device as reported by "dumpsys SurfaceFlinger".
| Returns | |
|---|---|
Set<Long> | The list of displays. Default always returns the default display 0. |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
listDisplayIdsForStartingVisibleBackgroundUsers
public Set<Integer> listDisplayIdsForStartingVisibleBackgroundUsers ()
Gets the list of displays that can be used to start a user visible in the background .
| Returns | |
|---|---|
Set<Integer> | |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
listUsers
public ArrayList<Integer> listUsers ()
Gets the list of users on the device. Will throw DeviceRuntimeException if output from device is not as expected.
| Returns | |
|---|---|
ArrayList<Integer> | the list of user ids. |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
logAnrs
public boolean logAnrs (ITestLogger logger)
Collects and log ANRs from the device.
| প্যারামিটার | |
|---|---|
logger | ITestLogger : an ITestLogger to log the ANRs. |
| Returns | |
|---|---|
boolean | True if the logging was successful, false otherwise. |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
logBugreport
public boolean logBugreport (String dataName,
ITestLogger listener)Helper method to take a bugreport and log it to the reporters.
| প্যারামিটার | |
|---|---|
dataName | String : name under which the bugreport will be reported. |
listener | ITestLogger : an ITestLogger to log the bugreport. |
| Returns | |
|---|---|
boolean | True if the logging was successful, false otherwise. |
logOnDevice
public void logOnDevice (String tag,
Log.LogLevel level,
String format,
Object... args)Log a message in the logcat of the device. This is a safe call that will not throw even if the logging fails.
| প্যারামিটার | |
|---|---|
tag | String : The tag under which we log our message in the logcat. |
level | Log.LogLevel : The debug level of the message in the logcat. |
format | String : The message format. |
args | Object : the args to be replaced via String.format(). |
nonBlockingReboot
public void nonBlockingReboot ()
Issues a command to reboot device and returns on command complete and when device is no longer visible to adb.
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
postAdbRootAction
public void postAdbRootAction ()
Override if the device needs some specific actions to be taken after adb root and before the device is back online. Default implementation doesn't include any addition actions. adb root is not guaranteed to be enabled at this stage.
| নিক্ষেপ | |
|---|---|
| com.android.tradefed.device.DeviceNotAvailableException |
DeviceNotAvailableException | |
postAdbUnrootAction
public void postAdbUnrootAction ()
Override if the device needs some specific actions to be taken after adb unroot and before the device is back online. Default implementation doesn't include any additional actions. adb root is not guaranteed to be disabled at this stage.
| নিক্ষেপ | |
|---|---|
| com.android.tradefed.device.DeviceNotAvailableException |
DeviceNotAvailableException | |
postBootSetup
public 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)| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
postInvocationTearDown
public void postInvocationTearDown (Throwable exception)
Extra steps for device specific required clean up that will be executed after the invocation is done.
| প্যারামিটার | |
|---|---|
exception | Throwable : if any, the final exception raised by the invocation failure. |
preInvocationSetup
public void preInvocationSetup (IBuildInfo info, MultiMap<String, String> attributes)
Extra steps for device specific required setup that will be executed on the device prior to the invocation flow.
| প্যারামিটার | |
|---|---|
info | IBuildInfo : The IBuildInfo of the device. |
attributes | MultiMap : The attributes stored in the invocation context |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
TargetSetupError | |
pullDir
public boolean pullDir (String deviceFilePath,
File localDir,
int userId)Recursively pull directory contents from device.
| প্যারামিটার | |
|---|---|
deviceFilePath | String : the absolute file path of the remote source |
localDir | File : the local directory to pull files into |
userId | int : the user id to pull from |
| Returns | |
|---|---|
boolean | true if file was pulled successfully. false otherwise. |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
pullDir
public boolean pullDir (String deviceFilePath,
File localDir)Recursively pull directory contents from device.
| প্যারামিটার | |
|---|---|
deviceFilePath | String : the absolute file path of the remote source |
localDir | File : the local directory to pull files into |
| Returns | |
|---|---|
boolean | true if file was pulled successfully. false otherwise. |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
pullDir
public boolean pullDir (String deviceFilePath,
File localDir,
int userId,
long timeout)Recursively pull directory contents from device.
| প্যারামিটার | |
|---|---|
deviceFilePath | String : the absolute file path of the remote source |
localDir | File : the local directory to pull files into |
userId | int : the user id to pull from |
timeout | long : the timeout for pulling command |
| Returns | |
|---|---|
boolean | true if file was pulled successfully. false otherwise. |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
pullFile
public boolean pullFile (String remoteFilePath,
File localFile,
int userId,
long timeout)Retrieves a file off device.
| প্যারামিটার | |
|---|---|
remoteFilePath | String : the absolute path to file on device. |
localFile | File : the local file to store contents in. If non-empty, contents will be replaced. |
userId | int : The user id to pull from |
timeout | long : pull file command timeout |
| Returns | |
|---|---|
boolean | true if file was retrieved successfully. false otherwise. |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
pullFile
public boolean pullFile (String remoteFilePath,
File localFile)Retrieves a file off device.
| প্যারামিটার | |
|---|---|
remoteFilePath | String : the absolute path to file on device. |
localFile | File : the local file to store contents in. If non-empty, contents will be replaced. |
| Returns | |
|---|---|
boolean | true if file was retrieved successfully. false otherwise. |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
pullFile
public File pullFile (String remoteFilePath,
int userId) Retrieves a file off device, stores it in a local temporary File , and returns that File .
| প্যারামিটার | |
|---|---|
remoteFilePath | String : the absolute path to file on device. |
userId | int : The user id to pull from |
| Returns | |
|---|---|
File | A File containing the contents of the device file, or null if the copy failed for any reason (including problems with the host filesystem) |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
pullFile
public File pullFile (String remoteFilePath)
Retrieves a file off device, stores it in a local temporary File , and returns that File .
| প্যারামিটার | |
|---|---|
remoteFilePath | String : the absolute path to file on device. |
| ফেরত | |
|---|---|
File | A File containing the contents of the device file, or null if the copy failed for any reason (including problems with the host filesystem) |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
pullFile
public boolean pullFile (String remoteFilePath,
File localFile,
int userId)Retrieves a file off device.
| প্যারামিটার | |
|---|---|
remoteFilePath | String : the absolute path to file on device. |
localFile | File : the local file to store contents in. If non-empty, contents will be replaced. |
userId | int : The user id to pull from |
| Returns | |
|---|---|
boolean | true if file was retrieved successfully. false otherwise. |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
pullFileContents
public String pullFileContents (String remoteFilePath)
Retrieves a file off device, and returns the contents.
| প্যারামিটার | |
|---|---|
remoteFilePath | String : the absolute path to file on device. |
| Returns | |
|---|---|
String | A String containing the contents of the device file, or null if the copy failed for any reason (including problems with the host filesystem) |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
pullFileFromExternal
public File pullFileFromExternal (String remoteFilePath)
A convenience method to retrieve a file from the device's external storage, stores it in a local temporary File , and return a reference to that File .
| প্যারামিটার | |
|---|---|
remoteFilePath | String : the path to file on device, relative to the device's external storage mountpoint |
| Returns | |
|---|---|
File | A File containing the contents of the device file, or null if the copy failed for any reason (including problems with the host filesystem) |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
pushDir
public boolean pushDir (File localFileDir,
String deviceFilePath,
int userId)Recursively push directory contents to device.
| প্যারামিটার | |
|---|---|
localFileDir | File : the local directory to push |
deviceFilePath | String : the absolute file path of the remote destination |
userId | int : the user id to push to |
| Returns | |
|---|---|
boolean | true if file was pushed successfully. false otherwise. |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
pushDir
public boolean pushDir (File localFileDir,
String deviceFilePath,
Set<String> excludedDirectories)Recursively push directory contents to device while excluding some directories that are filtered.
| প্যারামিটার | |
|---|---|
localFileDir | File : the local directory to push |
deviceFilePath | String : the absolute file path of the remote destination |
excludedDirectories | Set : Set of excluded directories names that shouldn't be pushed. |
| Returns | |
|---|---|
boolean | true if file was pushed successfully. false otherwise. |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
pushDir
public boolean pushDir (File localFileDir,
String deviceFilePath)Recursively push directory contents to device.
| প্যারামিটার | |
|---|---|
localFileDir | File : the local directory to push |
deviceFilePath | String : the absolute file path of the remote destination |
| Returns | |
|---|---|
boolean | true if file was pushed successfully. false otherwise. |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
pushFile
public boolean pushFile (File localFile,
String remoteFilePath,
boolean evaluateContentProviderNeeded) Variant of pushFile(File,String) which can optionally consider evaluating the need for the content provider.
| প্যারামিটার | |
|---|---|
localFile | File : the local file to push |
remoteFilePath | String : the remote destination absolute file path |
evaluateContentProviderNeeded | boolean : whether to check if we need the content provider |
| Returns | |
|---|---|
boolean | true if file was pushed successfully. false otherwise. |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
pushFile
public boolean pushFile (File localFile,
String remoteFilePath)Push a file to device. By default using a content provider.
| প্যারামিটার | |
|---|---|
localFile | File : the local file to push |
remoteFilePath | String : the remote destination absolute file path |
| ফেরত | |
|---|---|
boolean | true if file was pushed successfully. false otherwise. |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
pushFile
public boolean pushFile (File localFile,
String remoteFilePath,
int userId)Push a file to device. By default using a content provider.
| প্যারামিটার | |
|---|---|
localFile | File : the local file to push |
remoteFilePath | String : the remote destination absolute file path |
userId | int : the userId to push to |
| Returns | |
|---|---|
boolean | true if file was pushed successfully. false otherwise. |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
pushString
public boolean pushString (String contents,
String remoteFilePath)Push file created from a string to device
| প্যারামিটার | |
|---|---|
contents | String : the contents of the file to push |
remoteFilePath | String : the remote destination absolute file path |
| Returns | |
|---|---|
boolean | true if string was pushed successfully. false otherwise. |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
reboot
public 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 property.
| প্যারামিটার | |
|---|---|
reason | String : a reason for this reboot, or null if no reason is specified. |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
reboot
public String reboot (String command,
String reason) Reboots the device using the given command .
Blocks until device becomes available.
Last reboot reason can be obtained by querying sys.boot.reason property.
| প্যারামিটার | |
|---|---|
command | String : command passed to `adb`. Notice that it's passed "as-is", so it's up to the caller to provide the proper quotation if needed (especially if it contains multiple parts separated by space). |
reason | String : a reason for this reboot, or null if no reason is specified. |
| Returns | |
|---|---|
String | |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
reboot
public void reboot ()
Reboots the device into adb mode.
Blocks until device becomes available.| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
rebootIntoBootloader
public void rebootIntoBootloader ()
Reboots the device into bootloader mode.
Blocks until device is in bootloader mode.| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
UnsupportedOperationException | |
rebootIntoFastbootd
public void rebootIntoFastbootd ()
Reboots the device into fastbootd mode.
Blocks until device is in fastbootd mode.
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
UnsupportedOperationException | |
rebootIntoRecovery
public void rebootIntoRecovery ()
Reboots the device into adb recovery mode.
Blocks until device enters recovery| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
rebootIntoSideload
public void rebootIntoSideload ()
Reboots the device into adb sideload mode (note that this is a special mode under recovery)
Blocks until device enters sideload mode
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
rebootIntoSideload
public void rebootIntoSideload (boolean autoReboot)
Reboots the device into adb sideload mode (note that this is a special mode under recovery)
Blocks until device enters sideload mode
| প্যারামিটার | |
|---|---|
autoReboot | boolean : whether to automatically reboot the device after sideload |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
rebootUntilOnline
public void rebootUntilOnline ()
An alternate to reboot() that only blocks until device is online ie visible to adb.
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
rebootUntilOnline
public void rebootUntilOnline (String reason)
An alternate to reboot() that only blocks until device is online ie visible to adb.
| প্যারামিটার | |
|---|---|
reason | String : a reason for this reboot, or null if no reason is specified. |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
rebootUserspace
public 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.
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
rebootUserspaceUntilOnline
public void rebootUserspaceUntilOnline ()
An alternate to rebootUserspace() ()} that only blocks until device is online ie visible to adb.
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
recoverDevice
public boolean recoverDevice ()
Attempts to recover device communication.
| Returns | |
|---|---|
boolean | True if recovery attempted and successful, returns False if recovery was skipped |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | if device is no longer available |
registerDeviceActionReceiver
public void registerDeviceActionReceiver (IDeviceActionReceiver deviceActionReceiver)
Registers a IDeviceActionReceiver for this device.
All registered IDeviceActionReceiver s will be notified before a device action starts and after the device action ends.
| প্যারামিটার | |
|---|---|
deviceActionReceiver | IDeviceActionReceiver : A IDeviceActionReceiver which will be registered. |
remountSystemReadOnly
public void remountSystemReadOnly ()
Make the system partition on the device read-only. May reboot the device.
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
remountSystemWritable
public void remountSystemWritable ()
Make the system partition on the device writable. May reboot the device.
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
remountVendorReadOnly
public void remountVendorReadOnly ()
Make the vendor partition on the device read-only. May reboot the device.
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
remountVendorWritable
public void remountVendorWritable ()
Make the vendor partition on the device writable. May reboot the device.
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
removeAdmin
public boolean removeAdmin (String componentName,
int userId) Remove given device admin in given user and return true if it is successful, false otherwise.
| প্যারামিটার | |
|---|---|
componentName | String : of device admin to be removed. |
userId | int : of user that the device admin lives in. |
| Returns | |
|---|---|
boolean | True if it is successful, false otherwise. |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
removeOwners
public void removeOwners ()
Remove all existing device profile owners with the best effort.
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
removeUser
public boolean removeUser (int userId)
Remove a given user from the device.
| প্যারামিটার | |
|---|---|
userId | int : of the user to remove |
| Returns | |
|---|---|
boolean | true if we were successful in removing the user, false otherwise. |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
resetContentProviderSetup
public void resetContentProviderSetup ()
Reset the flag for content provider setup in order to trigger it again.
runInstrumentationTests
public boolean runInstrumentationTests (IRemoteAndroidTestRunner runner, Collection<ITestLifeCycleReceiver> listeners)
Runs instrumentation tests, and provides device recovery.
If connection with device is lost before test run completes, and recovery succeeds, all listeners will be informed of testRunFailed and "false" will be returned. The test command will not be rerun. It is left to callers to retry if necessary.
If connection with device is lost before test run completes, and recovery fails, all listeners will be informed of testRunFailed and DeviceNotAvailableException will be thrown.
| প্যারামিটার | |
|---|---|
runner | IRemoteAndroidTestRunner : the IRemoteAndroidTestRunner which runs the tests |
listeners | Collection : the test result listeners |
| Returns | |
|---|---|
boolean | true if test command completed. false if it failed to complete due to device communication exception, but recovery succeeded |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
runInstrumentationTests
public boolean runInstrumentationTests (IRemoteAndroidTestRunner runner, ITestLifeCycleReceiver... listeners)
Convenience method for performing runInstrumentationTests(IRemoteAndroidTestRunner,Collection) with one or more listeners passed as parameters.
| প্যারামিটার | |
|---|---|
runner | IRemoteAndroidTestRunner : the IRemoteAndroidTestRunner which runs the tests |
listeners | ITestLifeCycleReceiver : the test result listener(s) |
| Returns | |
|---|---|
boolean | true if test command completed. false if it failed to complete, but recovery succeeded |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
runInstrumentationTestsAsUser
public boolean runInstrumentationTestsAsUser (IRemoteAndroidTestRunner runner, int userId, Collection<ITestLifeCycleReceiver> listeners)
Same as ITestDevice.runInstrumentationTests(IRemoteAndroidTestRunner,Collection) but runs the test for the given user.
| প্যারামিটার | |
|---|---|
runner | IRemoteAndroidTestRunner |
userId | int |
listeners | Collection |
| Returns | |
|---|---|
boolean | |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
runInstrumentationTestsAsUser
public boolean runInstrumentationTestsAsUser (IRemoteAndroidTestRunner runner, int userId, ITestLifeCycleReceiver... listeners)
Same as ITestDevice.runInstrumentationTests(IRemoteAndroidTestRunner,ITestLifeCycleReceiver...) but runs the test for a given user.
| প্যারামিটার | |
|---|---|
runner | IRemoteAndroidTestRunner |
userId | int |
listeners | ITestLifeCycleReceiver |
| ফেরত | |
|---|---|
boolean | |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
setAdbPath
public void setAdbPath (String adbPath)
Sets the path to the adb binary that should be used.
| প্যারামিটার | |
|---|---|
adbPath | String |
কনফিগারেশন সেট করুন
public void setConfiguration (IConfiguration configuration)
ব্যবহৃত IConfiguration টি ইনজেক্ট করে।
| প্যারামিটার | |
|---|---|
configuration | IConfiguration |
setConnectionAvdInfo
public final void setConnectionAvdInfo (GceAvdInfo avdInfo)
| প্যারামিটার | |
|---|---|
avdInfo | GceAvdInfo |
setDate
public void setDate (Date date)
Sets the date on device
Note: setting date on device requires root
| প্যারামিটার | |
|---|---|
date | Date : specify a particular date; will use host date if null |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
setDeviceOwner
public boolean setDeviceOwner (String componentName,
int userId)Set a device admin component as device owner in given user.
| প্যারামিটার | |
|---|---|
componentName | String : of device admin to be device owner. |
userId | int : of the user that the device owner lives in. |
| Returns | |
|---|---|
boolean | True if it is successful, false otherwise. |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
setDeviceState
public void setDeviceState (TestDeviceState deviceState)
Update the device's state.
| প্যারামিটার | |
|---|---|
deviceState | TestDeviceState : the TestDeviceState |
setEmulatorOutputStream
public void setEmulatorOutputStream (SizeLimitedOutputStream output)
For emulator set SizeLimitedOutputStream to log output
| প্যারামিটার | |
|---|---|
output | SizeLimitedOutputStream : to log the output |
setEmulatorProcess
public void setEmulatorProcess (Process p)
Sets the Process , when this device is an emulator.
| প্যারামিটার | |
|---|---|
p | Process |
setFastbootEnabled
public void setFastbootEnabled (boolean fastbootEnabled)
Set the fastboot option for the device. Should be set when device is first allocated.
| প্যারামিটার | |
|---|---|
fastbootEnabled | boolean : whether fastboot is available for the device or not |
setFastbootPath
public void setFastbootPath (String fastbootPath)
Sets the path to the fastboot binary that should be used. Still requires isFastbootEnabled() to be true, to have fastboot functions enabled.
| প্যারামিটার | |
|---|---|
fastbootPath | String |
setIDevice
public void setIDevice (IDevice newDevice)
Update the IDevice associated with this ITestDevice.
The new IDevice must refer the same physical device as the current reference. This method will be called if DDMS has allocated a new IDevice| প্যারামিটার | |
|---|---|
newDevice | IDevice : the IDevice |
setLogStartDelay
public void setLogStartDelay (int delay)
Sets the time in ms to wait before starting logcat capture for a online device.
| প্যারামিটার | |
|---|---|
delay | int : the delay in ms |
setOptions
public void setOptions (TestDeviceOptions options)
Set the TestDeviceOptions for the device
| প্যারামিটার | |
|---|---|
options | TestDeviceOptions |
setProperty
public boolean setProperty (String propKey,
String propValue)Sets the given property value on the device. Requires adb root is true.
| প্যারামিটার | |
|---|---|
propKey | String : The key targeted to be set. |
propValue | String : The property value to be set. |
| Returns | |
|---|---|
boolean | returns True if the setprop command was successful, False otherwise. |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
setRecovery
public void setRecovery (IDeviceRecovery recovery)
Set the IDeviceRecovery to use for this device. Should be set when device is first allocated.
| প্যারামিটার | |
|---|---|
recovery | IDeviceRecovery : the IDeviceRecovery |
setRecoveryMode
public void setRecoveryMode (ITestDevice.RecoveryMode mode)
Set the current recovery mode to use for the device.
Used to control what recovery method to use when a device communication problem is encountered. Its recommended to only use this method sparingly when needed (for example, when framework is down, etc| প্যারামিটার | |
|---|---|
mode | ITestDevice.RecoveryMode : whether 'recover till online only' mode should be on or not. |
setSetting
public void setSetting (String namespace,
String key,
String value) See setSetting(int,String,String,String) and performed on system user.
| প্যারামিটার | |
|---|---|
namespace | String |
key | String |
value | String |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
setSetting
public void setSetting (int userId,
String namespace,
String key,
String value)Add a setting value to the namespace of a given user. Some settings will only be available after a reboot. namespace must be one of: {"system", "secure", "global"}
| প্যারামিটার | |
|---|---|
userId | int |
namespace | String |
key | String |
value | String |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
setTestLogger
public void setTestLogger (ITestLogger testLogger)
Injects the ITestLogger instance
| প্যারামিটার | |
|---|---|
testLogger | ITestLogger |
setTrackingSerial
public void setTrackingSerial (String trackingSerial)
For device management purpose track the serial we use for referencing the device.
| প্যারামিটার | |
|---|---|
trackingSerial | String |
setUseFastbootErase
public void setUseFastbootErase (boolean useFastbootErase)
Set whether to use fastboot erase or fastboot format to wipe a partition on the device.
| প্যারামিটার | |
|---|---|
useFastbootErase | boolean : true if fastboot erase should be used or false if fastboot format should be used. |
startLogcat
public 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. startTradeInModeTesting
public boolean startTradeInModeTesting (int timeoutMs)
Enable testing trade-in mode. The device will be wiped and will reboot.
| প্যারামিটার | |
|---|---|
timeoutMs | int |
| Returns | |
|---|---|
boolean | True if we were successful, false otherwise |
| নিক্ষেপ | |
|---|---|
| com.android.tradefed.device.DeviceNotAvailableException |
DeviceNotAvailableException | |
startUser
public boolean startUser (int userId)
Starts a given user in the background if it is currently stopped. If the user is already running in the background, this method is a NOOP.
| প্যারামিটার | |
|---|---|
userId | int : of the user to start in the background |
| Returns | |
|---|---|
boolean | true if the user was successfully started in the background. |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
startUser
public boolean startUser (int userId,
boolean waitFlag)Starts a given user in the background if it is currently stopped. If the user is already running in the background, this method is a NOOP. Possible to provide extra flag to wait for the operation to have effect.
| প্যারামিটার | |
|---|---|
userId | int : of the user to start in the background |
waitFlag | boolean : will make the command wait until user is started and unlocked. |
| Returns | |
|---|---|
boolean | true if the user was successfully started in the background. |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
startVisibleBackgroundUser
public boolean startVisibleBackgroundUser (int userId,
int displayId,
boolean waitFlag)Starts a given user in the background, visible in the given display (ie, allowing the user to launch activities in that display).
NOTE: this command doesn't check if the user exists, display is available, device supports such feature , etc.
| প্যারামিটার | |
|---|---|
userId | int : of the user to start in the background |
displayId | int : display to start user visible on |
waitFlag | boolean : will make the command wait until user is started and unlocked. |
| Returns | |
|---|---|
boolean | true if the user was successfully started visible in the background. |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
stopEmulatorOutput
public void stopEmulatorOutput ()
Close and delete the emulator output.
stopLogcat
public 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.stopTradeInModeTesting
public void stopTradeInModeTesting ()
Stop trade-in mode testing.
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
stopUser
public boolean stopUser (int userId)
Stops a given user. If the user is already stopped, this method is a NOOP. Cannot stop current and system user.
| প্যারামিটার | |
|---|---|
userId | int : of the user to stop. |
| Returns | |
|---|---|
boolean | true if the user was successfully stopped. |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
stopUser
public boolean stopUser (int userId,
boolean waitFlag,
boolean forceFlag)Stop a given user. Possible to provide extra flags to wait for the operation to have effect, and force terminate the user. Cannot stop current and system user.
| প্যারামিটার | |
|---|---|
userId | int : of the user to stop. |
waitFlag | boolean : will make the command wait until user is stopped. |
forceFlag | boolean : will force stop the user. |
| Returns | |
|---|---|
boolean | true if the user was successfully stopped. |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
switchToAdbTcp
public String switchToAdbTcp ()
Switch device to adb-over-tcp mode.
| Returns | |
|---|---|
String | the tcp serial number or null if device could not be switched |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
switchToAdbUsb
public boolean switchToAdbUsb ()
Switch device to adb over usb mode.
| Returns | |
|---|---|
boolean | true if switch was successful, false otherwise. |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
switchUser
public boolean switchUser (int userId)
Switch to another userId with a default timeout. switchUser(int, long) .
| প্যারামিটার | |
|---|---|
userId | int |
| Returns | |
|---|---|
boolean | True if the new userId matches the userId provider. False otherwise. |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
switchUser
public boolean switchUser (int userId,
long timeout)Switch to another userId with the provided timeout as deadline. Attempt to disable keyguard after user change is successful.
| প্যারামিটার | |
|---|---|
userId | int |
timeout | long : to wait before returning false for switch-user failed. |
| Returns | |
|---|---|
boolean | True if the new userId matches the userId provider. False otherwise. |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
syncFiles
public boolean syncFiles (File localFileDir,
String deviceFilePath)Incrementally syncs the contents of a local file directory to device.
Decides which files to push by comparing timestamps of local files with their remote equivalents. Only 'newer' or non-existent files will be pushed to device. Thus overhead should be relatively small if file set on device is already up to date. Hidden files (with names starting with ".") will be ignored. Example usage: syncFiles("/tmp/files", "/sdcard") will created a /sdcard/files directory if it doesn't already exist, and recursively push the /tmp/files contents to /sdcard/files.| প্যারামিটার | |
|---|---|
localFileDir | File : the local file directory containing files to recursively push. |
deviceFilePath | String : the remote destination absolute file path root. All directories in thos file path must be readable. ie pushing to /data/local/tmp when adb is not root will fail |
| Returns | |
|---|---|
boolean | true if files were synced successfully. false otherwise. |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
takeBugreport
public Bugreport takeBugreport ()
Take a bugreport and returns it inside a Bugreport object to handle it. Return null in case of issue. File referenced in the Bugreport object need to be cleaned via Bugreport.close() .
| Returns | |
|---|---|
Bugreport | |
uninstallPackage
public String uninstallPackage (String packageName)
Uninstall an Android package from device.
| প্যারামিটার | |
|---|---|
packageName | String : the Android package to uninstall |
| Returns | |
|---|---|
String | a String with an error code, or null if success. |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
uninstallPackageForUser
public String uninstallPackageForUser (String packageName,
int userId)Uninstall an Android package from device for a given user.
| প্যারামিটার | |
|---|---|
packageName | String : the Android package to uninstall |
userId | int : the integer user id to uninstall for. |
| Returns | |
|---|---|
String | a String with an error code, or null if success. |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
unlockDevice
public 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.| Returns | |
|---|---|
boolean | true if successful or if the device is unencrypted. |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
UnsupportedOperationException | |
waitForBootComplete
public boolean waitForBootComplete (long timeOut)
Blocks until the device's boot complete flag is set.
| প্যারামিটার | |
|---|---|
timeOut | long : time in msecs to wait for the flag to be set |
| Returns | |
|---|---|
boolean | true if device's boot complete flag is set within the timeout |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
waitForDeviceAvailable
public boolean waitForDeviceAvailable ()
Waits for the device to be responsive and available for testing. Uses default timeout.
| Returns | |
|---|---|
boolean | True if device is available, False if recovery is disabled and unavailable. |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
waitForDeviceAvailable
public boolean waitForDeviceAvailable (long waitTime)
Waits for the device to be responsive and available for testing.
| প্যারামিটার | |
|---|---|
waitTime | long : the time in ms to wait |
| Returns | |
|---|---|
boolean | True if device is available, False if recovery is disabled and unavailable. |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
waitForDeviceAvailableInRecoverPath
public boolean waitForDeviceAvailableInRecoverPath (long waitTime)
Waits for the device to be responsive and available without considering recovery path.
| প্যারামিটার | |
|---|---|
waitTime | long |
| Returns | |
|---|---|
boolean | True if device is available, False if unavailable. |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
waitForDeviceBootloader
public void waitForDeviceBootloader ()
Blocks until device is visible via fastboot. Use default timeout.
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
waitForDeviceInRecovery
public boolean waitForDeviceInRecovery (long waitTime)
Blocks for the device to be in the 'adb recovery' state (note this is distinct from IDeviceRecovery ).
| প্যারামিটার | |
|---|---|
waitTime | long : the time in ms to wait |
| Returns | |
|---|---|
boolean | true if device boots into recovery before time expires. false otherwise |
waitForDeviceInSideload
public boolean waitForDeviceInSideload (long waitTime)
Blocks for the device to be in the 'adb sideload' state
| প্যারামিটার | |
|---|---|
waitTime | long : the time in ms to wait |
| Returns | |
|---|---|
boolean | true if device boots into sideload before time expires. false otherwise |
waitForDeviceNotAvailable
public boolean waitForDeviceNotAvailable (long waitTime)
Blocks for the device to be not available ie missing from adb
| প্যারামিটার | |
|---|---|
waitTime | long : the time in ms to wait |
| Returns | |
|---|---|
boolean | true if device becomes not available before time expires. false otherwise |
waitForDeviceOnline
public 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.| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
waitForDeviceOnline
public 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.| প্যারামিটার | |
|---|---|
waitTime | long : the time in ms to wait |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
waitForDeviceShell
public boolean waitForDeviceShell (long waitTime)
Waits for device to be responsive to a basic adb shell command.
| প্যারামিটার | |
|---|---|
waitTime | long : the time in ms to wait |
| Returns | |
|---|---|
boolean | true if device becomes responsive before waitTime elapses. |
সুরক্ষিত পদ্ধতি
addExtraConnectionBuilderArgs
protected void addExtraConnectionBuilderArgs (DefaultConnection.ConnectionBuilder builder)
| প্যারামিটার | |
|---|---|
builder | DefaultConnection.ConnectionBuilder |
buildAdbShellCommand
protected String[] buildAdbShellCommand (String command,
boolean forceExitStatusDetection,
boolean oldShellCommand)Builds the OS command for the given adb shell command session and args
| প্যারামিটার | |
|---|---|
command | String |
forceExitStatusDetection | boolean |
oldShellCommand | boolean |
| Returns | |
|---|---|
String[] | |
checkApiLevelAgainst
protected void checkApiLevelAgainst (String feature,
int strictMinLevel)| প্যারামিটার | |
|---|---|
feature | String |
strictMinLevel | int |
createRebootDeviceAction
protected NativeDevice.RebootDeviceAction createRebootDeviceAction (NativeDevice.RebootMode rebootMode, String reason)
Create a RebootDeviceAction to be used when performing a reboot action.
| প্যারামিটার | |
|---|---|
rebootMode | NativeDevice.RebootMode : a mode of this reboot. |
reason | String : for this reboot. |
| Returns | |
|---|---|
NativeDevice.RebootDeviceAction | the created RebootDeviceAction . |
doAdbReboot
protected void doAdbReboot (NativeDevice.RebootMode rebootMode, String reason)
Perform a adb reboot.
| প্যারামিটার | |
|---|---|
rebootMode | NativeDevice.RebootMode : a mode of this reboot. |
reason | String : for this reboot. |
| নিক্ষেপ | |
|---|---|
| com.android.tradefed.device.DeviceNotAvailableException |
DeviceNotAvailableException | |
ensureRuntimePermissionSupported
protected void ensureRuntimePermissionSupported ()
helper method to throw exception if runtime permission isn't supported
| নিক্ষেপ | |
|---|---|
| com.android.tradefed.device.DeviceNotAvailableException |
DeviceNotAvailableException | |
getApiLevelSafe
protected int getApiLevelSafe ()
| ফেরত | |
|---|---|
int | |
internalGetProperty
protected String internalGetProperty (String propName,
String fastbootVar,
String description)Fetch a device property, from the ddmlib cache by default, and falling back to either `adb shell getprop` or `fastboot getvar` depending on whether the device is in Fastboot or not.
| প্যারামিটার | |
|---|---|
propName | String : The name of the device property as returned by `adb shell getprop` |
fastbootVar | String : The name of the equivalent fastboot variable to query. if null , fastboot query will not be attempted |
description | String : A simple description of the variable. First letter should be capitalized. |
| Returns | |
|---|---|
String | A string, possibly null or empty, containing the value of the given property |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
UnsupportedOperationException | |
isInRebootCallback
protected boolean isInRebootCallback ()
Returns whether reboot callbacks is currently being executed or not. All public api's for reboot should be disabled if true.
| Returns | |
|---|---|
boolean | |
isNewer
protected boolean isNewer (File localFile,
IFileEntry entry) Return true if local file is newer than remote file. IFileEntry being accurate to the minute, in case of equal times, the file will be considered newer.
| প্যারামিটার | |
|---|---|
localFile | File |
entry | IFileEntry |
| Returns | |
|---|---|
boolean | |
notifyRebootEnded
protected void notifyRebootEnded ()
Notifies all IDeviceActionReceiver about reboot end event.
| নিক্ষেপ | |
|---|---|
| com.android.tradefed.device.DeviceNotAvailableException |
DeviceNotAvailableException | |
notifyRebootStarted
protected void notifyRebootStarted ()
Notifies all IDeviceActionReceiver about reboot start event.
| নিক্ষেপ | |
|---|---|
| com.android.tradefed.device.DeviceNotAvailableException |
DeviceNotAvailableException | |
performDeviceAction
protected boolean performDeviceAction (String actionDescription,
NativeDevice.DeviceAction action,
int retryAttempts)Performs an action on this device. Attempts to recover device and optionally retry command if action fails.
| প্যারামিটার | |
|---|---|
actionDescription | String : a short description of action to be performed. Used for logging purposes only. |
action | NativeDevice.DeviceAction : the action to be performed |
retryAttempts | int : the retry attempts to make for action if it fails but recovery succeeds |
| Returns | |
|---|---|
boolean | true if action was performed successfully |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | if recovery attempt fails or max attempts done without success |
postAdbReboot
protected void postAdbReboot (NativeDevice.RebootMode rebootMode)
Possible extra actions that can be taken after a reboot.
| প্যারামিটার | |
|---|---|
rebootMode | NativeDevice.RebootMode |
| নিক্ষেপ | |
|---|---|
| com.android.tradefed.device.DeviceNotAvailableException |
DeviceNotAvailableException | |
prePostBootSetup
protected void prePostBootSetup ()
Allows each device type (AndroidNativeDevice, TestDevice) to override this method for specific post boot setup.
| নিক্ষেপ | |
|---|---|
| com.android.tradefed.device.DeviceNotAvailableException |
DeviceNotAvailableException | |
pullFileWithAdbCommand
protected boolean pullFileWithAdbCommand (String remoteFilePath,
File localFile,
long timeout)| প্যারামিটার | |
|---|---|
remoteFilePath | String |
localFile | File |
timeout | long |
| Returns | |
|---|---|
boolean | |
| নিক্ষেপ | |
|---|---|
DeviceNotAvailableException | |
setClock
protected void setClock (Clock clock)
Set the Clock instance to use.
| প্যারামিটার | |
|---|---|
clock | Clock |
setMicrodroidProcess
protected void setMicrodroidProcess (Process process)
Marks the TestDevice as microdroid and sets its CID.
| প্যারামিটার | |
|---|---|
process | Process : Process of the Microdroid VM. |
setTestDeviceOptions
protected void setTestDeviceOptions (Map<String, String> deviceOptions)
| প্যারামিটার | |
|---|---|
deviceOptions | Map |
simpleFastbootCommand
protected CommandResult simpleFastbootCommand (long timeout, String[] fullCmd)
Executes a simple fastboot command and report the status of the command.
| প্যারামিটার | |
|---|---|
timeout | long |
fullCmd | String |
| Returns | |
|---|---|
CommandResult | |
| নিক্ষেপ | |
|---|---|
UnsupportedOperationException | |
simpleFastbootCommand
protected CommandResult simpleFastbootCommand (long timeout, Map<String, String> envVarMap, String[] fullCmd)
Executes a simple fastboot command with environment variables and report the status of the command.
| প্যারামিটার | |
|---|---|
timeout | long |
envVarMap | Map |
fullCmd | String |
| Returns | |
|---|---|
CommandResult | |
| নিক্ষেপ | |
|---|---|
UnsupportedOperationException | |
waitForDeviceNotAvailable
protected boolean waitForDeviceNotAvailable (String operationDesc,
long time)Wait to see the device going unavailable (stop reporting to adb).
| প্যারামিটার | |
|---|---|
operationDesc | String : The name of the operation that is waiting for unavailable. |
time | long : The time to wait for unavailable to occur. |
| Returns | |
|---|---|
boolean | True if device did become unavailable. |
এই পৃষ্ঠার কন্টেন্ট ও কোডের নমুনাগুলি Content License-এ বর্ণিত লাইসেন্সের অধীনস্থ। Java এবং OpenJDK হল Oracle এবং/অথবা তার অ্যাফিলিয়েট সংস্থার রেজিস্টার্ড ট্রেডমার্ক।
2026-06-22 UTC-তে শেষবার আপডেট করা হয়েছে।