Commit Graph

134 Commits

Author SHA1 Message Date
Mike A.
325c831a5c feat: export more classes 2025-09-11 16:33:16 +02:00
Mike A.
e8d05b69bf refactor: combine utils into single import internally 2025-09-11 16:29:01 +02:00
Mike A.
2f1ca10def feat: export all classes in top-level package 2025-09-11 16:19:23 +02:00
Mike Almeloo
21bcb89bbd Merge branch 'main' into fix/accessory-key-drift 2025-09-08 00:51:18 +02:00
Mike A.
066fd0a714 fix: resolve typing issues in scanner 2025-09-06 21:56:19 +02:00
Mike A.
48007752af fix: Make examples work 2025-09-06 21:40:08 +02:00
Mike A.
05ea2c9a74 feat: re-introduce location history 2025-09-06 21:29:00 +02:00
Mike A.
fbaf57ed09 feat!: implement key alignment algorithm for accessories
BREAKING: due to fundamental issues with Apple's API, this commit also DEPRECATES the `fetch_[last_]reports` methods on Apple account instances. It has been replaced by a method named `fetch_location`, which only returns a single location report (the latest one) and does not support setting a date range.
2025-09-05 00:36:37 +02:00
pablobuenaposada
aab830cda4 Resolve versioned tests and update the required dependencies for python <3.11
- The github action that runs pytest in every python version was actually running pyhton 3.13 for all the cases, so it was useless
- The docs uses myst-parser==4.0.1 which is only supported in python >=3.10 and sphinx==8.2.3 which is only supported in python >=3.11, so both dependencies had been attached to needed python version so uv sync doesn't complain anymore
- No need of tool.uv.dependency-groups.docs anymore
- Rest of the changes are related to some imports not available in python 3.9 and 3.10
2025-08-17 11:53:13 +02:00
Mike A.
e992df7f88 feat: dump alignment info when importing accessories 2025-08-08 21:59:31 +02:00
Mike A.
32686a898d fix: include alignment parameters in accessory json 2025-08-07 21:21:21 +02:00
Mike A.
f771ad97d5 refactor: abstraction for plist reading 2025-08-07 21:06:48 +02:00
Mike A.
1d3affb3c2 Merge branch 'main' into pajowu/aligment 2025-08-07 20:46:31 +02:00
Mike A.
e2978b66a0 docs: hide typevar definitions 2025-08-05 15:08:56 +02:00
Mike A.
def535f819 docs: somewhat fix references in source code 2025-08-04 16:16:30 +02:00
Mike Almeloo
55c111073d Merge pull request #148 from malmeloo/feat/better-serialization
Make more objects `Serializable`
2025-08-03 21:46:05 +02:00
Mike A.
2e6f70d199 feat: add session managers 2025-08-03 21:45:04 +02:00
Mike A.
9017efc7be refactor: specialize Serializable subclasses for stronger type safety 2025-08-03 21:42:08 +02:00
Mike A.
543ffe64a3 feat: make FindMyAccessory serializable 2025-08-01 18:05:07 +02:00
Paul Bargewell
e15356c4a7 [fix] QA issues (BLE001) 2025-07-25 14:03:54 +01:00
Paul Bargewell
eba90b56a4 Fix unclosed aiohttp client session warnings
- Add proper session state management to HttpSession, RemoteAnisetteProvider, and AsyncAppleAccount
- Implement idempotent close() methods with _closed flags
- Improve cleanup order and error handling
- Prevent new session creation after close() is called

