This document proposes and evaluates a context-based access control (CBAC) mechanism for Android systems. The CBAC mechanism allows users to set configuration policies over applications' usage of device resources and services based on the user's context. The proposed system uses context sensing and machine learning to classify contexts and then dynamically grants or revokes application privileges. Experiments show the CBAC mechanism incurs negligible energy overhead compared to the stock Android system. The CBAC framework provides improved privacy and security over existing location-based policy systems.