Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - Explain why the iPhone time becomes 1970 and becomes a brick.
Explain why the iPhone time becomes 1970 and becomes a brick.
Explain why the iPhone turns brick when the time is adjusted to 1970. As you may already know, on 64-bit iOS devices above iPhone 5s, if you adjust the time to 1970 65438+ 10/,or even 1 970, you will directly turn over the iPhone bricks. ...

I hope you didn't learn it by yourself. ...

In fact, you don't need special computer knowledge to understand why iPhone changed the time to 1970:

Tom scott, a technician with rich experience in researching the bugs of iOS and Mac devices, thinks that this is a problem caused by the overflow of UNIX timestamp integers behind the iOS system.

To this end, we wrote a text version of the fool's note, telling you why the iPhone time became 1970.

UNIX time

UNIX time is a setting introduced by computer engineers in order to express time more clearly in the system.

The expression time of normal people is as follows: February 20 16, 17, 12:54:4 1.

The expression time of UNIX system is as follows: 14556848 1.

You may ask: Why can't computers express time like normal people?

If you have studied middle school geography, you may understand that there are 24 time zones in the world, and the time in each time zone is different at the same time. In this way, if the computer system records time like a human, it will become extremely complicated and lead to various failures. Therefore, you can also understand that UNIX programmers have developed a small program to save trouble ... On the basis of this program, the UNIX system will calculate the time zone through the geographical location of your computer or mobile phone and tell you the correct time.

Specifically, 0: 00: 00 and 0: 00 of Coordinated Universal Time 1970 65438+ 10/are set as "zero time" of UNIX time. The meaning of the above numbers:1October 1970 1 How many seconds have passed since 0: 00: 00 that day?

This system has been used to this day.

Understand UNIX time, go on and you will understand.

Binary, bit system, integer overflow and integer underflow.

Four words that look super complicated ... but don't worry, you can understand them step by step.

Computers, including PCs and mobile phones, use binary (0 and 1) to represent everything, because it means calculating two states of each transistor on the chip: off and on. All iOS devices set to 1970 are 64-bit. This means that the device can store and process as many as 64 binary bits, that is, 64 zeros or 65438+ zeros.

For example, when I wrote this paragraph of this article, I checked the current time:

Dongba District 20 16 February 17 PM 12:04:5 1

Then I convert this time into a UNIX time converter and get:

145568 189 1

Then use decimal to convert it into binary to get:

0 10 10 1 10 1 10000 1 1 1 1 1 1000 10 1 1000 1 1,

You can see that this binary number is 32 bits-32 zeros or 1. This is because before 3: 00 am on June 65438+1 October 19, 2038, our time can be expressed by the 32-bit UNIX time system in the computer, that is, 32 zeros or1.

Too many digits may seem a bit complicated and difficult to observe. Let's find a 2-digit system to explain it. The equal sign is preceded by two digits and followed by ten digits:

00 = 0

0 1 = 1

10 = 2

1 1 = 3

This means that the highest integer that a 2-bit system can count is 3, which is called "binary register width" in computer science.

Find another 4-bit system:

0000 = 0, 000 1 = 1, 00 10 = 2, 00 1 1 = 3, 0 100 = 4, 0 10 1 = 5….

And so on,111=15.

The highest countable integer of a 4-bit system, that is, its binary register width is 15. (In addition, the formula for calculating the width of a binary register is 2 to the n power–1,where n is equal to the number of bits in the system. )

Now you understand the bit system of computer system! What about integer overflow?

If you try to count decimal "4" on a 2-bit system, you will find that the system has changed from 1 1 of "3" to 00; Similarly, if you try to count decimal "16" on a 4-bit system, you will find that the system changes back to 0000, which is "integer overflow".

Similarly, if you try to count negative numbers on a four-digit system, such as-1, the system will jump from 0000 to11,which is decimal "15". This is because this integer format does not support negative numbers, which is the "integer underflow" we discussed.