Fixes resource leaks and eliminates aiohttp unclosed session warnings.
2025-07-25 13:52:08 +01:00
Mike A.
07a3fed11e feat: make LocationReport serializable 2025-07-23 20:24:34 +02:00
Mike A.
cbea476226 feat: make KeyPair serializable 2025-07-23 20:04:31 +02:00
Mike A.
21ef4fe292 Merge remote-tracking branch 'refs/remotes/origin/main' into feat/better-serialization 2025-07-23 19:48:38 +02:00
Mike A.
c8a3605dd3 fix: add guard against incorrect account data deserialization 2025-07-23 19:45:24 +02:00
Mike Almeloo
5c117ddce2 Merge pull request #113 from shreyasminocha/pubkey-ble-conversion
Add BLE ad data generation method
2025-07-18 16:25:34 +02:00
Mike A.
50bd844955 refactor: split adv data method into BLE and OF variants 2025-07-18 16:22:18 +02:00
Mike A.
5d2fd04515 fix: make scanner work with Python 3.13 2025-07-18 16:11:20 +02:00
Mike Almeloo
715b01c165 Merge pull request #144 from malmeloo/feat/migrate-api
feat!(reports): Migrate to new acsn API
2025-07-18 15:02:45 +02:00
Mike A.
bbdd784e6a feat(reports): allow passing Anisette libs path when loading account from JSON 2025-07-14 22:21:21 +02:00
Mike A.
0118666f53 feat(reports): make BaseAppleAccount and subclasses Serializable 2025-07-14 22:10:47 +02:00
Mike A.
c37a51c2eb refactor(reports): improve Serializable base class 2025-07-14 22:10:14 +02:00
Mike A.
a2c3b3136e feat(reports): implement local Anisette provider 2025-07-11 15:04:32 +02:00
Mike A.
e74197372f fix(reports): split key queries into devices
Apple only returns up to 20 location reports per device.
2025-07-10 16:25:30 +02:00
Mike A.
5e64915621 feat!(reports): Migrate to new acsn API
Apple no longer returns the `published_at` and `description` fields on location reports, so these have been deprecated.
2025-07-08 13:19:14 +02:00
Mike Almeloo
bfe58bda1f Merge pull request #130 from NickCrews/decrypt-plist
feat: add plist.py for decrypting the .plist files to FindMyAccessory
2025-06-14 16:25:10 +02:00
ivanik
a2d705cfe5 Update fetch_reports to accept lists with HasHashedPublicKey and RollingKeyPairSource at the same time 2025-06-11 22:17:26 +05:00
Mike Almeloo
4b1dfcc197 Merge pull request #131 from NickCrews/account-json
feat: adjust the ser/deser logic of AppleAccount
2025-05-27 15:32:20 +02:00
Nick Crews
6de83e81ac chore: use loggers, not top-level logging
Aslo fix up a few other ruff lint errors.
2025-05-25 18:14:56 -06:00
Nick Crews
5142350241 feat: adjust the ser/deser logic of AppleAccount 2025-05-25 17:51:24 -06:00
Nick Crews
c541d8f6fa improve help message for CLI 2025-05-25 17:26:17 -06:00
Nick Crews
c4f3bba9c2 adjust the API of the decrypt CLI 2025-05-25 17:15:03 -06:00
Nick Crews
0defad71b3 feat: add plist.py for decrypting the .plist files to FindMyAccessory 2025-05-25 16:46:12 -06:00
pre-commit-ci-lite[bot]
6c7a644897 [pre-commit.ci lite] apply automatic fixes 2025-04-15 13:24:21 +00:00
pajowu
ed098cc8ce Add option to align FindMyAccessories key generation
Sometimes the key generation diverges for example if the accessory has no power. FindMy solves this be re-aligning the key generation if a btle connection is established. FindMy.app stores there alignment records in the `KeyAlignmentRecord` directory.

This PR extends the FindMyAccessory class to read those records during `from_plist`-generation and re-sync the key generation by this
2025-04-15 15:23:36 +02:00
Mike Almeloo
0d58abafee Merge branch 'main' into migrate-uv 2025-04-08 13:41:37 +02:00
Mike Almeloo
515c3dfd53 Merge pull request #105 from malmeloo/multi-accessory-fetching
feat: Support fetching of multiple accessories at once
2025-04-08 13:39:56 +02:00
Mike A.
ed4ff77003 chore: make ruff / pre-commit happy 2025-02-27 22:34:30 +01:00
pre-commit-ci-lite[bot]
f40bd49ab7 [pre-commit.ci lite] apply automatic fixes 2025-02-27 21:06:51 +00:00
Shreyas Minocha
f141ec3700 Replace new example with HasPublicKey method 2025-02-24 23:26:03 -05:00