On the on-shell: the action of AdS4 black holes