Location, media and metadata · Lesson 1 of 4
Location sources on the device: GNSS, Wi-Fi, cell and significant locations
11 min read
"Where was the phone?" is one of the most common questions in mobile casework, and one of the easiest to answer badly. A phone estimates its position from satellites, radio networks and sensors, and each estimate comes with an uncertainty that is easy to lose on the way to a report. This lesson explains how phones calculate location, what their stored accuracy values mean, and where iOS and Android keep location history today, including the iOS routined databases and Google's Timeline, which has moved from the cloud to the device.
How a phone works out where it is
Both platforms combine several sources into a single best estimate. The source behind a record tells you how much weight it can carry.
Satellite positioning (GNSS)
A Global Navigation Satellite System (GNSS) receiver measures the travel time of signals from several satellites and solves for its position. Phones combine GPS, Galileo, GLONASS, BeiDou and regional systems. Under open sky a phone is often accurate to a few meters; indoors or in narrow streets, accuracy degrades quickly or no fix is possible.
Wi-Fi and Bluetooth
A phone that sees Wi-Fi access points can look up their known positions in a crowd-sourced database. Apple states that Location Services uses crowd-sourced Wi-Fi hotspot and cell tower locations together with GPS and Bluetooth; on Android, Google Location Accuracy plays the same role. Wi-Fi positioning works indoors, typically to tens of meters, but a moved access point or a mobile hotspot can produce a confident but wrong position. Bluetooth beacons with known positions can refine an indoor estimate in the same way.
Cellular networks
The phone identifies the serving and neighboring cells and looks up their approximate positions in the same kind of crowd-sourced database, so the result is the area a cell covers, not a point. A position from cell data alone can be off by hundreds of meters in a city and by several kilometers in rural areas. The carrier's own records of cell use are a separate source, obtained through legal process, and are not covered here.
Fused location and the accuracy radius
The operating system blends these inputs with motion sensors into a fused estimate: Core Location on iOS, and on Android the platform location service or Google Play services' Fused Location Provider. Each stored fix usually carries a horizontal accuracy value in meters. Read it carefully:
- Android. The developer documentation defines Location.getAccuracy() as a radius at the 68th percentile: there is a 68% chance the true position lies within that distance of the reported point, so roughly one time in three it lies outside.
- iOS. Apple describes CLLocation.horizontalAccuracy as "the radius of uncertainty for the location, measured in meters" and does not publish a confidence level. A negative value means the latitude and longitude are invalid.
- Approximate location. Both platforms let users give apps only an approximate location. Android documents approximate estimates as accurate to about 3 square kilometers, against usually about 50 meters for precise location. An app that only had approximate access cannot have received a precise fix from the location service.
| Source | Typical accuracy | Indoors | Main weakness |
|---|---|---|---|
| GNSS | A few meters in open sky | Poor or none | Blocked or reflected signals |
| Wi-Fi | Tens of meters | Good | Moved or mobile access points |
| Cell | Hundreds of meters to kilometers | Good | Coarse; depends on cell density |
| Fused | Best available mix | Good | Hides which source dominated |
Location data on iOS
Significant Locations and the routined databases
iOS learns the places a user visits often through a system daemon called routined. Users see the result in Settings › Privacy & Security › Location Services › System Services › Significant Locations & Routes. Apple states that this data syncs between the user's devices with end-to-end encryption and cannot be read by Apple. The databases are in /private/var/mobile/Library/Caches/com.apple.routined/:
- Cache.sqlite holds recent raw fixes in the ZRTCLLOCATIONMO table: ZTIMESTAMP, ZLATITUDE, ZLONGITUDE, ZHORIZONTALACCURACY, ZALTITUDE, ZVERTICALACCURACY, ZSPEED and ZCOURSE. Apple does not document the retention: researchers commonly report about a week of data, but periods of 7 to 30 days have been observed. The ZRTVISITMO table in the same file holds visit records with entry and exit times and an uncertainty value.
- Local.sqlite holds what routined has learned. ZRTLEARNEDLOCATIONOFINTERESTMO lists the places (locations of interest) with coordinates; ZRTLEARNEDLOCATIONOFINTERESTVISITMO lists visits to them with entry and exit times; ZRTLEARNEDLOCATIONOFINTERESTTRANSITIONMO records movements between places, with a motion type whose values are interpreted by researchers, not documented by Apple.
- Cloud-V2.sqlite holds the copy that syncs between devices. Its ZRTLEARNEDVISITMO table links each visit, through ZDEVICE, to a row in ZRTDEVICEMO. Researchers have seen visits there that point to more than one device, such as an iPad on the same account. A visit in this file is therefore not automatically a visit by the phone you are examining.
All of these timestamps are Mac absolute time: seconds since 2001-01-01 00:00:00 UTC. Add 978,307,200 to get Unix time. For example, ZTIMESTAMP 794842327 is 2026-03-10 13:32:07 UTC (an illustrative date). Lesson 6.4 lists the typical conversion errors.
Visits and learned places are inferences: routined decides when a stay starts and ends and which fixes form a place, using undocumented algorithms that researchers found run in batches. Report a visit as "the device's location service recorded a visit", with its uncertainty, not as proof that a person entered a building.
What is encrypted and what you can reach
The routined databases are protected by Data Protection like other user data (lesson 1.2). In practice they come from a full file system extraction of an unlocked or AFU phone (lesson 2.4). Research on earlier iOS versions found Significant Locations excluded from computer backups (lesson 2.3), so do not expect them there; confirm this for the version you examine. Like any SQLite database, recently deleted rows may survive in the -wal file or free pages (lesson 3.2).
Other iOS location stores include:
- locationd caches in /private/var/root/Library/Caches/locationd/, such as cache_encryptedB.db. Its WifiLocation table pairs access point identifiers (BSSIDs) with coordinates. Rows can be crowd-sourced access point positions the location service obtained to help calculate location, not places the phone has been. A row there does not show that the phone was at those coordinates or connected to that network.
- Biome location streams (lesson 4.4 covers the format). Location.Visit records hold coordinates with an uncertainty, entry and exit times and sometimes a place name. On community test images each record was written minutes to weeks after the exit, so its record time is not a visit time. Location.Semantic records carry a Start or End flag and, in some records, the identifier of a routined location of interest. What starts or ends is not documented, and in community testing the record time often did not match a visit's entry or exit. Both are inferred records; do not read their times as arrivals or departures without corroboration.
- Visited Places (iOS 26 and later). An opt-in Apple Maps feature that lists places the device visited, for a period the user chooses. Apple states that it requires Significant Locations & Routes and is end-to-end encrypted. Apple does not document its on-device storage, so test before relying on a parser.
- Photo and video metadata, covered in lesson 6.2.
Location data on Android
Google Timeline moved to the device
The richest Android location source used to be Google's Location History, kept on Google's servers and shown as Timeline. In December 2023 Google announced that Timeline would be stored on the device instead, with an optional backup that Google encrypts so it cannot read it, and with a default auto-delete period of three months instead of 18. Accounts were migrated gradually into 2025, and users who did not act lost older web Timeline data. Timeline is off by default and must be turned on by the user. The history must now be found on the phone; a request to Google may not return it.
On current Android versions, Timeline data is held by Google Play services in its private data directory (CE storage, lesson 1.3):
- odlh-storage.db in /data/user/0/com.google.android.gms/databases/ ("on-device location history"). The semantic_segment_table holds segments (visits, activities and paths) with start_timestamp_seconds and end_timestamp_seconds in Unix seconds and a protobuf blob in the semantic_segment column. Coordinates inside the blob are integers in units of 1e-7 degrees, so 515012345 means 51.5012345. A generic decoder may show a south or west coordinate as a large unsigned number: subtract 4,294,967,296 from any value above 2,147,483,648, so 3816142296 becomes −478825000, or −47.8825000.
- app_semanticlocation_rawsignal_db, a LevelDB folder at /data/user/0/com.google.android.gms/app_semanticlocation_rawsignal_db/, holds raw signals: positions with Unix millisecond timestamps and accuracy values, Wi-Fi scans and activity records. On community test images the first user's store spanned about four to five weeks; Google does not document the period.
- semloc_transient_database, in /data/user/0/com.google.android.gms/databases/ (a second copy has been seen under cache/), a short-lived store of recent segments. Researchers who read the Play services code found that it reads back only rows written in the last two days and deletes older ones.
These field meanings come from community research on specific Google Play services versions, documented in ALEAPP's parsers. Record the Play services version and treat labels for undocumented fields as working interpretations.
What remains in apps and caches
Even without Timeline, traces survive elsewhere: Google Maps searches and directions (lesson 3.6), GPS coordinates in photos (lesson 6.2), the location table of Samsung's media provider database, media.db (lesson 3.7; not established as an independent fix, so compare it with each file's own metadata), saved Wi-Fi networks (lesson 3.5), and tracks in fitness, delivery and ride-hailing apps. Older Android versions kept cache.cell and cache.wifi files under com.google.android.location; like the iOS locationd cache, they list positions of cells and access points, not of the device.
Interpreting location records
Four checks apply to every location record, whatever the platform:
- Whose position is it? A fix of the device, the position of a cell tower or access point, a place the user searched for, or a location shared by someone else are different things.
- How certain is it? Report the accuracy radius and what it means on that platform. A 2 km radius cannot place someone in a specific building.
- Is it observed or inferred? A raw fix is a measurement; a visit, a "home" label or a predicted route is the output of an algorithm.
- What could be missing? Short retention, auto-delete, disabled permissions and devices left at home all create gaps. A missing record is not evidence that the device was elsewhere.
Applying this to the Corvane case
On Lena's iPhone 14, the routined databases come from the full file system extraction made on Day 9. Cache.sqlite still holds raw fixes from Day 1 onward, because eight days is within the retention observed for this store. The store is often limited to about a week, so a few more days could have lost them, and movements before Day 1 cannot be checked. Local.sqlite may still show learned visits to the office and the café. Fixes near the office during working hours, with radii of tens of meters, agree with the phone's network history, which shows the company Wi-Fi at those times. The examiner checks Cloud-V2.sqlite for visits linked to other devices on Lena's account before reporting any visit as the phone's.
Victor's Galaxy phone is acquired about ten weeks after Day 1. The transient store (about two days) and the raw-signal store (a few weeks) no longer reach back to Day 2. If Timeline was on, odlh-storage.db may still hold a Day 2 visit near the café, because ten weeks is inside the default auto-delete period of three months. The examiner records the Timeline and auto-delete settings found on the phone.
Exam focus: Know the typical accuracy and weaknesses of GNSS, Wi-Fi and cell positioning, and that Android's accuracy value is a 68% radius. Be able to name the routined databases, their main tables and the Mac absolute time epoch, and explain that Google Timeline is now stored on the device in Google Play services. Know which records describe the device's position and which describe reference points or inferences.
Practice questions
Check your understanding. These questions do not count towards the exam.
Sign in to save your progress and continue where you left off. It is free. Sign in