mobile-security

Implement Android security patterns for storage, network trust, and authentication.

61|17|Updated Feb 2, 2026
One-click install
npx skills add https://github.com/ahmed3elshaer/everything-claude-code-mobile --skill mobile-security-ahmed3elshaer
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mobile-security
Source: https://github.com/ahmed3elshaer/everything-claude-code-mobile/tree/main/skills/mobile-security
Command: npx skills add https://github.com/ahmed3elshaer/everything-claude-code-mobile --skill mobile-security-ahmed3elshaer

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Android apps frequently mishandle sensitive data, keys, and network trust, leading to data leakage, credential theft, and insecure configurations. This Skill provides a consolidated set of Android security patterns to help developers build secure storage, robust network defenses, and safe authentication flows.

Core Features & Use Cases

  • Secure Storage: use EncryptedSharedPreferences and Android Keystore to protect tokens and credentials.
  • Network Security: implement a correct network security config and certificate pinning where appropriate.
  • Input Validation & Safe Logging: enforce input validation and avoid logging secrets.
  • Biometric Authentication: integrate biometric prompts to protect access to sensitive data.
  • Code Hardening: apply ProGuard/R8 rules to prevent leakage of sensitive logic.

Quick Start

Integrate these patterns into your Android project by enabling encrypted storage, enabling secure keystore keys, configuring network security, and adding biometric authentication where needed. Start by implementing EncryptedSharedPreferences for token storage, then wrap keys with Android KeyStore and set up a network-security-config with TLS pinning for your API.

Frequently Asked Questions about mobile-security

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I securely store authentication tokens and credentials in Android?

Secure storage in Android uses EncryptedSharedPreferences for tokens and Android Keystore for key management. EncryptedSharedPreferences encrypts data at rest, while Android Keystore stores cryptographic keys in hardware-backed secure enclaves when available, preventing credential theft from device compromise.

What's the best way to prevent man-in-the-middle attacks on Android network requests?

Implement network-security-config with certificate pinning to validate server certificates against a known set of public keys. This prevents attackers from intercepting HTTPS traffic using fraudulent certificates, even if device certificate stores are compromised.

How do I add biometric authentication to protect sensitive data in my Android app?

Integrate biometric prompts using Android's BiometricPrompt API to gate access to sensitive operations. Biometric authentication adds a second factor of identity verification, allowing users to unlock encrypted storage or confirm high-risk actions without exposing raw credentials.

Why should I validate user input and avoid logging sensitive data in Android?

Input validation prevents injection attacks and malicious payloads from reaching backend systems. Avoiding logging of secrets, tokens, and credentials prevents accidental exposure in crash reports, device logs, and monitoring systems where attackers or analytics tools can capture them.

Can I use ProGuard or R8 to harden sensitive business logic in Android?

Yes. ProGuard and R8 obfuscate and strip code during compilation, making reverse engineering harder. Applied to sensitive authentication and encryption logic, these tools prevent attackers from easily extracting cryptographic keys or authentication flows from decompiled APKs.

Do I need all Android security patterns, or can I implement them incrementally?

Start with EncryptedSharedPreferences for token storage and network-security-config for API communication, then add biometric authentication and keystore wrapping as your threat model expands. Each pattern addresses a specific attack surface; prioritize by data sensitivity and exposure risk.