---
title: "How AI Is Transforming the Adoption of Secure-by-Default Mobile Frameworks"
description: "Meta wraps risky OS and third-party APIs in secure-by-default frameworks built on three principles: mirror the existing API, depend only on public and stable interfaces, and keep each library small but usable across all apps and OS versions."
url: "https://swe.quest/articles/how-ai-is-transforming-the-adoption-of-secure-by-default-mobile-frameworks-acd819f6e0246488"
canonical: "https://engineering.fb.com/2025/12/15/android/how-ai-transforming-secure-by-default-mobile-frameworks-adoption/"
source: "Meta Engineering"
published: "2025-12-15"
difficulty: "medium"
kind: "Case study"
reading_minutes: 10
tags: ["mobile","appsec","ai-coding","refactoring","api-design"]
---

# How AI Is Transforming the Adoption of Secure-by-Default Mobile Frameworks

A post on [Meta Engineering](https://swe.quest/sources/meta.md), published 2025-12-15, 10 min read, Case study. Original: [https://engineering.fb.com/2025/12/15/android/how-ai-transforming-secure-by-default-mobile-frameworks-adoption/](https://engineering.fb.com/2025/12/15/android/how-ai-transforming-secure-by-default-mobile-frameworks-adoption/)

## Summary

Meta wraps risky OS and third-party APIs in secure-by-default frameworks built on three principles: mirror the existing API, depend only on public and stable interfaces, and keep each library small but usable across all apps and OS versions. SecureLinkLauncher shows the approach on Android. It wraps startActivity-style calls and enforces intent scopes (family, same-key, internal, third-party) to block intent hijacking and data leaks to malicious apps. To migrate call sites at scale, a Llama 4 Maverick pipeline takes 10-20 lines of context around each call, infers the right scope, and emits the rewritten snippet plus actions such as adding imports. Each patch is validated with lints, compilation and tests, and errors are fed back for up to five retries before the patch goes to code owners for one-click review.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Mobile](https://swe.quest/tags/mobile.md) (Web & mobile)
- [Application security](https://swe.quest/tags/appsec.md) (Security)
- [AI for coding](https://swe.quest/tags/ai-coding.md) (AI & ML)
- [Refactoring & migrations](https://swe.quest/tags/refactoring.md) (Engineering practices)
- [API design](https://swe.quest/tags/api-design.md) (Backend & APIs)

## Prerequisites

- Android intents ([easy posts on Mobile](https://swe.quest/tags/mobile.md?difficulty=easy))
- LLM-based code generation ([easy posts on LLMs](https://swe.quest/tags/llms.md?difficulty=easy))

## Keywords

SecureLinkLauncher, Android, Llama 4 Maverick, AutoPatchBench, intent hijacking

## Related posts

- [Building secure mobile apps in the agentic era](https://swe.quest/articles/building-secure-mobile-apps-in-the-agentic-era-7500fbc38f176116.md): Shopify Engineering · 2026-11-18 · Medium · 6 min read · Application security, Mobile, AI agents, Security, LLMs
  Shopify keeps pace with an 11x jump in mobile code output (~434k lines changed per week during a 12-week agent-driven rewrite) by maintaining a per-app attack surface map covering deep links, WebViews, stored data, permissions and dependencies, where every item carries one of five verdicts and a code link.
- [Scaling Slack’s Mobile Codebases: Modernization](https://swe.quest/articles/scaling-slack-s-mobile-codebases-modernization-950b9c539d5b5770.md): Slack Engineering · 2022-05-04 · Medium · 12 min read · Mobile, Refactoring & migrations, Swift, Java & JVM, Build systems
  Slack's year-and-a-half Duplo initiative concluded by modernizing its iOS and Android codebases: iOS moved to a custom VIPER-style feature architecture, stricter SwiftLint rules banning singletons and NotificationCenter, Combine (via CombineX until iOS 12 was dropped), and broader SlackKit adoption, while Android replaced Gson with Moshi, Android Priority Job Queue with WorkManager, and handwritten API calls with an internal Retrofit-based library, and introduced coroutines and Compose incrementally. iOS ended 68% modernized and 81% modularized with CI stability rising from 77% to 90% and average time-to-merge down 64%, Android reached 92% modularization, and local builds later dropped nearly 50% with Bazel and M1 Macs.
- [Open-sourcing Mariana Trench: Analyzing Android and Java app security in depth](https://swe.quest/articles/open-sourcing-mariana-trench-analyzing-android-and-java-app-security-in-depth-6f84a56369fe533f.md): Meta Engineering · 2021-09-29 · Easy · 6 min read · Static analysis, Application security, Mobile, Java & JVM, Open source
  Mariana Trench is Meta's open-sourced static taint-analysis tool for Android and Java apps that finds security and privacy bugs by tracing data flows from sources (e.g., Intent.getData) to sinks (e.g., Log.w, Runtime.exec).
- [App stability at scale with a layered defense](https://swe.quest/articles/app-stability-at-scale-with-a-layered-defense-191103cbbe4ddc1a.md): Grab Engineering · 2026-10-21 · Medium · 15 min read · Mobile, Deployment, Static analysis, Observability, Testing
  Grab keeps its Android and iOS superapp stable with a layered, shift-left defense against crashes.
- [How River takes security work from a fix to merge](https://swe.quest/articles/how-river-takes-security-work-from-a-fix-to-merge-8e7d762a71a196e6.md): Shopify Engineering · 2026-09-02 · Medium · 9 min read · AI agents, Supply chain security, Security, Developer productivity
  River, Shopify's Slack-based AI agent, drives dependency and application vulnerability fixes from patch to verified closure.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
