App Sandboxing

App sandboxing is a security model in which the operating system confines each application to its own isolated environment, so that an app cannot freely read or modify other apps’ data, reach arbitrary parts of the file system, or escalate its own privileges. It is the foundational defense behind modern mobile platforms: it lets a device run untrusted, downloaded code from many vendors while limiting the damage any single app can do.

Apple’s Platform Security guide describes the model directly for iOS, iPadOS, and visionOS: “All third-party apps are sandboxed,” a design intended “to prevent apps from gathering or modifying information stored by other apps or from making changes to the device.” Each app is given “a unique home directory for its files, which is randomly assigned when the app is installed,” keeping each app’s data separate. The guide notes that the system reinforces this with a read-only system partition, a nonprivileged user account for system files, and APIs that “don’t allow apps to escalate their own privileges,” alongside memory protections such as address space layout randomization and the Execute Never feature.

Android builds its sandbox on the underlying Linux kernel. As the Android Open Source Project documentation explains, “Android assigns a unique user ID (UID) to each Android app and runs it in its own process,” reusing “standard Linux facilities such as user and group IDs that are assigned to apps.” Because enforcement lives in the kernel, the boundary holds regardless of how an app is written; the documentation stresses that “native code is as sandboxed as interpreted code.” Over successive releases Android layered on additional controls, including SELinux mandatory access control, seccomp-bpf system-call filtering, and tighter filesystem restrictions.

The two platforms share a philosophy of defense in depth: no single mechanism is treated as unbreakable, so isolation is layered. Sandboxing also works hand in hand with the curated app-distribution model and a capability or entitlement system, in which an app must explicitly request access to sensitive resources such as the camera, location, or contacts rather than having it by default. Together these turn a phone full of third-party code into a system where each app operates inside its own walled garden.