Repository navigation
Conversation
A C++ port of sacca97/os-findmy-e's adi-core (MIT, see macadi/NOTICE.md): a Mach-O loader, a Unicorn x86_64 VM with the few pieces of macOS userland the library calls, and the CoreADI dispatcher framing. Unicorn 2.1.4 (GPL-2.0) is fetched at build time, pinned by SHA-256, and linked only into libmacadi.so. The library itself is never in the repository or the build. In iTunes 12.8.3 for Mac the package holding it is stored uncompressed and contiguous, so it is one HTTP range request of 3.5 MB; scripts/locate_mac_coreadi.py re-derives the offsets and checks both pinned hashes, and macadi-host.yml builds the core for the host and loads the library into it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012JDrrt9ff7WwPepHs6B2Gx
Since 2026-10-12 Apple issues searchPartyToken only to Mac- or iPhone-minted Anisette, and the edge now refuses any client claiming Android, so the Android ADI path cannot reach Find My. EmulatedMacAnisette fetches the macOS library from Apple, provisions one emulated Mac with akd's headers, keeps its identity and store for the life of the install, and is what AppDependencies hands out. Also: read Grand Slam's hsc 409 without au as a second factor; send the routing number Apple assigned at provisioning; give CloudKit a UUID, since a Mac's device id is not one; drop the legacy adi.pb before every session, which otherwise made a freshly provisioned machine report unprovisioned (ec -80009). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012JDrrt9ff7WwPepHs6B2Gx
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012JDrrt9ff7WwPepHs6B2Gx
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #248.
Since 2026-10-12 Apple only issues the Find My token (
searchPartyToken) to a sign-in whose Anisette machine was minted by a Mac or an iPhone. An Android-minted machine getsmmeAuthTokenalone and report fetches return 401 (malmeloo/FindMy.py#278). Since about 2026-10-20 the GSA edge also returns 503 for anyX-MMe-Client-Infowhose OS token isAndroid(probe results on #261). So the Android ADI libraries can't reach Find My any more, whatever headers are sent.This runs Apple's macOS CoreADI on the phone instead, under an x86_64 emulator - the "derived library that can be run on android directly" from #248, built off sacca97/os-findmy-e.
How it works
libmacadi.so(app/src/main/cpp/macadi/): a C++ port of os-findmy-e's Rustadi-core- Mach-O loader, Unicorn x86_64 VM with the handful of macOS calls the library makes, and the CoreADI dispatcher framing. Unicorn 2.1.4 is fetched by CMake at build time, pinned by SHA-256, and only linked into this library.CoreADI.pkgpayload is stored uncompressed and contiguous, so a single HTTP range request gets it. The payload and the extracted library are both pinned by SHA-256.scripts/locate_mac_coreadi.pyre-derives the offsets (from Apple, or from a local copy of the DMG) and reads its constants from the Java sources. Nothing of Apple's is in the repo or the APK.EmulatedMacAnisettereplacesLocalAnisetteinAppDependencies. It provisions one emulated Mac withakd's headers (from os-findmy-e'sgsa.py), keeps its identity and ADI store underfiles/anisette/mac/for the life of the install, and serves the OTP, machine id and Apple-assigned routing number to the existing Python sign-in.hsc409 with noauon GSAcompleteis treated as a second factor (the pinned FindMy.py otherwise skips 2FA); the routing number comes from Java; CloudKit and the keychain session get a view of the account whosedevice_uuidis a UUID, because a Mac's device id (00006000-…) isn't one and FindMy.py's CloudKit client parses it as one.Things to decide
libmacadi.socarries GPL-2.0 code. The ported code is os-findmy-e's (MIT); its notice is inapp/src/main/cpp/macadi/NOTICE.md.0PENTAGV…, as before). Apple could start fingerprinting this; it has changed the rules four times in five weeks.LocalAnisetteis left in place but unused. Happy to remove it, or keep it as a fallback if Apple relaxes the Android rule.Testing
adi.pbin the store, and while it exists the library reports "not provisioned", so the first sign-in after provisioning sent an empty machine id (ec -80009);badly formed hexadecimal UUID string).macadi-host.yml, which range-fetches the library from Apple exactly as the app does, checks both hashes, builds the native core for the host and loads the library ("not provisioned").MacCoreAdiFetcherTest(cpio walk, universal-binary slice, refusing a server that ignores the range),test_emulated_mac.py(409 shim, routing, CloudKit device id view).Not verified: how long a provisioned emulated Mac and its token stay accepted over days; more than one account; the instrumented suite exercises none of this because it fakes the Anisette source; and a byte-for-byte comparison of the C++ port against os-findmy-e's output (the device sign-in is the evidence it behaves the same).
Credit to @sacca97 for os-findmy-e, which this is ported from, and to @hoorayman and @poterpan on #248 for establishing that a Mac-minted machine is what gets
searchPartyToken.🤖 Generated with Claude Code