Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/internal/VENDORED-CODE.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ license text(s) they require under `LICENSES/`, and a `NOTICE.md`.
|---|---|---|---|---|---|---|
| serve-sim's capture, encode and HID-input pipeline — CoreSimulator framebuffer capture, the H.264 encode path and the `HIDInjector` that injects touches and keys, patched by us, with four files rewritten by us that stay serve-sim's modified files | `EvanBacon/serve-sim` | commit `6d009686ed08f7d8bd19bca9f9f67a9237931f44` | Apache-2.0 for serve-sim's files and our rewrites of four of them; MIT for the files that are ours entirely | `vendor/screen-capture/Sources/`, licenses at `vendor/screen-capture/LICENSES/serve-sim.APACHE-2.0.txt` and `…/idevice.MIT.txt` | the `simlock-screen-capture` and `simlock-device-capture` programs `pnpm build` puts in dist/bin, run by `src/drivers/ios/screen-capture.ts` and, in its `--input` mode, `src/drivers/ios/input/` | the `curl … \| diff -u -` command in [`vendor/screen-capture/NOTICE.md`](../../vendor/screen-capture/NOTICE.md), per file |
| the HEVC capability string the iPhone's media-stream offer advertises for payload 100 — one string inside one of our own files | `jkcoxson/idevice` | `master` at the time of taking; the string is what its receiver documents | MIT | `vendor/screen-capture/LICENSES/idevice.MIT.txt`, the string in `vendor/screen-capture/Sources/SimlockMediaBridge/SimlockMediaBridge.m` | `simlock-device-capture`, whose offer a physical iPhone accepts without painting torn pictures | the string in `Sources/SimlockMediaBridge/SimlockMediaBridge.m` against idevice's receiver, and its `LICENSE.txt` at `https://raw.githubusercontent.com/jkcoxson/idevice/master/LICENSE.txt` |
| simslim's category names, descriptions and launchd label lists — data inside one of our own files | `MobAI-App/simslim` | `7e374b38` (v0.14.0), `profiles.go` `Categories` | MIT | the header of `src/drivers/ios/slim-labels.ts` names the source and commit | `src/drivers/ios/` slim boots (ADR 0060 §6, ADR 0066 §6) | `gh api 'repos/MobAI-App/simslim/contents/profiles.go?ref=v0.14.0'` against `SLIM_CATEGORIES` |
| `scrcpy-server` — the Android screen-streaming server artifact, byte-identical to upstream's release asset | `Genymobile/scrcpy` | release `v5.0.1`; revision built `dc8a55a24c27ae78ae202b5a3288da681d0f141a` | Apache-2.0; the Kotlin standard library inside it adds BSD-3-Clause (ThreeTen-BP) and BSL-1.0 (Boost) code | `vendor/scrcpy/scrcpy-server-v5.0.1`, licenses at `vendor/scrcpy/LICENSES/scrcpy.APACHE-2.0.txt` and `vendor/scrcpy/LICENSES/threetenbp.BSD-3-Clause.txt`, digest in `vendor/scrcpy/SHA256SUMS.txt` | the Android driver's screen capture, which pushes it unmodified to a leased emulator; the client that drives it is ours, in `src/drivers/android/`, and is not vendored | `cd vendor/scrcpy && shasum -a 256 -c SHA256SUMS.txt`, and the same against upstream's own release `SHA256SUMS.txt`, whose GPG signature `vendor/scrcpy/NOTICE.md` says how to check |

`vendor/scrcpy/NOTICE.md` names what is *inside* that artifact besides scrcpy's
Expand Down
19 changes: 18 additions & 1 deletion src/drivers/ios/slim-labels.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,24 @@ describe("SLIM_CATEGORIES", () => {
}
});

