Is there a way to check if Android device screen is locked via adb?

前端 未结 8 1312
迷失自我
迷失自我 2020-12-10 08:04

I know that PowerManager and/or KeyguardManager can help me check if a device screen is locked/unlocked. Is there a way to check this via adb?

8条回答
  •  猫巷女王i
    2020-12-10 08:33

    If its a rooted phone you can check some fields related to lock in settings.db.

    settings.db is located at /data/data/com.android.providers.settings/databases

提交回复
热议问题