Skip to content

feat: device management category, App Clips and accessibility assets in other - #66

Merged
Interlap01 merged 1 commit into
MobAI-App:mainfrom
vitalyiegorov:mdm-category
Nov 4, 2026
Merged

Interlap01 merged 1 commit into
MobAI-App:mainfrom
vitalyiegorov:mdm-category

Conversation

@vitalyiegorov

Copy link
Copy Markdown
Contributor

We run iOS simulators for CI on a shared Mac Studio farm through simlock, which copies simslim's categories verbatim. When we went looking for what was still resident in an already-slim simulator, a few daemons outside the allowlist stood out. This PR adds the ones that are safe to persist:

  • a new mdm category: com.apple.remotemanagementd, com.apple.RemoteManagementAgent, com.apple.managedassetsd (managedconfiguration.profiled and devicemanagementclient.mdmd stay untouched);
  • com.apple.accessibility.axassetsd and com.apple.ClipServices.clipserviced added to other;
  • mdm and app-clips doctor features, so doctor --requires can report the breakage;
  • README "What you lose", the category table and docs/category-memory.md updated with the numbers below.

Measurements

These numbers come from simslim measure, run by a build of main (d594c23) and of this branch. The device was a fresh iPhone 17 Pro on iOS 26.5 (23F77), in a private device set on a Mac mini. Each configuration got simslim off, then simslim on [--except …], then a clean shutdown and boot, a 20 s settle and three samples. I ran three rounds and report the median sample of each round:

Configuration Round 1 Round 2 Round 3 Median Processes
main, fully slim 892.7 904.3 906.0 904.3 MiB 72
this branch, fully slim 847.3 844.3 888.6 847.3 MiB 66
this branch, --except mdm 857.1 859.3 863.8 859.3 MiB 67
this branch, --except other 1070.2 1091.3 1064.9 1070.2 MiB 84

So a fully slim simulator is about 57 MiB (6%) smaller, with 6 fewer processes. The category estimates are 12 MiB for mdm (shown as 10) and 223 MiB for the extended other (shown as 225). On our farm's iOS 26.2 simulators, which had been running tests, these same daemons used more. The device-management daemons alone came to about 149 MB across their processes, and axassetsd to about 68 MB, so the fresh-boot numbers above are the conservative ones.

With the branch's full profile, I checked that the following still work: simctl openurl https://…, launch, privacy grant, status_bar override/clear and io screenshot. SpringBoard, backboardd and locationd kept their PIDs across a 110 s idle. The launchd log showed 2 failed lookups for the new labels and no retry loop. verify matches after on, and the overrides for these labels survive a later simctl boot.

What I left out, and why

  • The iPhone-side Watch companion daemons. These are the 17 labels CoreSimulator writes as explicit-enabled into disabled.plist: NPKCompanionAgent, appconduitd, pairedsyncd, bulletindistributord, eventkitsyncd and others. Six of them are resident at idle. simslim on disables them for its own boot, through the launchctl fallback. On the next simctl boot, though, CoreSimulator rewrites all 17 back to false and they start again. A category made of them would drift after every reboot and fail verify, so I didn't add one.
  • Your forbiddenLabels. They still hold on iOS 26.5. As a cross-check, I persisted launchctl disable for sleepd, dmd, ManagedSettingsAgent, routined, biomesyncd, mobiletimerd and the nano* registry daemons on a throwaway simulator. bootstatus never returned. SpringBoard looped on com.apple.sleepd.sleepserver, and appprotectiond looped on com.apple.dmd, about 8.6k failed lookups each in the tail of launchd.log.

Checks

go test ./... and go vet ./... pass on macOS 26.5. The new TestSlimProfileReportsMDMAndAppClipsUntilExcepted failed before the features existed. I didn't run swift-format or make app, since nothing under gui/ changed and the app decodes categories dynamically.

TestReadLaunchdRetriesATimedOutRead failed once in a full run on that Mac mini. It also fails on unmodified main with -count=5, and passes when run alone, so it looks like an existing timing flake on a loaded host rather than something this PR touches.

I only checked iOS 26.5 on an iPhone 17 Pro. I'm happy to split axassetsd/clipserviced into their own category if you'd rather not grow other.

…in other

Add an `mdm` category for remotemanagementd, RemoteManagementAgent and
managedassetsd, and move axassetsd and clipserviced into `other`. On an
iPhone 17 Pro / iOS 26.5, a fully slim simulator drops from 904.3 to
847.3 MiB and from 72 to 66 processes (median of three clean-boot rounds,
`simslim measure`).

profiled and mdmd stay untouched. New `mdm` and `app-clips` doctor
features report the breakage, and the README and category-memory doc carry
the measured estimates and what each change costs.

@Interlap01 Interlap01 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants