I am so happy to be in Germany. A teacher once asked me to give her my phone (we were forbidden to use phones in school), so I put it in my bag and closed it.
She instantly went to the director, who then started to discuss it with me (after 45 minutes of him shouting at me in a hallway, which had become a public attraction, he gave up), but at no point did anyone try to access my bag.
The fact that my parents studied law might have something to do with it, though, so I’m not sure if other people would have been treated the same.