seemoo-lab / openhaystack

Build your own 'AirTags' 🏷 today! Framework for tracking personal Bluetooth devices via Apple's massive Find My network.
https://owlink.org
GNU Affero General Public License v3.0
8.49k stars 465 forks source link

Restore the accessories from a backup #101

Closed mowtschan closed 2 years ago

mowtschan commented 2 years ago

I created a full backup from my old macbook with SuperDuper! app. Is it possible to restore the accessories from that backup?

Thanks!

mowtschan commented 2 years ago

Does accessories get stored here /Users/[username]/Library/Keychains/login.keychain-db ?

Sn0wfreezeDev commented 2 years ago

The easiest way would be to export the accessories and import them in the app. The accessories are currently stored in the macOS keychain, but I am no expert in restoring keychain items from a backup, maybe keychain access offers such a feature?

This is how we identify the accessories:

kSecAttrLabel: "FindMyAccessories",
kSecAttrService: "SEEMOO-FINDMY",

https://github.com/seemoo-lab/openhaystack/blob/cf5103f62fab29089c13174976cdb272d472eed5/OpenHaystack/OpenHaystack/HaystackApp/KeychainController.swift

mowtschan commented 2 years ago

I was able to import FindMyAccessories item with the native keychain tool! Works! Thanks!

digitaltrousers commented 2 years ago

The easiest way would be to export the accessories and import them in the app.

I'm a bit confused by all the different keys in the app. Could you please describe which ones to export in order to back up? Thanks.

digitaltrousers commented 2 years ago

Never mind, I found the import and export buttons in the app (box with arrow icons in top-left corner).