What does Android sandbox protect? It isolates app UIDs/files/process resources by default; exported IPC, grants, shared/system services, root, and backend APIs remain boundaries.
Is android:exported=false enough? It blocks ordinary external component invocation, not compromised same-UID code or direct backend calls; server authorization remains necessary.
Intent filter as security check? No. Validate actual received data because explicit invocation can bypass filter matching expectations.
Why immutable PendingIntent? It constrains delegated token holders from filling/changing intent semantics; re-authorize business action on execution.
Keystore versus encrypted preferences? Keystore manages cryptographic keys/non-exportability; encrypted storage holds ciphertext. Both need lifecycle, invalidation, backup, and compromise analysis.
Encryption versus authenticated encryption? Encryption hides plaintext; AEAD also detects modification and can bind context through AAD.
Why is GCM nonce reuse dangerous? Uniqueness failure under one key can reveal plaintext relationships and enable forgery.
Why avoid trust-all TLS in debug code? Configuration can leak to release and removes server authentication; use scoped debug trust configuration.
When pin certificates? Only after threat/availability analysis with backup pins, rotation, expiry, old-client, monitoring, and emergency plans.
Why is WebView bridge risky? Web JavaScript obtains native capability; origin/script/navigation compromise can invoke privileged methods.
How prevent SQL injection with dynamic sort? Bind values and map an enum to fixed allowlisted SQL fragments—never concatenate raw user grammar.
Does obfuscation protect an API secret? No. It slows extraction but the app must access the value; backend secrets stay server-side.
Does Play Integrity prove a user is legitimate? No. It supplies app/device/account/risk signals for server-side, action-bound, tiered decisions.
How do you log security events safely? Structured allowlisted metadata, redaction, access/retention controls, stable trace IDs, and no secrets/raw sensitive payloads.