French lawmakers agreed to a justice reform bill that includes a provision granting police the power to get suspects' geolocation through phones and other devices.
The only way to defend against that is to be extremely mindful of what apps you install. The police will need a backdoor to activate the spybug, this will come in the form of an app that a large amount of people install willingly and are relying on.
In China the police can get immediate and total access to any citizens' phone my simply scanning an ID (driver license, etc). This is probably a feature built into WeChat or another app that all Chinese people are relying on.