I am almost sure that this was an Oriental Garden Lizard, belonging to the family Agamidae. I said 'almost' because of their varying color and appearance. The two photos were taken on two different days.
Sitting on a rock very calmly...
Below, it was on a coconut tree and was very alert! Trying to escape from a Shikra (a bird of prey) which was trying to catch it. And finally it escaped by creating a camouflage.
Oriental Garden lizard is a commonly seen one and has the ability to change color, and the spikes along its back make it more interesting.
Species: Calotes versicolor