Are non-citizens allowed to become police officers in Germany? Are there any restrictions? Are there any advantages for EU-citizens?
This highly depends on your Bundesland since the police is under the jurisdiction of a federal state. Some of them explicitly welcome people without citizenship to apply, others do not permit them at all. You will however be required to deliver a Führungszeugnis, a certificate of good conduct, when applying which might be problematic depending on whether your former country of residence offers such a certificate that matches the German requirements.
For example, the federal state of Hessen welcomes foreigners' applications. The federal state of Bayern welcomes applications after assessing the applicant's language competence where bilingual applicants are given an edge. However, foreign applicant's are still considered only outside of the default application process where for example Turkish citizens are most commonly accepted. In principle, I believe it is possible to become a policeman in every federal state as long as you are a qualified applicant, especially for the gehobener Dienst (higher service).
Under EU law, some positions might be restricted but it's difficult to imagine that the entire police service could be. Not only that but if a position is not deemed to be restricted to German nationals, then I think that EU citizens must be treated equally (i.e. there can be no priority to German citizens or anything like that).
That said, in Germany police is a provincial matters, so the rules differ from Land to Land. As you will see, other EU citizens can generally apply on a par with German citizens but it is even possible in some places for non-EU citizens, sometimes with a special authorization. One restriction is that you probably need to speak German.