Skip to content

Interview question · Mobile Application Security

Compare the Android and iOS security models. What does each platform guarantee an app, and what does it not?

Both platforms sandbox apps and require signing; they differ in who decides what runs and how fast fixes arrive. Interviewers want the shared model first, then the differences that change a threat model.

easyEssentialNewPreparation tags: Apple, Google, MetaUpdated Nov 2026

TL;DR: Both platforms run each app in a sandbox with its own identity and private storage, require code signing, gate sensitive resources behind permissions, and offer hardware-backed key storage. Android isolates apps by giving each its own Linux user ID plus SELinux policy, allows installation from sources other than Google Play, and depends on device makers and carriers to ship updates, so the installed base runs many patch levels. iOS confines apps with a kernel-enforced sandbox profile and entitlements, enforces code signing on every executable page, and controls distribution and updates centrally, which shrinks fragmentation but concentrates trust in Apple. Neither platform protects an app from a user who controls their own device, so server-side checks stay authoritative on both.

How to approach it

Lay out the common model (sandbox, signing, permissions, secure storage, platform-mediated communication), then the differences that matter for threat modelling: distribution, update speed, isolation mechanism and how much the device owner can change. End with the assumption both share: the client is not trustworthy for decisions the server should make.

A strong answer

FIG · ANDROID VERSUS iOS · SAME GOALS, DIFFERENT TRADE-OFFS
Both sandbox and sign; they differ in openness and update control

Android

Per-app Linux UID

+ SELinux policy

Sideloading allowed

Play and other stores

Malware distribution outside Play

OEM updates

uneven patch levels

Long tail of unpatched devices

Outcome, safe: Flexible, fragmented

Mainline modules shorten some update paths

iOS

Sandbox profiles

+ entitlements

Code signing every page

App Store review

Unsigned code cannot run

Apple ships updates

fast adoption

Outcome, safe: Uniform, closed

Attacks shift to zero-click chains and social engineering

What both provide.

PropertyAndroidiOS
App isolationPer-app Linux UID, private data directory, SELinux domainsSandbox profile per app container, enforced by the kernel's mandatory access control
Code identityAPK signing; signature decides updates and signature-level permissionsCode signing by Apple-issued certificates, checked at load and on executable pages
CapabilitiesRuntime permissions (camera, location, contacts) granted by the userEntitlements in the signature plus user permission prompts
Secure key storageAndroid Keystore, hardware-backed in a TEE or StrongBox chip where presentKeychain, with keys optionally in the Secure Enclave
Exploit mitigationsASLR, NX, CFI in system code, hardened allocatorsASLR, NX, code-signing enforcement, pointer authentication on recent devices

Where they differ, and why it matters.

  • Distribution. Android allows sideloading and alternative stores; malware commonly arrives that way, often by persuading users to grant accessibility or overlay permissions. iOS installs come through the App Store by default, with review, although regulation in some regions now allows alternative marketplaces, so "only reviewed apps" is less absolute than it was.
  • Updates. Android security fixes depend on the device maker and sometimes the carrier, and devices fall out of support at different times, so a banking app must assume many users run unpatched systems. Google moved many components into modules updated through Play to shorten that gap. iOS updates reach most devices quickly, but older devices still stop receiving them.
  • Device owner control. Rooting an Android device (often after unlocking the bootloader) and jailbreaking an iPhone both give the owner control beyond the platform model. Both platforms can report device integrity to a server (Play Integrity, App Attest), which is a signal, not a guarantee.
  • Inter-app communication. Android has rich IPC (intents, exported components, content providers) that apps can expose to each other, which is a frequent source of vulnerabilities. iOS offers narrower mechanisms (URL schemes, universal links, app extensions, shared app-group containers).
  • Dynamic code. iOS generally forbids apps from generating executable code at runtime (outside the system JIT), which limits some attacks and some instrumentation; Android allows loading code dynamically, which is a supply-chain and review concern.

What neither guarantees. Secrecy of anything shipped in the app (keys, endpoints, logic), integrity of the app on a device the attacker controls, or safety of data an app writes outside protected storage (logs, clipboard, backups, shared folders). The OWASP Mobile Application Security Verification Standard (MASVS) organises these into areas such as storage, cryptography, authentication, network, platform interaction, code quality, resilience and privacy.

The design consequence. Treat the mobile app as a public client running on hostile hardware: keep authoritative decisions, secrets and fraud controls on the server, use platform storage and hardware-backed keys for what must live on the device, and use attestation as a risk input.

What interviewers probe next

  • "Is iOS more secure than Android?" For a typical user on a current device, iOS's centralised updates and distribution reduce risk; a current Pixel with timely updates is also strong. For an app's threat model, the right question is what the weakest supported device and OS version can do.
  • "What does sideloading change for your app?" Repackaged copies of your app and malware with overlay or accessibility permissions are realistic, so the server must not trust the client and the UI should resist overlays on sensitive screens.
  • "Why does Android use Linux user IDs for apps?" It reuses the kernel's existing user isolation: each app's files are owned by its UID and other apps cannot read them without a shared permission mechanism.

What if?

What if · interview follow-ups

Hold your answer as the constraints change

An interviewer asks you to compare what Android and iOS guarantee to a banking app, and what the app must still do itself.

  1. Start here

    What do both platforms provide?

How it's scored

Weak: "iOS is secure, Android is open." No mechanisms.

Hire: Describes sandboxing, signing, permissions and secure storage on both, and the distribution and update differences.

Strong Hire: Contrasts isolation mechanisms (UID plus SELinux versus sandbox profiles and entitlements), explains why update fragmentation and sideloading change an app's threat model, notes owner control and attestation, and concludes that the server must remain authoritative on both platforms.

Common mistakes

  • Treating the platform sandbox as protection against the device's own owner.
  • Ignoring old OS versions still in the user base.
  • Assuming code shipped in the app can stay secret.
  • Forgetting IPC surfaces when comparing the platforms.
You just read a free answer. Every topic opens its first 5 answers to anyone. Sign in and the count per topic goes to 10, and we keep track of how far you get in every topic.Google sign-in · free · no payment details
HOW DID IT GO?
0
READING SIGNED OUT

Signing in doubles your free answers, from 5 to 10 per topic, and the site starts remembering you: mastery per topic, bookmarks, and a next-focus recommendation. Free, no card.

Sign in free
UP NEXT ON YOUR JOURNEY
DISCUSSION · 0

No comments yet. Share a correction or a different way to answer it.