it("matches simslim v0.13.0: navd is in widgets, and the never-disable labels are in no category", () => {
it("matches simslim v0.14.0: an unset slim set has 16 categories and 173 labels, and a set naming mdm has exactly its 3", () => {
const all = resolveSlimCategories(undefined).categories;
const other = SLIM_CATEGORIES.find((c) => c.name === "other");
const mdm = resolveSlimCategories(["mdm"]);

expect(all).toHaveLength(16);
expect(labelsFor(all)).toHaveLength(173);
expect(mdm.unknown).toEqual([]);
expect(labelsFor(mdm.categories)).toEqual([
"com.apple.RemoteManagementAgent",
"com.apple.managedassetsd",
"com.apple.remotemanagementd",
]);
expect(other?.labels).toContain("com.apple.accessibility.axassetsd");
expect(other?.labels).toContain("com.apple.ClipServices.clipserviced");
});

it("matches simslim v0.14.0: navd is in widgets, and the never-disable labels are in no category", () => {
const widgets = SLIM_CATEGORIES.find((c) => c.name === "widgets");
const slimmable = new Set(SLIM_CATEGORIES.flatMap((c) => c.labels));

Expand Down
20 changes: 16 additions & 4 deletions src/drivers/ios/slim-labels.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import { createHash } from "node:crypto";
// Data source: simslim (https://github.com/mobai-app/simslim), MIT licensed.
// Category names, descriptions, and launchd label lists below are copied
// verbatim from `Categories` in profiles.go at commit
// d594c230fe9ed5080189b0ce76afabda6104bae0 (v0.13.0), the source simslim
// uses to disable background daemons; Simlock writes them into the
// simulator's launchd overrides file before its one boot (ADR 0060).
// 7e374b38 (v0.14.0), the source simslim uses to disable background
// daemons; Simlock writes them into the simulator's launchd overrides file
// before its one boot (ADR 0060, ADR 0066).
//
// Apple renames, adds, and removes these daemons between iOS runtime
// versions, so this list is versioned *data*, not code: it is expected to
Expand Down Expand Up @@ -265,9 +265,19 @@ export const SLIM_CATEGORIES: readonly SlimCategory[] = [
"com.apple.devicecheckd",
],
},
{
name: "mdm",
description: "Declarative device management and managed asset services.",
labels: [
"com.apple.remotemanagementd",
"com.apple.RemoteManagementAgent",
"com.apple.managedassetsd",
],
},
{
name: "other",
description: "Wallet, business services, assets, and miscellaneous background daemons.",
description:
"Wallet, App Clips, business services, assets, and miscellaneous background daemons.",
labels: [
"com.apple.financed",
"com.apple.passd",
Expand All @@ -283,6 +293,8 @@ export const SLIM_CATEGORIES: readonly SlimCategory[] = [
"com.apple.countryd",
"com.apple.mobileassetd",
"com.apple.managedconfiguration.passcodenagd",
"com.apple.accessibility.axassetsd",
"com.apple.ClipServices.clipserviced",
],
},
];
Expand Down
2 changes: 1 addition & 1 deletion website/src/content/docs/docs/reference/configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ The warm pool never downloads. A gateway never asks a worker to download for a l
| Key | Type | Default | Meaning | Applies to |
| ---------------------------------- | ---------------------------------- | -------------------------------- | --------------------------------------------------------------------------------------------------------- | ---------- |
| `ios.defaultMode` | `slim` or `full` | `full` | Device mode for an iOS request that names none. The worker makes both kinds either way. | Worker |
| `ios.slim.categories` | list of strings | every category | Which groups of simulator services a slim device has turned off: `widgets`, `siri`, `search`, `icloud`, `store`, `pim`, `web`, `family`, `health`, `photos`, `apps`, `messaging`, `connectivity`, `telemetry`, `other`. Narrowing the list turns the dropped services back on the next time a device is prepared. | Worker |
| `ios.slim.categories` | list of strings | every category | Which groups of simulator services a slim device has turned off: `widgets`, `siri`, `search`, `icloud`, `store`, `pim`, `web`, `family`, `health`, `photos`, `apps`, `messaging`, `connectivity`, `telemetry`, `mdm`, `other`. Narrowing the list turns the dropped services back on the next time a device is prepared. | Worker |
| `ios.slim.bootTimeoutMs` | positive number | `600000` (10 min) | Boot deadline for a slim iOS device, which boots once. | Worker |
| `ios.full.bootTimeoutMs` | positive number | `300000` (5 min) | Boot deadline for a full iOS device: a new device, a recovery boot and the boot that makes a seed. Counted from the end of `simctl boot`. | Worker |
| `ios.defaultModels.<class>` | model name, or non-empty list | not set | iOS models to try first for a class (`phone`, `tablet`, `watch`, `tv`, `vision`, `auto`, `desktop`), most preferred first, before Simlock's own list. A key that is not a class stops the daemon from starting. | Worker |
Expand Down
2 changes: 1 addition & 1 deletion website/src/content/docs/docs/worker/capacity.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ simlock daemon start

A slim iOS simulator has background services turned off that most agent work does not need, such as widgets, Siri, Spotlight, iCloud, the App Store, mail, Photos and telemetry. It uses much less RAM.

An agent asks for one with `simlock lease --mode slim`. A lease that names no mode gets `ios.defaultMode`, which is `full`. To turn off only some groups of services, list them in `ios.slim.categories` (`widgets`, `siri`, `search`, `icloud`, `store`, `pim`, `web`, `family`, `health`, `photos`, `apps`, `messaging`, `connectivity`, `telemetry`, `other`).
An agent asks for one with `simlock lease --mode slim`. A lease that names no mode gets `ios.defaultMode`, which is `full`. To turn off only some groups of services, list them in `ios.slim.categories` (`widgets`, `siri`, `search`, `icloud`, `store`, `pim`, `web`, `family`, `health`, `photos`, `apps`, `messaging`, `connectivity`, `telemetry`, `mdm`, `other`).

What to expect:

Expand Down
Loading