Gabbing about Garmin Connect for Android

In my efforts to get more content up and more app parsers added to ALEAPP, I decided to take a look at Josh Hickman's Android 13 image. One app that I know Josh had looked at before (very extensively at that) was the Garmin Connect app. Garmin is probably one of the more well known brands from the Android side, along with FitBit, for tracking exercises. They have an extensive list of popular wearables and fitness trackers.

When I realized we never got a parser made I jumped at the chance to dive in and see what all juicy details could be pulled out. I don't want to rehash what Josh previously described in his post (go read his ASAP!) but instead wanted to summarize what I pulled out for these parsers.

There were three main files in focus for what I looked a specifically that will be detailed here but to start the main app folder is located at:

/data/data/com.garmin.android.apps.connect

All three files were found in the "databases" subfolder.

cache-database

The "cache-database" file is found at the path:

/data/data/com.garmin.android.apps.connect/databases/cache-database*

Inside are a bunch of tables:

Figure 1: cache-database tables

My focus was on tables "activity_summaries" and "sleep_detail". 

Cache Activity Summaries

Activity summaries includes details about workouts the user performed and includes details such as start times, durations, distance, latitude and longitude (both start and end coordinates). We could also get heart rate, calories, steps along with some details about the device providing all this.

All of this data was embedded in a JSON blob column inside the table.

Figure 2: Sample JSON for activity_summaries

With some simple json_extract queries and a little manipulation via Python, we get a nice formatted report via ALEAPP:

Figure 3: ALEAPP repot for Cache DB activities

It should be noted that these activities may be synced from across multiple devices and could have extra legacy activity entries, not just wearables. We also get some nice KML exports for geolocation tracking.

Sleep Details

Inside the "sleep_detail" table of the same database file is, naturally, details about sleep tracking via the Garmin Connect app. Lucky for us, this is all straight SQLite columns and nothing extra to extract. Even luckier, the columns are labeled simply to understand what they represent.

Some details we get include start and end timestamps, some durations of different types of sleep (deep/light/REM/awake) along with pulse oximeter readings and breathing. These could help potentially prove/disprove someone wasn't awake during an incident. Here is the report results in ALEAPP:

Figure 4: ALEAPP report for Cache DB sleep details

There are a lot of other things that may be tracked in the cache-database file that may be relevant to your case. You may want to manually check.

gcm_cache.db

The "gcm_cache.db" is another cache database that contains some similar and extra items previously seen from the "cache-database" file. GCM cache, which I assume stands for Garmin Connect Mobile, can be found at:

/data/data/com.garmin.android.apps.connect/databases/gcm-cache.db*

A few less tables than the last database:

Figure 5: gcm_cache.db tables

Tables of interest include "devices" and "json_activities".

devices

In somewhat self-explanatory fashion, devices contains details about devices connected to the app. Details include device name, MAC address, last connection timestamp, connection type, software version and even a URL to a picture of the model of device. The short and sweet ALEAPP report looks like this:

Figure 6: ALEAPP report for Garmin devices details

json_activities

The "json_activities" table has multiple different data types inside. I created two different queries to pull out specific items. Those include:
  • ACTIVITY_DETAILS - workout details
  • ACTIVITY_WEATHER - weather, temperature and wind details
In no surprise, the meat of the entries are in embedded JSON columns in the table. ACTIVITY_DETAILS are almost exactly the same as the cached activity summaries we saw from above in "cache-database" albeit with less entries. Josh's hypothesis is that ACTIVITY_DETAILS will only track activities from the attached wearable as the previously mentioned activities from "cache-database" will contain all activities, even if a wearable wasn't utilized.

As such here is the ALEAPP report with the duplicated data:

Figure 7: ALEAPP report for gcm_cache activities

ACTIVITY_WEATHER gives details on when weather was synced down including latitude and longitude of the weather station, station name and ID, with temperature, dew point, humidity, weather type, and wind directions (both in degrees and compass direction).

This may be less useful for determining a person's location as you can set this to a fixed point if you wanted to but I'd imagine most people would use it based off their own location for proper usage. Here's the report:

Figure 8: ALEAPP report for gcm_cache weather

Nice weather to be had in North Carolina during September.

notification-database

Last but not least is the "notification-database" file found at:

/data/data/com.garmin.android.apps.connect/databases/notifications-database*

The table of interest was "notification_info" with it showing some information about notifications that came in via the wearable to my understanding. This includes message snippets, app provider names, status of notification (dismissed/silent/new).

Figure 9: ALEAPP report for notification-database

Hopefully this post is a nice complement to Josh's incredible job in breaking down the Garmin Connect app. I know there is much more work to be done for pulling out additional details such as settings and such as Josh detailed but I wanted to get this initial parser released pushed.

Get the latest build of ALEAPP now!