Everyone saying "take the military weapons away from the cops" is missing the point... and the problem.
It's not the weapons... it's the training, and the philosophy.
It's the training and philosophy that says that "officer safety" is more important than civil rights, or the rule of law.
It's the militaristic attitude and training, that fundamentally confuse the police mission, protecting the public; with the military mission of attacking and defending against "the enemy"; explicitly separating the police from the public.
This has the effect of making the public, the enemy.