If you have forgotten your iPhone 4 passcode and your device is disabled, you may think that you have no option but to restore it and lose all your data. However, there is a way to unlock your iPhone 4 without restoring it, using a computer and iTunes. Here are the steps to follow:
Make sure you have a computer (Mac or PC) with iTunes installed and the cable that came with your iPhone 4 or another compatible cable.
Unplug your iPhone 4 from the computer if it's connected. Turn off your iPhone 4 by pressing and holding the top button until the power off slider appears. Drag the slider to turn off your iPhone 4, then wait a minute to make sure it turns off completely.
Press and hold the Home button on your iPhone 4 while immediately connecting it to the computer. Don't let go of the Home button. Keep holding it until you see the recovery mode screen on your iPhone 4, then let go.
Locate your iPhone 4 in iTunes on the computer that it's connected to. Choose Restore when you see the option to Restore or Update. Your computer will download software for your iPhone 4 and begin the restore process.
If the download takes more than 15 minutes and your device exits the recovery mode screen, let the download finish, then turn off your iPhone 4 and start again from step 3.
After the restore process is completed, you can set up your iPhone 4 as a new device or restore it from a backup. If you didn't back up your iPhone 4 before, you can download any data that you have in iCloud.
This method will erase all your data and settings from your iPhone 4, but it will also remove the passcode and enable you to use your device again. If you want to avoid losing your data, you should always back up your iPhone regularly using iCloud or iTunes.
Source: If you forgot your iPhone passcode - Apple SupportHow to prevent forgetting your iPhone passcode
Forgetting your iPhone passcode can be a frustrating and stressful experience, especially if you have important data and settings on your device. Fortunately, there are some ways to prevent this from happening and to make it easier to remember your passcode. Here are some tips:
Use Face ID or Touch ID. If your iPhone supports Face ID or Touch ID, you can use your face or fingerprint to unlock your device instead of entering a passcode. This way, you don't have to worry about forgetting or mistyping your passcode. To set up Face ID or Touch ID, go to Settings > Face ID & Passcode or Settings > Touch ID & Passcode and follow the instructions.
Choose a simple and memorable passcode. If you don't want to use Face ID or Touch ID, or if your iPhone doesn't support them, you can choose a simple and memorable passcode that you can easily recall. For example, you can use a date that is meaningful to you, a pattern that is easy to remember, or a word that you can spell with the numbers on the keypad. However, avoid using obvious or common passcodes such as 1234, 0000, or your birthday.
Write down your passcode and keep it in a safe place. Another way to prevent forgetting your iPhone passcode is to write it down and keep it in a safe place where only you can access it. For example, you can store it in a password manager app, a secure note app, or a physical notebook that you can lock. However, don't store it in plain sight or in an obvious location such as your wallet or your phone case.
By following these tips, you can reduce the chances of forgetting your iPhone passcode and avoid the hassle of unlocking your device without restoring it.
Source: 4 Ways to Unlock iPhone When You Forgot iPhone Passcode, Forgot Your iPhone Passcode Here's How to Fix It - Lifewire a474f39169