0

Android seems to keep a log of the past week of app usage. It seems that there are many applications that are able to get this "App usage" permission and by querying some underlying api get all the app usage data from your phone. It shows launch times and duration of specific applications. Some applications that can read these data are: https://play.google.com/store/apps/details?id=com.a0soft.gphone.uninstaller and https://play.google.com/store/apps/details?id=com.huybn.UsageHistory. While it seems that many of these applications have ways to export this data I was wondering if there was a way to export this data without an app as the above apps each have an export format that really can only be read on the android phone.

TLDR; Is it possible to grab Application Usage Data via ADB or as a file on the internal storage (maybe in /data/system/something?)

4
  • 1
    From JB to Kitkat, usage stats were stored in /data/system/usagestats/usage-history.xml. After that, it has been split to multiple (daily?) files. I currently cannot find my notes on those separate files, but see e.g. here for more details.
    – Izzy
    Oct 8, 2019 at 5:41
  • It seems that I need my device to be rooted in order to see those files. I am assuming that the apps listed above can read those files because they have the permission that allows them to have "usage access". Is there a way to give adb usage access? I've noticed dumpsys shows the last day or so but not the entire usage history that the apps above can see. Oct 9, 2019 at 2:09
  • 1
    For direct access to those files you'll need root access, yes. No idea how to widen the window for dumpsys. And as for giving ADB usage access, that would need root again to exec the grant (if it's possible at all – and even then, I guess you'd have to use some API to access those data).
    – Izzy
    Oct 9, 2019 at 20:15
  • Thats quite frustrating. Good to know though thanks! Oct 10, 2019 at 2:50

0

You must log in to answer this question.

Browse other questions tagged .