The iPhone comes with the option to set a passcode on your iPhone for security purposes. This prevents users from gaining access to the phone's contents before entering the four-digit passcode. However, if you forget your own passcode, you can find yourself locked out of your iPhone. You can break the passcode lock and regain access to your iPhone by renaming the file on the iPhone that sets it to the locked status.
Connect your iPhone to your computer using the USB cable that came with the iPhone. Wait for your computer to recognize your iPhone.
Click on the "Start" menu in the bottom left corner of your computer and select the "My Computer" or "Computer" option from the Start menu that pops up. Wait for the "Computer" window to load. Click on the iPhone icon in the "Computer" window.
Click the "Tools" option in the menu bar at the top of the "Computer" window. Select the "Folder Options" or "Options" option. Wait for the "Options" panel to load. Select the "View" tab in the "Options" panel. Click the check box labeled "Show Hidden Files and Folders." Close the "Options" panel.
Click on the "Ipod_Control" folder to open it.
Click on the folder labeled "Device" to open it.
Locate the file named "_locked" in the list of files in the "Device" folder and click on it to select it. Press the "Enter" key on your keyboard to edit the name of the file. Type in the new file name "_unlocked" and press the "Enter" key again to rename the file and set your iPhone to the unlocked status. Close the window.
Click on the "Start" button again and select the "Computer" option. Right-click on the iPhone icon and select the "Safely Remove" option to eject your iPhone and begin using it again.