A powerful 7.7-magnitude earthquake hit Indonesia, killing at least 20 people, with aftershocks continuing after the tsunami warning was lifted.