Measuring and estimating power consumption in Android to support energy-based intrusion detection