Tomacco

Docs Legal notes

Legal notes#

This document describes Tomacco's intended purposes, included materials, Apple software prerequisites and changes to software protections. It is not legal advice or a legal clearance of the project. Applicable agreements, copyright and anti-circumvention rules depend on the software, the activity and the jurisdiction. A disclaimer cannot settle those questions or remove obligations imposed by law.

On this page (9)

Licenses of the components are in THIRD_PARTY_NOTICES.md. Network use and stored data are covered in privacy.md.

Purpose#

Tomacco is a development workbench. Its iOS parts exist for three things:

It is not meant for running iOS for someone else as a service, for distributing Apple software, for working around App Store purchases or DRM, or for gaining access to devices, accounts or data that are not yours.

What is included, and what is not#

Included (source tree and the CMake/install.py packages):

Not included: Apple firmware, iOS, cloudOS or macOS images, kernels, dyld shared caches or extracts of them, Mach-O binaries from Apple, the Xcode SDK, Apple headers, encryption keys, signing certificates or provisioning profiles. There are no built emulator engines either. The package test (tests/python/test_install.py) fails the build when a packaged file is not text. The documentation describes what was observed in disassembly in prose, with short offsets, symbol names and log lines. It does not reproduce Apple's code. Binaries and full disassembly stay in ignored local directories (.tooling/, references/), which are never committed or packaged.

What you supply#

Everything that comes from Apple, you have to provide yourself:

Obtain these only from Apple or in another lawful way, and only for uses that the license you got them under permits. Tomacco cannot give you any right to Apple's software. Be aware of the following:

Running these images in QEMU on a Linux PC, or using the Xcode SDK on Linux, may therefore fall outside Apple's license terms. Whether such a term can be enforced against you depends on where you live and how you use the software. For example, Articles 6 and 8 of Directive 2009/24/EC provide conditional protection for specified interoperability activities; they do not establish that this runtime or every documented use meets those conditions. Check the applicable terms and legal requirements before using the iOS features.

Download sources and permission#

The image preparation guide records how the measured builds were located. ipsw.me is the iPhone firmware catalog; Lakr233/vphone-cli records the PCC cloud264 URL in its source. Both recorded image URLs point to Apple's updates.cdn-apple.com CDN. The independent blacktop/ipsw tool can look up, download and prepare files; using it does not grant any rights to those files. Tomacco provides no firmware mirror.

These facts establish download provenance and technical compatibility, not a legal entitlement to download, decrypt, modify, run or redistribute Apple software. A public URL, an Apple-signed image, owning an iPhone or Mac, or calling an activity "research" does not by itself establish permission for this Linux runtime. Any applicable statutory exception has its own conditions. Read the terms that accompany your particular software before downloading or using it; Apple's license directory notes that the agreement supplied with a product may differ from its currently published copy.

The instructions do not claim Apple authorization for Tomacco or general iOS app development under the PCC research terms. Images, decrypted components, keys and boot tickets stay outside Tomacco's repository and release packages.

Source attribution, keeping Apple images out of packages and stating an interoperability purpose do not by themselves resolve licensing, copyright or anti-circumvention issues for users or maintainers. Before distributing or relying on the iOS runtime, obtain qualified legal advice covering its implementation, protection changes, documentation, packaging and intended use in the relevant jurisdictions. This notice does not promise that those activities are lawful or that any party is protected from a claim.

Parts that change Apple's protections#

The research runtime does not use any Apple signing or activation server and does not create valid Apple signatures, certificates or provisioning profiles. To run your own code in the guest, it changes or bypasses the following, always on private copies of images you supplied and only with explicit options:

PartWhat it doesWhere
Secure boot chainThe engine starts the supplied kernelcache and SEP firmware directly. Apple's boot ROM, LLB and iBoot do not run, so the signature and personalization checks they would apply to those images are not applied.jprx/qemu-sptm (hw/arm/xnuboot_sptm.c), vphone-loader.patch, vphone-sep-loader.patch
Research and development device identityios.emulator.prepare_guest_tools sets /chosen/sec-research-device-erm-enabled in the copied device tree. With development_device: true it also sets the certificate, AP and SEP security-mode properties to a non-production, development identity (it refuses a production identity). The unchanged MobileActivation daemon then takes its own local development-device path and reports the device as Activated. Apple's activation service is not contacted, and no daemon, response or activation record is patched.tools/ios_guest_tools.py (virtual_research_mode), tools/prepare_ios_guest_tools.py, guest-setup.h
Development-signing adapterLets the guest's installer accept ad-hoc signatures, but only for the bundle identifiers and CodeDirectory hashes compiled into the guest tools for your own apps.guest-development-signing.c
EntitlementsGuest tools and your apps are signed ad hoc, with entitlements taken from an allowlist. The guest tools' list includes Apple-private entitlements, such as com.apple.private.security.disk-device-access, com.apple.private.mobileinstall.allowedSPI and com.apple.private.xpc.service-attach. Your apps may only ask for the application and team identifier, get-task-allow, keychain access groups and app groups; Apple-private and platform entitlements are refused.storage-entitlements.plist, tools/build_ios_guest_tools.py, tools/ios_application_bundle.py
Trust-cache extensionAdds the CDHashes of your own guest tools and apps to a trust cache on the private disk copy.build_ios_research_bootstrap.py, build_ios_guest_tools.py
Kernel and daemon patches on copiesA few hash-pinned instruction words in a copied kernel or daemon. ios-gpu-mmap.S overrides Sandbox's file_check_mmap EPERM decision, and so allows an executable mapping, for a short list of pinned CDHashes (the Metal driver, its compiler and Tomacco's own adapters). Other patches pin the signing adapter and add workloop and fileport compatibility, RAM-disk byte counts and a restore format retry. The originals are never modified.ios-gpu-mmap.S, prepare_ios_adapter_pin.py, prepare_ios_*_compat.py, ios27-*.json, restore-*.S
Seal metadata pinsA research RAM disk accepts two specific system-volume Image4 containers by their SHA-384 hash, without checking Apple's signature, and says so in its log. Everything else still goes to the original verifier.restore-seal-pins.*, cryptex-seal-pins.S, ios_paravirt_seal.py
Device-tree and boot-manifest handlingAdjusts properties of a copied device tree, for example SEP loading and memory layout. Repackages existing Image4 payloads with a supplied local manifest and changes only the four-byte payload type. The packager copies that manifest unchanged.prepare_ios_paravirt.py, ios_paravirt_firmware.py
Local research manifest preparationReads a separately obtained public qemu-t8030/Inferno ticket template, sets local hardware declarations and firmware digests, and writes a new IM4M. The inherited signature is invalidated. No Apple signing request is made and no valid Apple ticket is created.prepare_ios_research_manifest.py
Pointer authenticationThe SPTM engine does not enforce ARM pointer authentication; Tomacco's qemu-arm-pauth-bypass-inline.patch keeps that behaviour and makes it faster. PAC is a CPU exploit mitigation, not a copy or access control.jprx/qemu-sptm, qemu-arm-pauth-bypass-inline.patch
Branch target identificationWith the boot option bti: off, which tools/ios_virtual_profile.py sets in every new profile, the emulated CPU reports no FEAT_BTI, so no guest code gets this protection, for speed. Like PAC, BTI is a CPU exploit mitigation, not a copy or access control.qemu-arm-bti-property.patch, tools/run_ios_paravirt.py (--bti)

