![]() ![]() ![]() ![]() On Android version 6.* command #2 always indicates that the phone is locked. Is there a single adb command which can give me the information I need? Is this command compatible with the Android versions listed above? My best solution so far is to use the following 2 (bash terminal) commands: #1:Īdb shell dumpsys display | grep "mScreenState"Ĭommand #1 tells me whether the screen is on, off or "dozed".Ĭommand #2 tells me whether the phone is locked or unlocked. Screen turned off (Assumed locked as well).Ideally, I would like one command to tell me in which of the following states the phone is in: I have not been able to find a (universal) adb-command to get the phones' state. Some of my tests require locking the screen (turning it off) and then turning it on and PIN-ing in. I'm using automated tests on many different variants of devices ( Samsung tablets and smartphones such as Galaxy A5, S8, S7 etc.) where the devices have different versions of Android ( 6.0, 6.0.1, 7.0 and 7.1.1) - all in varying combinations. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
May 2023
Categories |