In Berlin, 30 police officers and one firefighter were injured in confrontations or attacks, leading to 400 arrests, city officials said.