Entrapment is when you solicit someone to break the law, and then arrest them for it.
There was no solicitation here. There was a certain behavior that violated the "norm", and, arguably, socially accepted standards, but not the law and not the spirit of the law. Even if it was done on purpose, there is no justification for handcuffing someone, let alone a kid.
And we do allow the police to pose temptations in order to apprehend criminals. We send undercover police women dressed in min-skirts to catch rapists and people soliciting for sex for money. That is far more "entrapment" than what this kid did.
The bottom line is this. This kid did nothing wrong, and was harassed, handcuffed and arrested. This means the police, for sure, and the school, probably, fucked up. If he was an activist fighting for his right to bring weird shaped electronics to school, and not an innocent kid (which, again, I am yet to see evidence of), the police and school still fucked up.