Sherlock is a framework that uses sensors in smartphones to optimize the micro-environment around the phone. It runs as a daemon process and provides finer-grained environmental information to applications through APIs. The goal is to save battery by adapting the phone's behavior based on accurate context, such as dimming the screen when in a pocket or bag. It covers major usage scenarios and can detect if the phone is in the hand, on a desk, etc. using sensors like proximity, accelerometer, gyroscope. This allows applications to provide customized services based on the user's situation.