How to: Unlock System Lock PIN Code

Discussion in 'MacBook Pro' started by ExciteWalk, Sep 12, 2012.

Thread Status:
Not open for further replies.
  1. ExciteWalk, Sep 12, 2012
    Last edited: Jan 30, 2013

    macrumors member


    Sep 11, 2012
    Problem: Your Mac got locked via iCloud and on boot displays "Enter your system lock PIN code to unlock this Mac." It also sets an unknown password on the firmware so you can't boot from a disc. And you don't know the PIN code for a variety of reasons (not my business).

    Solution: Mount the locked drive on another machine, find the PIN, re-install the locked drive into the original Mac, enter the PIN, resume your business.

    *I'm going to post the steps I did in my case and suggest steps you might take if your case varies.

    Things Needed:
    1. Alternate machine with space to mount an additional drive. (works on Mac or PC*)
    *If you're using a PC, you'll need to download and install Mac Drive to be able to read the contents from a Windows environment.
    2. You might need a SATA to USB adapter if you have a laptop without room for an additional drive.
    3. Screw driver to disassemble the Mac.

    Step 1: Remove the locked hard drive from your Mac.
    You can find detailed guides for your specific machine at

    Step 2: Install the drive into your alternate machine. But make sure you do *not* boot from it. Boot from your regular drive.
    If you do not have an alternate machine, feel free to ask a tech buddy of yours to lend you their machine.

    Step 3: Once booted into the alternate system, locate your locked drive.
    In my case it was drive D: on Windows. Now browse to \Users\username\Library\Application Support\iCloud

    Step 4: In the folder "iCloud" find a file named with a bunch of numbers: ##########.lock In my case it was: 1138515150.lock

    Step 5: I'd suggest that you take a picture of this file name for accurate reference. But you can also just write it down.

    Step 6: Once you got the number, power down the machine and remove the locked drive.

    Step 7: Install the locked drive back into the original locked Mac.
    Follow your iFixit guide from Step 1 in reverse to put the drive back.
    *It is important that you put it back in the machine where it was originally locked* so that the motherboard firmware will be unlocked in the next step.

    Step 8: Boot up the locked Mac and referencing the number you recorded, you can start trying 4 numbers at a time for the PIN.
    Try the first 4, then the second 4, and so on..
    For example: 1138, 1385, 3851, 8515, 5151, 1515, 5150.
    In my case the PIN was the second to last 4 digits: 1515
    If you typed in more than 10 combinations, then it says that you are locked out for a minute. Just restart the machine and continue entering the combinations from where you left off.

    Once you enter the right PIN, the Mac will instantly reboot proceeding to where you were at when the lockout occurred. It will also remove the firmware password.

    Enjoy your unlocked Mac!!
    And please let us know if this method worked for you. Thanks :)

    Many people are having trouble unlocking with the above method, so we are trying to figure this out collectively. Please help us help you; see this post by vladichimescu.
  2. macrumors newbie

    Sep 13, 2012
    Great help!

    Here is my problem. I can't mount the locked drive to any computer. I've tried both Mac and PC. On mac, Disk utility see it, but finder does not. On PC Mac Drive said "disk is unreadable" then ask if i wanna format it.

    Please help me! I'm so close.

  3. macrumors 6502a

    Jun 26, 2007
    Now tell us how to do this on retina or air macbooks. :cool: :p
  4. macrumors 68040


    Dec 11, 2008
    Far of East
    The thieves of the world will be delighted with this gem, remote lock is a security feature is it not :rolleyes:
  5. thread starter macrumors member


    Sep 11, 2012
    Try the Repair Mac Disks option from Mac Drive. I had a similar mounting issue and that seemed to fix it.

    Click on the link in Step 1 and choose your machine from the list there.
    For example, after clicking the MacBook Air section, it shows this page listing the various MB Air versions.

    Very true, it is meant to work as a security feature.
    But now it is an exposed security flaw. Maybe Apple will take note of my circumvention, and this might lead them to patch it up. Therefore making it more secure for everyone. But in the mean time this guide can help the people truly in need.
  6. macrumors 68040


    Dec 11, 2008
    Far of East
    Sadly most likely those that have helped themselves to someone else's Mac, it would have been far more prudent to have reported this to Apple via their feedback channel and not help those with criminal intent.

    People who have a "true" need will simply contact Apple or their authorised retailer, those that don't want to likely have other reason predominantly no proof of ownership. You might want to reconsider your post, you may help a very few individuals who have a genuine issue, however by far the vast majority to profit from this post will be those looking to unlock someone else's Mac, how would you feel if it was your machine ?
  7. macrumors newbie

    Sep 13, 2012
    You has a point. But don't forget thousands of people out there who got locked after Lion for no reason like mine and people who got locked because of icloud glitch. I bought mine over sea from an authorized dealer, there is noway to find the receipt from years ago. Brought my MBP to apple, they wanna charge me a few hundreds bucks for a new logic board! Funny, they said my logic board is "toasted"! You might have the money to keep up with that BS, but i don't. other people in similar situations don't. So please stop playing guilt trip on the guy who trying to help like that.
  8. iDesigner2, Sep 14, 2012
    Last edited: Sep 14, 2012

    macrumors newbie

    Sep 13, 2012
    @Excitewalk: I have Macdrive 9. Disk won't even show up in the list when i chose MacDrive Disk repair. When i tried it on my gf's MBP snow leopard, Disk Utility said can't repair, back up your files .... I borrowed and tried my friend's disk warrior, but no help either.

    Could it be that icloud locked and wiped clean my HDD? Is it a way to generate that file on another HDD?
  9. thread starter macrumors member


    Sep 11, 2012
    @Queen6 @iDesigner2
    You both have valid points, but let's keep this thread on topic.
    I'm open for discussion on the topic, so feel free to make a new thread in the off-topic section and invite us there to discuss the issue..

    I'm not sure what the Lion upgrade situation is right now. But to my understanding the PIN code is stored on the Hard Drive, and the firmware gets set into lock mode (independent of the hard drive). What might have happened is that the upgrade corrupted the partition. If so, then there would be no easy way to retrieve the code. Another assumption is that the firmware will allow you to boot from any primary drive. So in theory, you can install a borrowed working drive, run a firmware password retrieval from the OS, unlock the firmware, then re-mount your original drive, and re-install the OS.
    To test this theory, first try to replace the original drive with a working drive. If it boots to the OS, then things will be much simpler. You'll have 2 choices from there:
    1. Use firmware password retrieval tool and unlock the firmware to have it back to factory state (not sure how it works, never tried).
    2. Re-install the OS to the original drive from another machine and continue your business while having a locked firmware.
    If it goes to the lock screen with a working drive, then another theory is that the firmware writes a PIN code to any drive installed. If so, then run that drive through my guide and find the PIN code.
    *Caution* I don't have any external confirmations that this method works yet. So I would advise you use an auxiliary drive or at least backup the files of a primary drive if you must use it.

    TL;DR try to boot the locked machine from a working drive and let me know what happens..
  10. macrumors 68030


    Mar 22, 2011
    Tokyo, Japan
    Whatever the reason is for not knowing the code, this can be helpful for some people.
  11. macrumors newbie

    Sep 13, 2012
    Ok. So i bought a new HDD. Installed and loaded Snow Leopard on it with my gf's 13" 2010 Unibody MBP. Took the HDD out and install on the locked 15" 2011 MBP. It took the poor thing almost 20 mins to get to the folder with question mark screen. Took it out, reinstalled in the good Mac. Boot up just fine. No locked file found. I really wanna try the locked HDD on my gf's Mac to see if anything happen. Would it lock my good mac too?
  12. thread starter macrumors member


    Sep 11, 2012
    Here is another method I found by looking around.. no idea if it'll work or not..

    Back to your situation. If you have the flashing the question mark, then that usually means that the firmware cannot find a working OS. Obviously that is not true in your case as you installed it on a frsh drive. So I'm guessing the locked firmware checks for a drive with a locked OS configuration, or at the least an iCloud account. Did you take the time to setup iCloud on the new drive? If not, then I'm thinking you'll have to do your best to match the configuration on the new drive with the old drive's iCloud configuration.

    Another thing that I found when looking around is to start in Safe Mode. With the locked drive, hold "Shift" immediately after power on and it supposed to do a disk check. I'm guessing you'll have to do that from an unlocked Mac.

    Let me know if you get progress with any of these methods.
  13. macrumors newbie

    Sep 13, 2012
    OK. So for the past week, I wiped clean my new HDD again. Reinstalled Lion. This time i set up a new icloud account with my GF's 13" MBP and serial. Put it in the lock MBP. Same thing happened, folder with flashing question mark. So i guess the locked HDD should have some key data that match the locked bios in order for the locked MBP to start booting to the ACL lock screen.

    I also tried putting the locked HDD to my GF's mac. Surprise enough, it boot to the screen that ask me to repair the HDD or reinstall lion with the CD, etc. just like you boot from a bad HDD. So i tried repair HDD option. It did go through and fix a bunch of problems but still can't boot, can't access from either Mac/PC. But at least i can assume that some sort of data is still there. i'm trying everything i can think of to get whatever left on the HDD out.

    I wanna try the reinstall Lion option but would it erase the icloud lock file? If so i would be out of luck.

    Now, for the new HDD with fresh Lion and new, good icloud, should i try using find my mac and lock it down with my GF's Mac, then put it in the locked Mac? Honestly i really don't wanna go there cuz digging around the net, i saw countless of people who tried the feature with a set of code as easy as "0000" and still bricked their Mac's! Heck, mine got locked without me even touch that damn feature.

    Also, I stopped by another Apple store yesterday just to try my luck. Same old answer, either proof of purchase or new logic board. But i noticed one thing, i was there for like 90 minutes and there were 4 Macs came in for the same problem. All 4 got fixed cuz they still have receipt. Only 1 Mac Pro tower got hold till next day. The other 3 laptops, not sure what model, got unlocked on the spot. One case took the guy less than 5 minutes. If you have to sent the serial in to hub, verify all the info, hub generate key file, send it back, copy it out on flashdrive, then unlock, it could have been way longer especially during this time in the middle of IP5 hype. It got me thinking if there is a jumper on the bios or something to zap its memory, or even better a default code or key combination to unlock? keeping my fingers crossed.

    If you come up with anything else, please let us know. Thank you very much for helping people out, Excitewalk.
  14. thread starter macrumors member


    Sep 11, 2012
    If you reinstall Lion, then as far as I know, it will render that file inaccessible. Your best bet would be to do your best and recover the data from that drive.
    I'd recommend Stellar Mac Data Recovery. It runs from a Mac environment, so if you use that, then you'll need to run it from the working Mac. You'll also need an enclosure or adapter to connect to the locked drive externally to run the recovery on it. I assume the data must somehow be readable since the lock can differentiate between the two drives.

    I would not risk locking the working Mac yet as we have no idea if it will let you unlock it afterwards.

    If recovering the data does not work, then I hope you will be able to provide proof of purchase for the working Mac.. since that would be next up in the options for generating the lock files.

    Thanks for sharing your experience at the store.
    By "hub" I assume you mean something like offsite Apple servers. It could be possible that they can complete that operation in less than 5 minutes. But I'm not claiming that it is the way they do it, and I do hope there is a jumper or a master unlock code (heck, even a combo of the two).
    I would love to try and reverse engineer the lock system to figure it out.
    Unfortunately I don't have a personal Mac. The one I originally did this for was a friend's of mine. Maybe next time someone has this issue in my area I can test things out further and figure out a "soft" unlock.
  15. macrumors newbie

    Sep 26, 2012
    I was able to bypass the lock pin by

    • Removing a stick of RAM
    • Then Resetting PRAM by pressing Commmand + Option+ P + R (waiting for four Chimes)
    I never had to remove the hard drive.

    From there I was able to boot into single user mode (command + s while starting up the machine.) I could navigate to the folder \Users\username\Library\Application Support\iCloud in single user mode to locate the lock file.

    While in single user mode I mounted the root drive with write permissions (mount -uw /)

    and then was able to remove /var/db/.applesetupdone

    after rebooting I was presented with the initial welcome screen. I was able to create a new user on the system with admin privileges. Pin lock is nowhere to be found. I also removed the old users off of the system.
  16. thread starter macrumors member


    Sep 11, 2012
    @240coda, thank you very much for the input.
    1. Can you say which year and model you used the described process for?
    2. You located the lock file, and what did you do with it? Did you reboot and enter the code to unlock the Mac? Or did you stay in SUM and do nothing with the lock file?
    3. Why did you remove "/var/db/.applesetupdone"? What is it used for?
  17. macrumors newbie

    Sep 28, 2012
    I tried this method on my early 2011 macbook pro 15 with thunderbolt and this does not work after reading countless forums and guides i think the method your recommened works on previous edition macbook pros ( Not greater than the year 2011).

    @ Excitewalk thanks for working on this issue im testing the method you previously posted and am having some serious trouble. I'm using stellar mac recovery and running raw recovery from that. As previous post state : finder is not recognizing the external hard drive but disk utility is but wont mount it. I'm running this procedure on a 2008 macbook ( unibody) .

    Any suggestions what to do with stellar ? when i run quick recovery and other methods it says no data could this be a result from removing the stick of ram?a reply would greatly be appreciated.
  18. thread starter macrumors member


    Sep 11, 2012
    @Hnic313, removing RAM should not have affected the data on the drive. I always use the recover Drive option (I think that's what it's called). Try that, and you'll have to dump the recovered data to a separate drive not to overwrite what is being recovered.
  19. macrumors newbie

    Oct 3, 2012

    How can I fine someone to do this for me??
  20. thread starter macrumors member


    Sep 11, 2012
    @CalifLov, please don't quote such massive posts; if needed, just summarize it. ;)
    Say where you live, and maybe someone might be near to help you out. I am located near Portland, OR.
  21. macrumors newbie

    Sep 25, 2012
    So I managed to get the XXXXXXXXXX.lock file, but no matter how many tries I do and in the different combinations it won't unlock, is there any other alternative using the digits from that file?
  22. macrumors newbie

    Oct 3, 2012
  23. macrumors newbie

    Sep 13, 2012
  24. thread starter macrumors member


    Sep 11, 2012
    @mosarmini, got you by pm :)

    @CalifLov, I have a buddy at Grand Canyon University who might be able to help you out.

    @iDesigner2, are you up here often?
    And did you manage to get any data recovered?
  25. macrumors member

    Mar 23, 2012
Thread Status:
Not open for further replies.

Share This Page