Manuscript Offprint

arXiv:2610.21597

Decoding What iOS Location Services Send to Apple: An LLM Is an Unreliable Analyst but a Useful Toolmaker

Douglas Leith

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

D.J.Leith

Trinity College Dublin, Ireland

Abstract—Reverse engineering the data formats used by mobile software is skilled and slow, and using AI to assist with it is attractive. We evaluate this for the protobuf messages that an iPhone sends to Apple's location services. Working from Apple's binaries, we use two frontier models (Claude Opus 4.8, Codex GPT Sol 5.6) to reconstruct the schemas of protobufs observed in network traffic. The great majority of the schemas contain substantial errors, and these are hard to detect because the schemas are internally consistent. Direct AI use is therefore unsuitable for forensic and privacy analysis. AI can, however, write reliable analysis tools when their output can be validated. We use Claude to write a Python tool, Extractor, that reliably recovers protobuf schemas from Apple binaries. We validate it against binaries compiled from schemas with known answers, previously published schemas, and network measurements. We demonstrate the use of Extractor to decode and analyse the location services network traffic of a jailbroken iPhone 8 (iOS 16.7.11).

Keywords: Mobile OS Privacy, iPhone, Mobile Location Data, AI, Network Measurement

I. INTRODUCTION

Mobile location data is sensitive. Knowing where a person is at night and during the day usually reveals where they live and work, and visits to a clinic, a place of worship or a protest can reveal health, belief and political activity. Handset collection of location data has repeatedly proved unexpected, as shown by the penalties and settlements imposed on Google over its location tracking on Android [1, 2]. Previous measurement studies of location data have mostly focussed on Android and on third-party apps [3, 4]. To our knowledge there is no previous systematic measurement study of the location data that iOS itself sends to Apple that decodes the message contents. Apple's public documentation does not describe network connections, endpoints or message contents.

Measuring what a phone sends requires understanding what the data means. The traffic can be decrypted on a jailbroken handset, but it is binary-encoded protobuf for which the message schemas are not public, and so they must be recovered from the software that sends it. Apple's code is mostly Objective-C (ObjC) compiled to ARM64. Decompilers give crude output, and in practice the analysis is manual inspection of assembly. Reverse engineering of this kind is skilled, labour intensive and slow, and it is a barrier to independent scrutiny of what phones send. Using AI to assist with it, or even to replace it, is therefore attractive. Whether this is viable matters for forensic and privacy analysis generally, and not only for the present study.

Our main contributions are:

  1. Direct AI reverse engineering is not viable. We use two frontier models (Claude Opus 4.8, Codex GPT Sol 5.6) to reconstruct the schemas of protobufs observed in our traffic. The great majority of the schemas contain substantial errors, and these are hard to detect because the schemas are internally consistent. Direct AI use is therefore unsuitable for forensic and privacy analysis.

  2. AI-written analysis tools are viable when they can be validated. We use Claude to write a Python tool, appleprotobuf_extractor (“Extractor”), that recovers protobuf schemas from Apple’s binaries. We can make this reliable because we are able to validate the output. Namely, we reverse engineer the template that Apple’s protobuf classes follow, compile protobufs with known schemas to ARM64 with a compiler of the same era as the Apple code, and require Extractor to recover them exactly. We also check that (i) the recovered schemas decode our captured traffic to sensible values and (ii) they match previously published hand-decoded schemas. This validation needs reverse engineering and measurement of its own, so it is not free, but it is much less work than recovering the schemas by hand.

  3. Measurements of the location data sent to Apple. Using Extractor to decode the traffic of an iPhone 8 (iOS 16.7.11), we find that: (i) no message carries a direct identifier of the user or handset 1^{1}, (ii) with location on, the handset sends its precise position to Apple in reverse geocoding and Wi-Fi fingerprint lookups which carry the entry and exit times of visits, in Wi-Fi and cell lookups, and in batched uploads of GPS fixes and Wi-Fi and cell observations, (iii) usage telemetry carries session identifiers that persist for at least 106 days and so link a handset's records over months, and (iv) with location off, the MAC address of the connected Wi-Fi access point, a network identifier, is still sent, which locates the handset

Contact email: doug.leith@tcd.ie

1^{1}Handset model, OS version, locale and carrier name are transmitted but these can be expected to be shared by many phones and so not be individually identifying.

to tens of metres if Apple knows where that access point is. Apple’s documentation does not mention (iii) or (iv).

Extractor (plus associated tool ios_decoder and the extracted location services protobuf descriptors) are available on GitHub at https://github.com/doug-leith/ios-protobuf-decoding. Our AI analysis data (Section III), including the prompts used, and our network measurement data (Section V) are available on GitHub at https://github.com/doug-leith/ios-location-services-study-data.

The rest of the paper is organised as follows. We review related work, then evaluate direct use of two LLMs, Claude and Codex, for reverse engineering and describe Extractor and its validation. We then apply Extractor to Apple's location services: we describe the experimental setup and the architecture of the services, and analyse the location data sent, the sensor data uploads, the telemetry and the identifiers used, before comparing our observations with Apple's public documentation. We end with the limitations of our measurements and our conclusions.

References (34)