The NY Times tech blog broke this story revealing that 3G-enabled Apple iOS devices—including the iPhone 4 and iPad—keep a secret file on each device that logs and records the device’s location.

The file, which is called ‘consolidated.db,’ keeps track of GPS data on 3G-enabled Apple devices and regularly updates itself with a user’s location…Information that is stored on the phone is also sent to the iTunes application when a user syncs or backs up an iPhone or 3G iPad.

The two programmers who discovered the so-called software glitch have brought it to Apple’s attention, however, Apple yet to respond. Nor did Apple respond to the NY Times’s request for comment. One of the biggest questions that is unanswered right now is whether this issue is merely an unintended consequence of some other function in the iOS, or whether Apple knew exactly what it was doing when it planted a 24-hour tracking system into millions and millions of their popular mobile devices.

As if this bit of news weren’t bad enough, earlier today CNN aired a piece about a high-tech mobile forensics device being used by Michigan state police, which can be used to extract information from smartphones belonging to motorists stopped for minor traffic violations. The device is so sophisticated that it’s capable of extracting data from over 3000 types of phones, and can download the complete contents of an iPhone in under a minute-and-a-half, including all calls, texts, emails, websites visited, cookies, Google Maps and Google Earth data, and so on.

In most circumstances, police would not be able to get these kinds of data without a warrant, which requires the officer to show a judge probable cause. But there are many many exceptions to the warrant requirement; the most basic exception is—consent. If you consent to a search, you cannot later object to the search because the officer didn’t have a warrant. You’ve already waived that right. So if you’re pulled over in Michigan, or anywhere else for that matter, don’t give your phone to an officer simply because he asks nicely. If he wants your phone badly enough he can arrest you.