A man accused of trying to kill a police officer during a shootout with his brother was sentenced to spend the rest of his life in prison.