# Android Platform Limitations & Enterprise Architecture Compliance

**Document Version**: 1.0.0  
**Target Platform**: Android 10 (API 29) through Android 15+  

---

## 1. Executive Summary

Modern Android operating systems strictly isolate application capabilities to protect user privacy and system integrity. To ensure our application is 100% compliant with Google Play Policies and technically truthful, this document outlines what can be achieved in standard consumer mode versus what requires Android Enterprise (Device Owner / Knox) privileges.

---

## 2. Technical Limitations & Compliant Implementations

### A. Power Menu & Shutdown Prevention
- **Limitation**: Standard consumer Android apps cannot intercept or block long-press hardware power button events or system power-off dialogs without root or Device Owner status.
- **Compliant Implementation**:
  1. Detect battery disconnect / sudden charging interruption and trigger immediate security signal before shutdown.
  2. Implement Fake Shutdown / Blackout Screen mode during active armed state if user touches power buttons.
  3. Send an immediate "Device Power Down Event" with last known GPS coordinate before OS finishes unmounting network adapters.

### B. Full Remote Device Lock & Factory Reset
- **Limitation**: Standard consumer apps cannot change the Android lock screen PIN or execute `wipeData()` unless granted `DeviceAdmin` or `DeviceOwner` privileges via Android Enterprise / ADB provisioning.
- **Compliant Implementation**:
  1. Consumer Mode: Display full-screen persistent Security Overlay Window (System Alert Window / Display Over Other Apps) locking access to the launcher and apps until authorized PIN/biometric is entered.
  2. Local App Wipe: Securely purge all cached tokens, photos, local databases, and session keys.
  3. Enterprise Mode: Provide Device Owner provisioning profile (`dpm set-device-owner`) for corporate and fleet deployments enabling hardware lock and remote factory wipe.

### C. Hardware Telephony Identifiers (IMEI / IMSI / ICCID)
- **Limitation**: Since Android 10+, `getDeviceId()` / `getImei()` returns `SecurityException` for standard apps unless granted `READ_PRIVILEGED_PHONE_STATE` (carrier/system apps only).
- **Compliant Implementation**:
  1. Register IMEI and SIM serial securely during initial user onboarding KYC / physical phone packaging verification.
  2. Use stable hardware fingerprint hashes (`ANDROID_ID`, DRM widevine ID, hardware build identifiers).
  3. Detect SIM insertion/removal via `SubscriptionManager.getActiveSubscriptionInfoList()` and cellular carrier network operator changes without exposing raw private SIM secrets.

### D. Background Camera & Microphone Capture
- **Limitation**: Android 11+ restricts background services from accessing camera and microphone (`foregroundServiceType="camera|microphone"` required with active notification).
- **Compliant Implementation**:
  1. Launch a dedicated foreground service with high-priority status notification when capturing authorized theft incident media.
  2. Trigger front camera snapshot during incorrect lock screen authentication or when remote camera capture command is received.

### E. Background SMS Command Execution
- **Limitation**: Google Play restricts `RECEIVE_SMS` and `SEND_SMS` permissions unless the app is the default SMS handler.
- **Compliant Implementation**:
  1. Primary Command Channel: High-priority Firebase Cloud Messaging (FCM) push notifications and persistent WebSocket/HTTP long-polling.
  2. Offline SMS Receiver: Enabled for direct APK enterprise distribution with trusted sender authentication, nonce replay protection, and cryptographic SHA-256 command signatures.

---

## 3. Transparency & User Interface Guidelines
- All mobile screens will display clear informational badges when an advanced feature operates in Consumer Mode vs Enterprise Device Owner mode.
- No feature will present fake or simulated success messages for restricted OS operations.
