iPhone is disabled. Try again in 23,053,554 minutes

Standard

iphine-disabled-crop

Way back in Jan 2014 grabbed a test iPhone & after charging I was greeted with the above.

After various exclamations along the lines of “Holy fishsticks, Batman!” we did get the iPhone enabled & this did not involve a time machine or me waiting the 23,053,554 minutes for the device.

Below is how & some guess work as to what happened.

The Guess Work

So what seems to have happened is the following:

  1. The iPhone was disabled & left on.
  2. The iPhone drained it’s battery completely whilst being in the drawer.
  3. With a full battery drain & subsequent power on, the iPhone’s clock reverted to a previous date.

The Sleuthing

Days Of Future Past

So let’s take the 23,053,554 minutes, a quick Google convert shows that as 43.8323 years.

Deduct that from the day of the tweet, 14/01/2014 & we end up somewhere about 1970.

1970? First big clue.

Where have we seen that before? How about every time a computers clock fully resets? Why that date? Well as per this article on Wikipedia:

Unix time (also known as POSIX time or Epoch time) is a system for describing instants in time, defined as the number of seconds that have elapsed since 00:00:00 Coordinated Universal Time (UTC), Thursday, 1 January 1970,[1][note 1] not counting leap seconds.”

As OS X has a Unix core, we can leverage the date command to calculate dates.

Looking at the linked man page gives us:

-r seconds Print the date and time represented by seconds, where seconds is the number of seconds since the Epoch (00:00:00 UTC, January 1, 1970; see time(3)), and can be specified in decimal, octal, or hex.

So, lets again convert 23,053,554 minutes, this time to seconds (1383213240), & then armed with the seconds try the date command as per the below:

date -r 1383213240

This returned the below which lead to a eureka moment:

Thu 31 Oct 2013 09:54:00 GMT

So what did we do? We took the minutes the iPhone said it was disabled for & returned a date.

This would appear to show that when an iOS device is disabled a date & time is written somewhere, that until that date & time elapses the device is disabled.

In this iPhones case, it was waiting for the above date.

Back To The Future

With the time known that the device would become enabled, why was it not enabled on 14/01/2014?

Well, as mentioned the iPhone thought that the date was 01/01/1970. And in seeing that I remembered some previous posts on NTP & realised that the device needed a network connection in order to update it’s time with it’s set NTP.

However, around iOS 7, iOS devices with a passcode set will not connect to a wireless network until unlocked.

Luckily this was an iPhone & so a SIM could be used, after installing the SIM & a few restarts later the devices clock had updated to the correct date & time & the device was enabled.

(If the iPhone’s SIM slot didn’t work, was an iPod or a non-cellular iPad then the method mentioned here could be used to give the device network connectivity & then allow it to update it’s clock).

Incidentally, in James Ridsdales JNUC2015 talk, he mentioned an issue with DEP enrollments he had encountered due to skipping the “Location Services” stage of setup assistant.

This was due to the iDevices clock being wrong, & therefore not being able to validate the certificates the iDevice is presented for DEP.

Not skipping the “Location Services” stage of setup assistant allows the iDevice to update it’s time & complete the DEP enrollment.

Apple actually has a page available here where they advise:

Store it half-charged when you store it long term.

If you want to store your device long term, two key factors will affect the overall health of your battery: the environmental temperature and the percentage of charge on the battery when it’s powered down for storage. Therefore, we recommend the following:

  • Do not fully charge or fully discharge your device’s battery — charge it to around 50 per cent. If you store a device when its battery is fully discharged, the battery could fall into a deep discharge state, which renders it incapable of holding a charge. Conversely, if you store it fully charged for an extended period of time, the battery may lose some capacity, leading to shorter battery life.

Demolition Man

At the top of this post I wrote “we did get the iPhone enabled & this did not involve a time machine or me waiting the 23,053,554 minutes for the device.”

Well, yes the iPhone was enabled but sadly the passcode was still unknown & so I put the device into recovery mode & erased it.

Cool Story, Bro

I’ve brought this up once or twice on the ##osx-server IRC & MacAdmins.org Slack & thought it was time to share it here too.

Many thanks to frogor, magervalp, flammable & jeremyaghost (amongst others) for filling in the blanks with this.

 

 

 

3 thoughts on “iPhone is disabled. Try again in 23,053,554 minutes

  1. Miikkali

    Nice article! We have a few of these every year after summer holidays: employee has left his/her workphone at the desk for holidays. Upon returning to work employee finds that the battery has drained, recharges the phone, it boots up and accepts PIN but won’t connect to cellular network. The phone just says “Searching” but doesn’t find.

    The cause for this is that when the battery has been fully discharged, the system time is set to 1/1/1970 and obviously the cellular service provider’s system refuses to negotiate with anyone hailing from such long ago in the past. Setting the correct time from Preferences and rebooting the device resolves the issue.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.