A 7.7-magnitude earthquake hit Indonesia, killing at least 20 people, with a tsunami warning lifted but aftershocks continuing.