Friday 22 April 2011

iphone tracker (note this is from 2011)

A friend of mine was talking about how your iphone keeps a record of everywhere you've been and then another sent me a link showing how to have a look: http://petewarden.github.com/iPhoneTracker/ but it's only for Macs. However, you can have a look on a PC thus:
  1. Download SQLite browser from http://sourceforge.net/projects/sqlitebrowser/files/sqlitebrowser/, extract the files and run SQLite Database Browser 2.0 b1.exe
  2. Find your latest iphone backup folder in C:\Users\[your username]\AppData\Roaming\Apple Computer\MobileSync\Backup
  3. Open a command prompt (Start > All Programs > Accessories)
  4. Run the following command: findstr /M CellLocation C:\Users\Andykn\AppData\Roaming\Apple Computer\MobileSync\Backup\[latest backup folder]\*.*
  5. In the SQLite browser select File > Open and browse to the file found in the previous step.
  6. Select the "Browse data" tab and use the "Table" drop down to select "CellLocation".

28 comments:

Clonkenstein said...

Great work, thank you!

Mel said...

I get lost right before the last step. It says An error occurred: File is not a SQlite 3 database

Any suggestions?

Florence & team said...

Can't How?

Unknown said...

What format is the timestamp columb. I can't get excel to display the date & time correctly.

Myrtle's missus said...
This comment has been removed by the author.
Ben Sharif said...

Hi, here's a rough way to map the data to Google Earth.

1. Get the CellLocation table ipened in SQLite (should already be done)

2. Go File>Export>Table as CSV

3. Select the 'CellLocation' table from the dropdown

4. Save the file as something (I suggest CellLocation.csv)

5. Open the .csv up in excel and delete all the columns except Timestamp, Latitude, Longitude
(Arrange the data so that Timestap is in column A, lat in column B etc.) Then delete the headings so that the only data you have is a bunch of numbers.

6. Then save and close the file.

7.Go to:
http://www.gpsvisualizer.com/map?form=googleearth

8. In the box that says 'Paste your data here' delete the word 'desc' so that the only text now is:
name,latitude,longitude

9. Open your csv file back up but this time in a text edotor (Word or Notepad should do)

10. Copy and paste the data into the text box on GPS Visualiser (beneath the line that says: name,latitude,longitude)

11. Click Create KML and save the resulting file.

12. Open in Google Earth to view your data points. The numbers for each data points are actaully the time in seconds after 01.01.2001 00:00:00

13. That website has many other parameters that you can mess with if you know what your doing (eg. trackpoints will draw a nice line etc).

Enjoy.

Ben Sharif said...

@Joe

Timestamp is in the number of seconds since 01.01.2001 00:00:00

To display it in excel do this:
A1: 01/01/2001 00:00:00
B1: 319823837.4 (YOUR time value)
C1: =A1+B1/86400
(86400 is a magic number for time in excel)

Might have to format C1 as dd/mm/yyyy hh:mm:ss to display once the formula is done.

Unknown said...

Myrtle, Put your filename string in quotes:

findstr /M CellLocation "C:\Users\Allan\AppData\Roaming\Apple Computer\MobileSync\Backup\eef6b1ee12ae4c6ce77436ebd44a900442fc8e5a\*.*"

Unknown said...

happy to say my wifi only ipad data on the PC had only a single entry in the table of 0.0,0.0 lat long.

Unknown said...

@Mel: use a hex editor to view the file you identified in the earlier steps and confirm that the first 15 bytes read in ASCII "SQLite format 3".

Myrtle's missus said...

@agr122954 Thank you! I had forgotten how frustrating DOS can be .. no cut and paste, no inserting missing characters .. the true enemy of the dyslexic!

Myrtle's missus said...

@Ben Sharif That works beautifully. I have played about with it and the results are very interesting. it seems to have recorded trips over the last year only when they are within the South East, all the rest is not shown. Also the location records seem to be rather inaccurate. When I travel I quite often go into a particular service station and it shows it spread over a huge area!

Anonymous said...

This was very helpful. I created another POC with Kettle (open source data integration) to read in the SQLite file:
http://kettle.bleuel.com/2011/04/26/iphone-tracking-how-to-read-the-consolidateddb-with-kettle/

PaulD said...

@rob I expect you have some entries in the WifiLocation table though. Non-3G enabled iOS devices can still use WiFi hotspots to find their location.

Apple has now explained what this database is for, anyway: http://www.apple.com/pr/library/2011/04/27location_qa.html

Unknown said...

@Ben Sharif

I've tried the formula for the timestamp in excell (2003 version) and I'm getting results like "3650540514" or "3659823825" tried formatiing the cell as any data format but never getting something close to a date.

I've also noticed in SQLite that sometimes over a hundred consequtive columns have the exact same timestamp, but different long and langtitude. Whats that about, anyone noticed something similar?

Myrtle's missus said...

@Jens Blueul I followed the link you suggested and found that the name of the file on my computer is the same as that on yours. It is:-
4096c9ec676f2847dc283405900e284a7c815836
Maybe it is related to the day the information was backed up. My file is dated 12/04/2011

Matt Merrifield said...

Well done! this worked perfectly for me

Unknown said...

Perfect! Cheers

t said...

There is no backup folder on my computer. (C:\Users\t\AppData\Roaming) but no apple folder.

Am I supposed to enable this on my iphone?

Jeff said...

@t: On my PC (Win XP SP3) the path is C:\Documents and Settings\[username]\Application Data\Apple Computer\MobileSync\Backup\

Aria said...

I keep on getting a
" FINDSTR: cannot open " then the directory I put in.

Ben Sharif said...

@everyone!
There's a windows application now that does all this for you. Finds the file, extracts the data and maps it.
Check it out here:
http://huseyint.com/iPhoneTrackerWin/
DOWNLOAD LINK
http://cl.ly/0F2K460D451O2q2P1C3u

Leo said...

An easier option for any platform (Mac, linux, Windows) is to use the free personal version of iPhone Analyzer. http://www.crypticbit.com/zen/products/iphoneanalyzer

pips said...

guys this tracking stuff is not working anymore right? since ios 4.3.3?.. pls let me know if such is the case.. many thanks!

Meltingtoe said...

So close, but I am not sure what I am doing wrong..found the location and file etc, but I am not sure what the Dos findstr function is doing for me?

Unknown said...

This is a great article and I've tried following it, however, I'm struggling and want to be sure it's not due to the fact that I have iOS 8.4 running on my phone. Does anyone know if Apple has changed how/where the CellLocation table is stored since this article was written? I'm trying to track where my phone was on a specific day/time frame.

swati parmar said...

I would like more information about this, because it is very nice...Thanks for sharing. Thanks a lot

juan2go said...

Hi, it all looks interesting,
but I don't have Apple Computer\MobileSync\Backup (part)
What do i need to do please?