How To: Manually Export AirTags - parawanderer/OpenTagViewer GitHub Wiki

Manually Export AirTags from a Mac (or MacOS VM)

You can manually export AirTag data from a Mac (or MacOS VM) to a .zip file to then be able to import it into the OpenTagViewer Android app.

This process is relatively straightforward, though somewhat cumbersome. Use the MacOS Export App to make this quicker.

Prerequisites

A Mac or MacOS VM with Operating System version AT MOST Sonoma (14), where you are logged in as an Apple user who has access to your AirTags and can see them listed in the Mac FindMy app.

Check out the project sickcodes/Docker-OSX which allows you to set up a MacOS Sonoma (14) VM for free on Windows or Linux.

OR you can use MacOS 15 in combination with this script/repo: pajowu/beaconstorekey-extractor

Important

Note that in practice it is currently only known how to obtain the key information for AirTags belonging to the Apple Account that you are currently logged in as on your MacOS machine. In practice this means that you'll need to (temporarily) log in as the Apple Account that you used to register your AirTags on iOS (i.e. the "Owner" account).

The reason for this is that you will only get OwnedBeacons records for devices that the current Apple ID owns. For "Shared" devices that the current Apple ID does not own but were shared with the account via FindMy by the true owner account do not produce the same files (they produce SharedBeacons instead) which are missing the necessary keys to query the Apple network. (See issue #6)

Process

Summarized:

  1. Download & Run Script ⬇️
  2. Create some new folder 📂
  3. Copy Files from extracted data 🖨️
  4. Verify Folder Structure 👨‍💻
  5. Zip the Contents 🤐
  6. Import inside App 📱

1. Download & Run Script ⬇️

Option 1: 🐦 Swift Script (MacOS <= 14)
Download this script: airtag-decryptor.swift.

E.g. using wget:

wget https://gist.githubusercontent.com/airy10/5205dc851fbd0715fcd7a5cdde25e7c8/raw/87ed8dcc14a31f1748cce3214d5793583e007d24/airtag-decryptor.swift

And execute the script by running this command in the terminal on your MacOS machine. Swift should already be installed by default on MacOS.

swift airtag-decryptor.swift
Option 2: 🐍 Python Script (MacOS <= 14)
Alternatively to Swift, this python script can be used too, which will do a very similar job.

To use this script, you need to have Python and its dependencies installed:

brew install python3
pip install pycryptodome

You can then get the script:

wget https://raw.githubusercontent.com/parawanderer/OpenTagViewer/refs/heads/main/python/airtag_decryptor.py

And execute it:

python airtag_decryptor.py

The results will be output to ~/plist_decrypt_output by default. This folder will open when the export completes successfully!

Option 3: 🐦 Swift Script (MacOS >= 15)

For MacOS >= 15 you can export your data by follow the approach explained in this repo to extract the necessary data for your AirTags. Unlike the two approaches above, this will require disabling MacOS security features temporarily and rebooting a few times.

The final script that you will execute will open a folder containing the decrypted files.

Either script will open a folder once it is complete, and this folder will contain some MacOS decrypted cache data, which includes data about "Beacons" -- i.e. FindMy devices.

The folder structure should contain files in this format:

<generated output folder>/
├── BeaconNamingRecord/
│   ├── <UUID 1>/
│   │   └── <UUID 2>.plist
│   └── ...
├── OwnedBeacons/
│   ├── <UUID 1>.plist
│   └── ...
└── ...

Observe that every possible OwnedBeacons/<UUID 1>.plist file matches to a folder BeaconNamingRecord/<UUID 1>. This latter folder contains one more .plist file inside, which is named with some other UUID <UUID 2>.

2. Create some new folder 📂

Create some new folder anywhere and with any chosen name, e.g. my-exported-files

mkdir ~/my-exported-files

3. Copy Files from extracted data 🖨️

Copy Needed Folders

From the folder that was created in step 2, copy all of the following files/folders into your my-exported-files folder (you can ignore all the other folders like BeaconEstimatedLocation, CKTokens, KeyAlignmentRecords, etc.):

  1. Everything in the BeaconNamingRecord folder
  2. Everything in the OwnedBeacons folder
cp -r ~/plist_decrypt_output/OwnedBeacons  ~/my-exported-files
cp -r ~/plist_decrypt_output/BeaconNamingRecord ~/my-exported-files

Replace ~/plist_decrypt_output with your decoded results output folder name.

Add Metadata File

Inside the my-exported-files folder, you should now have just the two folders: BeaconNamingRecord and OwnedBeacons

Add a file: OPENTAGVIEWER.yml with this content in the my-exported-files folder:

version: 1.0.0
via: Manually Created Zip File Following Wiki Guide
sourceUser: <your name goes here>
exportTimestamp: <go to this page: https://currentmillis.com/ and copy the big number starting in 17423...>
  1. Replace <your name goes here> with your name: e.g. [email protected]
  2. Replace <go to this page: https://currentmillis.com/ and copy the big number starting in 17423...> with the Unix Time in Milliseconds. You can get this number from this website: currentmillis.com

Example content looks like this:

version: 1.0.0
via: Manually Created Zip File Following Wiki Guide
sourceUser: [email protected]
exportTimestamp: 1742348341938

Here's a convenient shell command to create this file for you:

touch ~/my-exported-files/OPENTAGVIEWER.yml

EXPORT_TIME="$(date +%s)000"

cat > ~/my-exported-files/OPENTAGVIEWER.yml << EOF
version: 1.0.0
via: Manually Created Zip File Following Wiki Guide
sourceUser: $USER
exportTimestamp: $EXPORT_TIME
EOF

4. Verify Folder Structure 👨‍💻

Verify that the file structure you have in your my-exported-files now looks like this

my-exported-files/
├── BeaconNamingRecord/
│   ├── <UUID>/
│   │   └── <UUID>.plist
│   ├── <UUID>/
│   │   └── <UUID>.plist
│   └── ...
├── OwnedBeacons/
│   ├── <UUID>.plist
│   ├── <UUID>.plist
│   └── ...
└── OPENTAGVIEWER.yml

5. Zip the Contents 🤐

While inside of the my-exported-files folder, select everything and zip it into a .zip file of any name, e.g. my-exported-files.zip

(cd ~/my-exported-files && zip -r -X "../my-exported-files.zip" .)

This .zip can now be imported inside of the OpenTagViewer app.

6. Import inside App 📱

👉 See this wiki page

⚠️ **GitHub.com Fallback** ⚠️