Flexible profiles and rules management for Android