androidandroid-studioadbkeyguard

How Android Studio triggers to show my unlock screen?


When I Launch an app through Android Studio, if my phone is in the keyguard locked, but screen on state, it will automatically request to call out the unlock screen at that point (just like the user swipes up and show the unlock screen).

From 1 to 2 automatically.

Screen ON

Unlock Screen

But I'm sure that Android Studio is not performing the gesture via adb (because I have the Pointer location feedback turned on in Developer Options), and I'm also sure that it's not using the input keycode 82 (because this approach is significantly different from swiping up).

So how exactly does Android Studio do this?


Solution

  • Using Wireshark capturing loopback traffic with filter tcp port 5037 it was easy to identify the command that is sent by Android Studio to open the unlock screen:

    adb shell wm dismiss-keyguard