How are Km tracked?

Does adventure sync/Km tracking work based on where your character moves, how much the phone shakes/motion detection, or where you actually go based on GPS location?

I live on my 2nd floor of my apartment surrounded by other buildings and it’s common for GPS drift to happen. When this drift does happen, does it count as Km walked?

Yes, drift will accumulate km for you. Not a massive amount but every bit adds up.
I have a friend that hatches her eggs by waving her arm up and down repeatedly.
While not really in the spirit of the game those phone swings can be quite successful in running km up.
With the pathetic rewards from eggs (Shiny & 100%) I have no problem in people cheating egg hatches as Niantic are cheating people with volumes of junk eggs to sell incubators.


Question’s been answered.