Howto easily update GPS-A data on a Sony Alpha 65/77/99 and others on Linux/Mac

In order to speed up GPS locking on a Sony Alpha 65 (or similar) SLT camera, it’s possible to update the GPS-A data (also called almanac data). Like on any other modern GPS device, the almanac data is used to give the device a hint where the satellites are located. The data usually is valid for only some weeks,then it needs to updated again.

The common way to get the almanac data on a Sony Alpha is to use Sony’s Software, so no go for Linux users. But there are other ways to do it.

Manual download

The almanac data file can be downloaded directly from Sony here: Simply put it into /PRIVATE/SONY/GPS/ on the SD-card (just create the subfolder GPS if it doesn’t exist yet).

Then check Menu -> Settings 1 -> GPS-Settings -> GPS-assist data. The data should be valid for 6 weeks from the day you downloaded it. But this also means you need to update the file manually every 6 weeks.

Automatic approach when mounting the SD card

To automate the process, the file could be updated automatically each time the SD card is mounted on the PC.

Mac OS X

For Mac there is a tool called GPSAssist Update. When you insert the card in the card reader, it checks if an update is required and downloads fresh data when necessary.


A similar solution is possible on Linux using udev and a small BASH script.

I created a github repo here:

ArchLinux Users can use this:

Anyways, here it is step by step:

1. Create the file /etc/udev/rules.d/99-sony-gps-update.rules

SUBSYSTEM=="block", ACTION=="add", ENV{DEVTYPE}=="partition", ENV{UDISKS_PARTITION_NUMBER}=="1", RUN="/usr/bin/sony-gpsassist-update"

This will call the following script whenever there is an “add” event of a disk partition with number 1. A usual SD-card only has one partition, so this should do it.

2. Create the script /usr/bin/sony-gpsassist-update

Note: the latest version can be found on github.


PROG_NAME="`basename $0`"

if [[ -r "/etc/`basename $0`.cfg" ]]; then
  . /etc/`basename $0`.cfg
  ${LOGGER_CMD} "ERROR: no config file found"
  exit 1

if [[ -z "$SONY_FS_UUIDS" ]]; then
  ${LOGGER_CMD} "WARN: no SONY_FS_UUIDS configured, running in probe mode. Plug your SD card and check ID_FS_UUID from /tmp/$PROBE_OUT_FILE"
  env > /tmp/$PROBE_OUT_FILE
  exit 0


function run_update {
  if [[ "$SONY_FS_UUIDS" =~ "$ID_FS_UUID" ]]; then
    ${LOGGER_CMD} "Device with known FS UUID added. Mounting ..." 
    mkdir $TMP_MOUNT_DIR
    if [[ $? -ne 0 ]]; then
      ${LOGGER_CMD} "Mount failed. Exiting."
      return 5

    if [[ -d "${TMP_MOUNT_DIR}/PRIVATE" ]]; then
      ${LOGGER_CMD} $PROG_NAME "Sony-formatted partition found. Good. Updating GPS-A data now"
      wget -O assistme.dat.tmp
      if [[ $? -ne 0 ]]; then
        ${LOGGER_CMD} "Failed to download assistme.dat. Exiting."
        return 10
        mv assistme.dat assistme.dat.old
        mv assistme.dat.tmp assistme.dat
      ${LOGGER_CMD} $PROG_NAME "Update successful."
      cd ${TMP_MOUNT_DIR}/..
      ${LOGGER_CMD} $PROG_NAME "No Sony formatted card. Ignoring."
      exit 0

if [[ $ERR -ne 5 ]]; then
  umount $TMP_MOUNT_DIR
  if [[ $? -ne 0 ]]; then
    ${LOGGER_CMD} "WARNING: failed to unmount $TMP_MOUNT_DIR"
    rmdir $TMP_MOUNT_DIR

exit $ERR

3. Make the script executable

chmod +x /usr/bin/sony-gpsassist-update

4. Plug your card, and see /var/log/messages.log (or journalctl or whatever)

2013-10-15T21:13:52+02:00 sirius sony-gpsassist-update: WARN: no SONY_FS_UUIDS configured, running in probe mode. Plug your SD card and check ID_FS_UUID from /tmp/sony-gpsassist-update_17918_env.txt

So check the file /tmp/sony-gpsassist-update_17918_env.txt


5. Edit /etc/sony-gpsassist-update.cfg


6. Re-Plug your SD card and check /var/log/messages or journalctl.

2013-10-01T20:16:21+02:00 sirius sony-gpsassist-update[25316]: Device with known FS UUID added. Mounting ...
2013-10-01T20:16:21+02:00 sirius udisks-daemon[8085]: **** /proc/self/mountinfo changed
2013-10-01T20:16:21+02:00 sirius sony-gpsassist-update[25319]: Sony-formatted partition found. Good. Updating GPS-A data now
2013-10-01T20:16:24+02:00 sirius sony-gpsassist-update[25324]: Update successful.

Works. Nice!

Some notes: 

  • Sometimes the /PRIVATE folder is actually called /Private. Not so on my Alpha 65, on all cards it got created as /PRIVATE. 
  • On a freshly Sony-initialized card there was no /PRIVATE/SONY folder here, which is why I test on /PRIVATE only and use mkdir -p for SONY/GPS if it doesn’t exist.

2 thoughts to “Howto easily update GPS-A data on a Sony Alpha 65/77/99 and others on Linux/Mac”

  1. Hi, I am trying this on elementary OS, but cannot find any UUID for my SD card.. it is being mounted as mmcblk0.. any idea, what I am doing wrong?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.