Is it possible to get the historical timestamps of when I have unlocked or locked my phone using USB debugging?

Apparently, this data is tracked in Digital Wellbeing, but it is not necessarily easy to get too.

This question was asked before without much success in 2021: How to export phone usage time data to json/csv/sql/txt raw form?

  • 2
    With ADB, I guess logcat+filtering is a raw answer by observing what kind of log is printed when the phone is locked/unlocked. But other than that, AFAIK the Android system rarely stores logs for a long time and instead rewrites them on boot. That's why apps are needed to store and log interesting events for the long term.
    – Andrew T.
    Commented May 22 at 15:54
  • How does digital wellbeing grab the data and store it? Commented May 22 at 21:07


You must log in to answer this question.

Browse other questions tagged .