The measured private setup used a locally modified IM4M research manifest. Its changed declarations invalidated the inherited Apple signature. A file accepted by this research runtime is therefore not evidence of an Apple-signed authorization for that VM. The setup instructions reproduce this local preparation with a separately downloaded public template. That template is third-party research material, not one of the Apple-hosted archive downloads, and is not included in Tomacco's repository or packages.

Nothing is decrypted: no GID or UID keys, no FairPlay, no encrypted payloads. Tomacco contains no decryption of Apple content. ios.emulator.prepare_userland requires an already decrypted disk image and refuses an encrypted (AEA) archive. The emulated AES engine advertises its hardware keys as unavailable; iOS's own data protection inside the guest uses the software keys iOS creates itself.

None of these parts touch a physical iPhone, remove protection from purchased apps or content, or give access to anyone else's device or data.

Guest networking. A boot does not reach the network unless its guest_network setting is nat, which is off by default. That setting attaches one virtio network device behind passt, which gives the guest outbound access through the host's own network, with no inbound port opened and the host's loopback services kept away (map-host-loopback=none). Because the guest's own protections are off (pointer authentication is not enforced, ad-hoc code runs), a networked guest is real internet exposure of an untrusted guest: keep it off unless an app under test needs the network, and do not run code in it that you do not trust.

Emulation as such. Writing an emulator, and the reverse engineering needed to make independent programs work with a platform, has repeatedly been held lawful: Sega v. Accolade, 977 F.2d 1510 (9th Cir. 1992); Sony v. Connectix, 203 F.3d 596 (9th Cir. 2000); Sony v. Bleem, 214 F.3d 1022 (9th Cir. 2000). In the EU, a program's functionality, programming language and data formats are not protected as such (CJEU, C-406/10 SAS Institute, 2012), and Directive 2009/24/EC allows a lawful user to observe and test a program (Article 5(3)) and to decompile it where that is indispensable for interoperability (Article 6); in Germany §§ 69d(3) and 69e UrhG, in Austria §§ 40d and 40e UrhG. These authorities may be relevant to independently written emulator code; their application depends on the facts and their specific conditions. They do not establish permission to use Apple's software or settle whether the protection changes listed above are allowed.

Measures like those changes can fall under anti-circumvention rules even when the copyright use itself is lawful:

The project's position is that its iOS parts serve interoperability and research, operate only on images the user supplies, and contain no Apple code. This repository contains no links to third-party copies of Apple firmware.

Your responsibilities#

No warranty#

Tomacco is distributed in the hope that it will be useful, but without any warranty, without even the implied warranty of merchantability or fitness for a particular purpose (GNU GPL, version 2, sections 11 and 12, and the corresponding sections of later versions). The virtual iOS device is an experimental research runtime. It can lose data in its disk copies and is not qualified for production use.

Trademarks#

Tomacco is an independent project. It is not affiliated with, endorsed by or sponsored by Apple Inc., Google LLC, Samsung Electronics, Meta Platforms, Genymobile, Appium or any other company whose products it works with. Tomacco is independent of the Omarchy project.

Apple, iPhone, iPad, iOS, iPadOS, macOS, Xcode, Swift, Metal, SpringBoard, Dynamic Island, App Store, App Store Connect, TestFlight and Apple silicon are trademarks of Apple Inc., registered in the U.S. and other countries. "IOS" is a trademark of Cisco and is used by Apple under license. Android, Google Play, Pixel, Android Studio and Flutter are trademarks of Google LLC. Galaxy is a trademark of Samsung Electronics Co., Ltd. QEMU is a trademark of Fabrice Bellard. Other names belong to their respective owners.

These names are used only to say which platforms, devices and tools Tomacco works with. Device profiles are named after the phones whose screen sizes they reproduce. Their frames are simple drawn shapes, not manufacturers' artwork. The Tomacco icon is original artwork. The virtual iOS device shows the user interface of the iOS image the user supplied. Tomacco does not ship that interface.

View this page as Markdown on GitHub