Quantifying My Phone Usage – Android Applications Usage Statistics

I came across an interesting article [1] not too long ago… they did this study where they found–in a survey of 2,000 people–that most under 25s check their mobile devices an average of 32 times a day. Now I am NO under 25, but I’ve been obsessing a lot about how often I do this myself. So I have been playing around with Android’s dumpsys, and with these daily statistics, I kind of have an idea of how frequently I use my device.

See I have this LG Optimus L5 (I KNOW, I should probably upgrade to something with more processing power :p) which I have loaded with tonnes of apps–81 at the time of this writing… See ‘adb shell pm’ output below.

Taking Stock of Packages

You will notice from the output below that I have a total of 157 packages installed on my device, 81 of which I explicitly installed–notice that I am filtering out apps that came loaded with the device (come.android.* and com.lge.*)

phiri@phiri-PROLINE-DH55TC:~$ adb shell pm list packages | wc -l
157
phiri@phiri-PROLINE-DH55TC:~$ 
phiri@phiri-PROLINE-DH55TC:~$ adb shell pm list packages | grep -wv 'com.android\|com.lge' | wc -l
81
phiri@phiri-PROLINE-DH55TC:~$ 

Computing Usage Statistics

I came across an interesting discussion [3] and one of the recommended solution for computing usage statistics was using the dialer code *#*#4636#*#*–see sample output below.  However, this method appears NOT to be persistent and statistics are reset once device is reboot.

Sample output of dialer command *#*#4636#*#*

Sample output of dialer command *#*#4636#*#*

And so I resorted to using Android’s ‘adb shell dumpsys’ command.

phiri@phiri-PROLINE-DH55TC:~$ adb shell service list
Found 64 services:
:
51      usagestats: [com.android.internal.app.IUsageStats]
:
phiri@phiri-PROLINE-DH55TC:~$ 
phiri@phiri-PROLINE-DH55TC:~$ adb shell dumpsys usagestats
Date: 20140815
  com.google.android.keep: 2 times, 283639 ms
    com.google.android.keep.activities.EditorActivity: 1 starts, 1500-2000ms=1
    com.google.android.keep.activities.BrowseActivity: 2 starts, >=5000ms=1
  android: 1 times, 7943 ms
    com.android.internal.app.ChooserActivity: 1 starts, 3000-4000ms=1
  com.lge.camera: 1 times, 60603 ms
    com.lge.camera.CameraApp: 2 starts, >=5000ms=1
    com.lge.camera.PostviewActivity: 1 starts, >=5000ms=1
  com.android.settings: 7 times, 355421 ms
    com.android.settings.Settings: 2 starts, 3000-4000ms=1
    com.android.settings.Settings$WifiSettingsDialogActivity: 3 starts, 3000-4000ms=1, >=5000ms=1
    com.android.settings.SubSettings: 2 starts, 250-500ms=1, 500-750ms=1
    com.android.settings.UsbSettings: 2 starts, 3000-4000ms=1
  bbc.mobile.news.ww: 6 times, 4653555 ms
    bbc.mobile.news.ww.HomeWwActivity: 6 starts, 3000-4000ms=1, >=5000ms=2
  com.whatsapp: 6 times, 3405392 ms
    com.whatsapp.Conversation: 9 starts, 500-750ms=1, 1000-1500ms=1, 1500-2000ms=2, 4000-5000ms=1, >=5000ms=4
    com.whatsapp.ContactInfo: 3 starts, 500-750ms=1
    com.whatsapp.Conversations: 8 starts, 1000-1500ms=1, >=5000ms=2
    com.whatsapp.ViewProfilePhoto: 1 starts, 0-250ms=1
    com.whatsapp.Main: 1 starts
    com.whatsapp.MediaView: 1 starts, 500-750ms=1
:
:
  com.lge.launcher2: 10 times, 1879797 ms
    com.lge.launcher2.Launcher: 10 starts, 3000-4000ms=1, >=5000ms=1
Date: history.xml (old data version)
phiri@phiri-PROLINE-DH55TC:~$

Parsing Through the Data

  • I used the basic Python script below to parse the output
  • For each day, I was only interested in the app statistics–the second level hierarchy.
  • I left out the application Activity statistics, however, these provide more insight into how I really use some apps… take come.whatsapp for instance: I launched the app 6 times, but started a total of 9 conversations, views contact information 3 times and viewed a profile photograph.
with open("lg_usage_20140818.txt") as f:
   for line in f:
      if line.startswith("Date: "):
         print '----------', line.strip(), '----------'
      elif "times" in line:
         print line.strip()

Results at a Glance

  • I cannot exactly quantify the total time I spend on my phone since I tend to have multiple apps open at any given instance and also tend to have apps running in the background
  • Based on five days worth of data, I THINK that I check my mobile device an average of 26 times per day ( At this point, I am guessing the ‘com.lg.launcher2’ package gives me the results I need…). Of course this includes data from a Saturday and a Sunday, two days when I rarely use my mobile device.
  • In a typical week, of the 157 apps I have loaded on my mobile device, I only use 34
  • In a typical week, of the 81 apps that I have explicitly downloaded and installed, I only use 22–I filtered out ‘com.android’ and ‘com.lg’ packages
  • On a typical week day (August 15, 2014 in this case), my Top 10 mostly used apps are in table below
PackageAppFreq.Time (ms)
com.lge.launcher2Unknown382186856
com.funanduseful.lifeloggerLife Logger179358810
com.trelloTrello1213324743
com.android.settingsSettings7355421
com.lge.musicLG Music74421582
bbc.mobile.news.wwBBC News64653555
com.whatsappWhatsApp63405392
com.android.mmsUnknown41253755
org.acm.cacm.v2CACM32984027
com.quora.androidQuora31596309

Bibliography

[1] http://www.bbc.com/newsbeat/26780069
[2] https://source.android.com/devices/tech/input/dumpsys.html
[3] http://android.stackexchange.com/q/7593

Categories: General
Tags: , , ,