Protecting access to your SIM card is a critical element of the digital security of the modern user. Many smartphone owners ignore the default settings, leaving the factory code (usually 0000 or 1234), which makes them vulnerable if the device is stolen or lost. An attacker, having gained physical access to the device, will be able to move the SIM card into his phone and gain access to bank SMS confirmations and personal correspondence.

Changing personal identification number (PIN) to a unique set of numbers is a simple but effective precaution. The procedure for changing the code does not require special technical knowledge and takes no more than a minute. However, it is important to understand the difference between the smartphone screen unlock code and the security code of the SIM card itself: the first protects access to the OS interface, and the second blocks the operation of the communication module even when the card is moved to another device.

In this article we will analyze in detail the algorithm of actions for different versions of the operating system Android. We will also look at the nuances of interfaces from different manufacturers, such as Samsung, Xiaomi and Huawei, where the paths to the settings may differ slightly. Follow the instructions carefully so as not to block the card with an erroneous entry.

Preparing to change the code and checking the current settings

Before you start changing the security settings, you need to make sure that the SIM card protection function is generally activated in the system. By default, on many new tariffs and cards, this option can be disabled for user convenience, which means that you will not be prompted for a code when you turn on the phone. If you have never set your code, the system will use the standard one provided by the telecom operator.

Find an agreement with the telecom operator or the plastic card on which your SIM card was attached upon purchase. This card (often called a "holder" or "envelope") contains a standard PUK code and initial PIN. Write this information down in a safe place, out of reach of others. Having a PUK code is insurance in case you forget the new password you created or accidentally enter it incorrectly three times.

Before starting the procedure, make sure that the battery charge of your device is sufficient. Although the process of changing the code is not energy-intensive, suddenly turning off the phone while writing new data to the SIM card chip memory can theoretically lead to a failure. Also check that the SIM card is correctly detected by the network and you have an operator signal.

๐Ÿ’ก

Write the new PIN code into a password manager or secure physical storage immediately after the change, as long as you remember it exactly.

Universal method through Android settings

Security settings interface in "clean" Android (versions 10, 11, 12 and later) is as standardized as possible. The path to the required menu is usually hidden in the section responsible for security or additional system settings. The algorithm of actions is intuitive, but requires care when entering numbers.

Open the main settings menu of your smartphone. Scroll down the list to the section Security and privacy or simply Security. In some assemblies, this item may be located inside the menu System or Advanced settings. Your goal is to find the subsection associated with encryption and credentials.

Inside the security menu, find the item Other security options or SIM card lock. The name may vary depending on the localization of the firmware. After entering this section, you will see a switch that will require you to enter a PIN code when you turn on the device. If it is turned off, the system will first ask you to enter the current code (often 0000 or 1234) to activate the protection.

  • ๐Ÿ“ฑ Click on "Change SIM PIN" in the lock menu.
  • ๐Ÿ”ข Enter the current code (standard or your old one, if changed earlier).
  • ๐Ÿ†• Enter a new code, consisting of 4-8 digits, and confirm it by re-entering.

After successful entry, the system will display a notification that the PIN code has been changed. Now, every time you reboot the phone or remove the SIM card, the device will request this new combination. Make sure you remember it, as the number of entry attempts is limited.

๐Ÿ“Š What is your PIN code now?
Standard (0000/1234)
Unique complex
I donโ€™t remember/I donโ€™t know
Protection disabled

Features of Samsung, Xiaomi and Huawei interfaces

Large electronics manufacturers often modify the standard shell Androidby adding their own interface layers, such as One UI from Samsung, MIUI from Xiaomi or EMUI from Huawei. This leads to the fact that the path to the SIM card settings may differ from the stock version, although the functionality remains the same.

In smartphones Samsung the path to the settings usually looks like this: go to Settings, then select Biometrics and security. Next, click on Other security settings and find the item Configure blocking SIM cards. The interface One UI is laconic, so the searched items are often grouped logically.

Users of devices Xiaomi with a shell MIUI or HyperOS should act differently. Open Settings, scroll to the section Passwords and security. Here you need to select Privacy or immediately find the item SIM card lock in the list of special features. In some firmware versions, this item is included in the settings of the SIM card itself through the network management menu.

โš ๏ธ Attention: In some custom firmware of Chinese brands, the item for changing the PIN code can be hidden deeply in the "About phone" or "SIM card status" menu if the standard path did not work.

For owners of Huawei i Honor the algorithm is similar to Xiaomi: Settings -> Security and privacy -> Advanced settings -> Encryption and credentials. The SIM card lock control is located here. If you cannot find the item you need, use the settings search by entering the query "SIM" or "PIN".

What to do if the item is not in the settings?

