Patch Me If You Can: AI Codemods for Secure-by-Default Android Apps
Mar 13, 2026Pascal Hartig

Summary
This post introduces the use of generative AI to automate the migration of existing Android code to secure-by-default frameworks. It describes a two-pronged strategy: developing secure frameworks that wrap unsafe OS APIs and leveraging AI to apply these securely across millions of lines of code with minimal developer friction. The system proposes, validates, and submits security patches.
More from the Application Security and Permissions trail
- How We’re Building Scam Alert on WhatsApp With End-to-End Encryption and Verifiability Guarantees
- Privacy-Aware Infrastructure in the AI-Native Era: An Asset Classification Case Study
- Labyrinth 1.1: Making End-to-End Encrypted Backups Even More Reliable
- How Meta Is Strengthening End-to-End Encrypted Backups
- Post-Quantum Cryptography Migration at Meta: Framework, Lessons, and Takeaways