Get an iPhone. Whatever else you may think of them, Apple is deliberately working to prevent this sort of crap from happening without your knowledge and consent.
They've also taken a hardline stance against right to repair, which is a deal breaker for a lot of HN. Unfortunately, there aren't many modern options for people who care about both owning their devices and not being spied on by them.
The right to repair is also the right to steal, refurbish the stolen good and resell. Maybe that is how Apple squashed the theft market for Apple products, but no-one is afraid on the street anymore of holding their iPhone carelessly.