Tom scott used Gandhi in the first generation of the computer game Civilization to explain this bug that is not a bug: at the beginning of the game, the attack value of Indian ruler Gandhi was only 1 (accurately reflecting Gandhi's philosophy of "non-violence" in the real world). However, if Gandhi's attack value continuously drops to 0 and then drops below 0 during the game, the integer system will be chaotic, which will lead to Gandhi's actual attack value being suddenly raised to the highest-this is because the integer format adopted in the civilized system has encountered "integer underflow". ...

Why can't such a stupid problem be solved?

Actually, it has been solved. ...

There is indeed a version of UNIX integer format that allows negative numbers to exist. However, Apple just didn't use this version in the UNIX time system of 64-bit iOS devices at present, and it encountered a brick replacement Bug…… of 1970 ... ...

Take any smart device at hand (such as your 64-bit iPhone) and try to set the system time as early as possible (don't really set it). You will find that the earliest time limit is mostly 1970 1. As mentioned in the first chapter, this is the starting point of UNIX time and the earliest time that your iPhone can display correctly.

Japanese frozen insect

The system time is adjusted to 654381October 65438 1: 00+0. From the computer principle, this operation will not directly cause your iPhone to turn brick. But once the previous SMS, email, or expired calendar items are stored in your mobile phone, this will cause the system to finally locate at an earlier time than 1970 65438+ 10 1: 00: 00.

In this way, the UNIX time of your iPhone becomes a negative integer-that is, an integer underflow occurs on the basis of 64 zeros of the binary number. From 000000000000000000000000000000000000000000000000000000000000000 to1165438. 38+0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 / kloc-0/ 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 / kloc-0/ 1 1 1 1 1 1 1 1 16543 8+0 1 1 1 1 1 1 1 1 1。

Next, the iPhone will find that the text message sent to you by your wife one second ago occurred at UNIX time represented by 64 binary 1 Converted into human time, that is, 2922770265965438+February 4th 15: 30: 6.

Perhaps it's because Apple's iPhone was never designed to be turned on after about 8,000 years, so it can't display more than five-digit years, let alone twelve-digit years.

So, your iPhone, like this, became a brick. In other words, your iPhone is kneeling in front of the eternal universe.

Why does the iphone's time change to 1970 become a brick? Because Apple's iOS takes unix as the core and the unix timestamp is less than 0, the system will crash. This is decided by unix system, but not by Apple.

Why did the iPhone time change to 1970? Apple officially responded on February 15, US time, acknowledging that the iOS device will not be able to restart until the date is manually set to 1970, and said that a system update will be released soon to solve this problem. However, it did not disclose whether to wait until the iOS 9.3 update or launch a bug fix version in advance. Apple did not explain the reason for the vulnerability, but various technicians analyzed that the most logical reason was related to the time zone. IOS devices use binary storage time. The starting point of time is universal standard time 1 9701:00: 0010/day, that is, UTC time. If the iPhone time in Beijing is set to 1 9701:001October1,and the UTC time is19691231:06, there will be negative time, resulting in equipment failure.

A bug, I didn't expect someone to adjust this time. The latest ios92 1 has been fixed.

Why the time adjustment of iphone will change the brick system. But it can be settled there after sale. I hear it will be solved soon. Don't try it. There is a service charge for helping you operate after sale. There is nothing wrong with the mobile phone, so it can't be changed.

Because the earliest time supported by iphone is 19700 10 1, which is American time, if it is adjusted to 19700 1, there is a time difference between China and the United States, that is, the time is earlier than 1970, so the system cannot recognize it.

Why did the time of iphone change to brick before 10 was adjusted to 1970, 1? Because now the software design uses 32-bit algorithm, and 1970 is the time limit. After this time, the time database exploded.

What should I do if I change the time for iPhone 1970? Why should I change the time of iPhone 1970?

For iPhone, time is an integer variable, and the variable value is seconds from 1970 65438+ 10 month 1. If the time is set to 1970 65438+ 10 month 1, then this value will become 0. This in itself will not cause a problem, but if the mobile phone tries to display a time earlier than this time point, such as a few hours before this time point, then this value will become negative, leading to system crash.

IPhone 1970 time brick replacement solution;

1. For all 64-bit processor iOS devices, disassemble the machine and take out the battery, leave it for 10 minutes, and then reinstall it.

When the power is sufficient, wait for a few hours. When the value of Unix timestamp is greater than or equal to 0, the system time takes effect and can be started normally.

2. For the prevention of jailbreak equipment, add Cydia source: repo.ziph0n./ and install the BrickingDate plug-in. Note: this plug-in can only prevent people from modifying the time, but can't prevent the code from maliciously tampering with the time.

3. Upgrading to the latest version of 9.3 can solve this problem, and another version of 9.3 has been pushed in Apple official website.

My hands are cheap, so I set 1970.5438+0. 1, and the result is here.

This problem can't be solved even by brushing the computer.

Now there are only two solutions:

1, if there is after-sales: take the mobile phone to solve after-sales.

2. If you are not afraid of no after-sales: remove the battery and put it in 10 minutes before plugging it in.

Why is the mobile phone time set to 1970. 1, and it will turn brick after restarting? This is a bug in Apple's mobile phone iOS system, because the time of Apple's IOS system is Unix epoch, and the Universal Time (UTC) is197065438+1October 65438.

Note: The reason is that the Internet is not official to Apple. Apple has publicly acknowledged that this vulnerability does exist, but the reason has not been announced.