If you do not find the item for changing the code, perhaps your SIM card is very old and does not support this function programmatically, or the telecom operator has blocked this feature at the profile level. Try updating your phone software or contact a phone store to replace the SIM with a new one with USIM support.

What to do when a SIM card is blocked (PUK code)

The most common problem when changing a PIN code is forgetting it or repeatedly entering it incorrectly. The SIM card security system is designed in such a way that after three incorrect attempts to enter the PIN card, the PIN card is blocked. This does not mean that it is damaged forever, but to unlock it you will need another code - PUK (Personal Unblocking Key).

When locked, a message will appear on the screen asking you to enter the PUK code. You have 10 attempts to enter it. If you exhaust these attempts, the SIM card will be permanently blocked and cannot be restored - you will have to go to a communication store for a new one. Therefore, you need to act extremely carefully.

Where to find the PUK code:

  • ๐Ÿ“„ On the plastic card holder that was issued with the SIM card upon purchase.
  • ๐Ÿ’ป In the subscriber's personal account on the website of your telecom operator (section "My numbers" or "Security settings").
  • ๐Ÿ“ž By calling the operator's support service from another number of the same operator (you will need to provide a code word or passport data).

The unlocking process is simple: enter the 8-digit PUK code, then the system will ask you to come up with a new PIN code and confirm it. After this, access to the network will be restored, and the old forgotten PIN will be replaced with a new one.

๐Ÿ’ก

The PUK code cannot be changed or invented by yourself; it is rigidly tied to the SIM card chip by the telecom operator.

Table of standard codes and actions

For ease of understanding information about types of codes and attempt limits, we have prepared a summary table. This data is relevant for most telecom operators ("Big Four") and GSM/UMTS/LTE standards.

Code type Purpose Number of attempts Consequences of exhaustion
PIN 1 Blocking access to the network when turned on 3 attempts Blocking card, PUK request
PUK 1 Unlock PIN 1 10 attempts Complete SIM card blocking (burning)
PIN 2 Restriction of outgoing calls (rarely used) 3 attempts Function blocking, PUK 2 request
PUK 2 Unblocking PIN 2 10 attempts Inability to use PIN 2 functions

Please note that the code PIN 2 is used extremely rarely by ordinary subscribers, mainly for corporate tariffs with limited international calls. In everyday life, you will encounter only the first pair of codes.

โš ๏ธ Attention: Never select a PUK code by brute force. 10 attempts end very quickly, and restoring the number by re-issuing the card will take time and may cost money.

Command line and hidden menus (for advanced)

For users who prefer engineering menus or have problems with the graphical interface, it is possible to manage the PIN code through special USSD commands or engineering menu. This method works on most devices, regardless of version Android, but requires input accuracy.

Open the Phone application (dialer) and enter the following command to change the PIN code:

**04*OldPIN*NewPIN*NewPIN#

Press the call button. If the code is entered correctly, you will receive a notification about the successful change. To unlock a blocked card via PUK, use the command:

**05*PUK*NewPIN*NewPIN#

Keep in mind that some telecom operators may block the execution of these commands at the network level, especially if the SIM card is already blocked. In this case, the graphical settings interface or a call to support remain the only options.

โ˜‘๏ธ Checklist for safe code changes

Done: 0 / 4

Frequently asked questions and problems (FAQ)

I forgot both the PIN and PUK codes. What to do?

If you do not have a plastic card holder and you cannot enter the operatorโ€™s personal account (for example, there is no Internet or access to the number), the only way out is a personal visit to your operatorโ€™s communication salon. Take your passport with you. The employee will issue a reissue of the SIM card while preserving your number. Usually this service is paid, but the number and balance are saved.

Is it possible to disable the PIN code request completely?

Yes, this is possible. Go to the SIM card lock settings (the path is described above) and turn the switch to the โ€œOffโ€ position. The system will ask you to enter your current PIN for confirmation. After this, the phone will turn on without asking for a password, but the SIM card will become vulnerable if the device is stolen.

Why does the phone ask for a PIN code every time you turn it on, even if I didnโ€™t set it?

Your SIM card probably has a factory default code (most often 0000, 1111 or 1234). Operators do this for basic protection. You need to enter this standard code, and then, following the instructions in the article, change it to your own or disable the request in the settings.

Does changing the PIN code affect the operation of the mobile data?

No, changing the access code does not in any way affect the tariff plan, Internet speed or connection quality. This is solely a measure of local security of the SIM card chip. After entering the correct code when turning on, the phone will connect to the network as usual.

Is it possible to change the PIN code if the SIM card is already blocked?

No, the security logic is as follows: first you need to unlock the card using the PUK code, and only during this unlocking process (or immediately after it) will the system prompt you to set a new PIN code. While the card is in the "Blocked" state, changing the PIN is impossible.