I am trying to create a height profile from the GPS positions I recorded last week while hiking. I used the App GPS Logger (now called GPS Offline Logger) on Android 2.3.5/Samsung GT-S5570 and managed to have it create .kml-Files, and from the second day on, also .gpx-Files. Now, the .gpx-Files contain a lot more information (like accuracy and height) than the .kml-Files (Which are just a <linestring> with a list of coodinates).

Is there any way to have the app create the .gpx File for the missing day or can I (maybe using ADB via Ubuntu) directly access the application's internal database and get the data from there? (If I click "show logs" and then long-click, "show details" twice, all needed information is displayed.)

1 Answer 1


Ok, so the program still produces a logfile called location_log.txt with all of the important data. I wrote a script in python to export it:

import codecs, os
__author__ = 'lukas'
path = "/path/to/the/folder/"
ins = codecs.open(path + "location_log.txt", "r", 'iso-8859-15')
array = []
for line in ins:
    linenew = ""
    count = 0
    for char in line:
        linenew += char
        count += 1

print """<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<gpx   xmlns="http://www.topografix.com/GPX/1/1" creator="GPSbgLogger" version="1.1"  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd" >  <trk>
    <name> GPSbgLogger DATE </name>
    <desc> GPX export file </desc>     <trkseg>"""

for line in array:
    if "20140228" in line: #OR ANY OTHER DATE YOURE INTERESTED IN
        if "   gps " in line:
            info = line
            otherstuff = info.split("   gps")[0]
            latlonheight = info.split("gps  ")[1]
            datetime = otherstuff.split(": ")[1]
            latlonheight = latlonheight.split(",")
            date = datetime.split(" ")[0]
            time = datetime.split(" ")[1]
            print "<trkpt  lat=\"%s\" lon=\"%s\" >"%(latlonheight[0], latlonheight[1])
            print "<ele>%s</ele>"%(latlonheight[2][:-1])
            print "<time>%sT%sZ</time>"%(date[:4] + '-' + date[4:6] + '-' + date[6:], time)
            print "<src>gps</src>\n</trkpt>"

print """

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .