Abstract
Modern smartphone operating systems employ an "all-or-nothing" permission model for storage, allowing apps access to all user photos once granted. This paper presents PhotoSafer, a system that leverages lightweight deep learning and real-time context monitoring to protect sensitive images from unauthorized access, particularly by background applications.
Introduction
The current Android permission model creates a significant privacy gap. Granting an app access to storage provides it with a "skeleton key" to every image on the device, including sensitive documents like driver's licenses and private family photos. Research shows that 82% of the top 200 free Android apps have access to both photos and the internet, facilitating potential data exfiltration. Furthermore, 88% of surveyed users were unaware that apps could access photos while running in the background. PhotoSafer addresses these issues by providing automated, content-aware protection.
System Architecture and Methods
PhotoSafer introduces a two-pronged defense strategy combining automated content classification with context-aware access control.
Content-Based Identification
The system uses a Deep Convolutional Neural Network (DCNN) based on the MobileNet architecture to categorize photos into "public" or "private" (e.g., Photo IDs, Legal Documents, Family, Nudes). To ensure mobile efficiency, the model is pre-trained on ImageNet and fine-tuned using transfer learning on a custom dataset of sensitive images.
Context-Aware Access Control
Rather than relying on static permissions, PhotoSafer evaluates the context of every access request.
As illustrated in the system architecture (Figure 1), the Photo Content Classifier pre-labels images and stores results in a local SQLite database. This "interposition" layer allows the system to make rapid access decisions without re-running heavy AI inference for every request.
The decision logic (Figure 2) follows a hierarchical check:
- System Status: Access is denied if the screen is locked.
- App Status: Access is denied if the requesting app is in the background.
- User Interaction: If a foreground app requests a private photo, the system interrupts the process and prompts the user for explicit permission.
Key Results
Evaluated on a Nexus 5, PhotoSafer achieved an overall classification accuracy of 94.3%, with 97.8% accuracy for highly sensitive categories like Photo IDs. Crucially, the system demonstrated a "fail-safe" behavior, with zero private photos misclassified as public. The database-driven interposition layer reduced decision latency from 190.7 ms to just 5.2 ms, making the security overhead negligible for the user.
Conclusion and Future Work
PhotoSafer successfully mitigates the risks of the "all-or-nothing" permission model. Future improvements include integrating the interposition logic directly into the Android Kernel to prevent bypasses and implementing user-managed whitelists for trusted services like cloud backups.
Summary updated