Your phone has an accelerometer, which can be integrated twice to result in slightly accurate dead reckoning; just keep accumulating 3-vectors with every time-slice. That's a helluva lot easier than visual cues.
https://www.youtube.com/watch?v=C7JQ7Rpwn2k&t=1401s (the whole video is incredible, but this timestamp is the magical bit)
IMU are very useful to known your orientation though. Even an inaccurate IMU is useful to provide an initial estimate to feed vision-based algorithms.
1) An absolute positioning system like GPS.
2) A visual positioning system like fiducial markers or SLAM.
3) Something that can measure linear speed and then you integrate the speed only once. Easy to do on vehicles, but even the most accurate system will quickly drift.