Forgot Restrictions Passcode?

A hard fought tale of victory

This is a long tech piece, mostly here for Google to find and help some poor soul that came after me. I will not be DenverCoder9

To help those that trod the path after me.

I forgot my restriction passcode on my iPhone. How can I reset it?

If you can’t remember your Restrictions Passcode for iOS, you can download iBackupBot, edit a preference file to include a new pin, restore from that backup, enter you new pin and it actually works. (as of Oct 4th 2016)

I am running on iOS 10, macOS Sierra, and iBackupBot 5.4.2. So this combination is guarantee to work.

I don’t remember ever setting a Restrictions passcode. I vaguely remember turning on Restrictions so I could block explicit songs, but I thought I would have used a standard passcode. Something like 1111. However, apparently I set something else I can’t remember, and after trying a bunch of times waiting for 15 minutes between guesses is not doing it for me. So I start Googling.

(spoiler alert, it doesn’t work)

After some light Googling around I found this solution.

Macintosh HD > Library > Application Support > App Store — Here you should see a file called “adoption.plist”

Select that file, hold control in the drop down select open with “Text edit”

When you open and view this file look for a line of code with the following tags <integer>XXXX</integer>
The four numbers that you will see between these tags is your “restriction passcode”

Remember that number, close the file — and you should be in.

I navigated to Macintosh HD>Library>Application Support>App Store but there was no adoption.plist. Score passcode: 1, Joshua: 0.

After some more googling, I found this video about how to use a program called iBackupBot to set a new pin. I did some research on iBackupBot and I think the program is probably safe (no promises, use at own Russian hacker risk 😷), so I downloaded it. (download iBackupBot here) Opened it, and it started trying to load my backups when I got this error.

Not great…

Can’t load backup in: /Users/joshua/Library/Application Support/MobileSync/Backup/hash Backup is encrypted, The encrypted backup of iOS 10 or later is not supported. You can make a new backup without password protected by iTunes then re-open iBackupBot.

Passcode: 2, Joshua: 0

So setting aside the fact that the English is scarily bad, I need to make an un encrypted backup. So I fire up the old iTunes and find that the Encrypt iPhone backup button is greyed out.

Passcode: 3, Joshua: 0

So I googled that problem and found this Apple thread that says to fix the greyed out Encrypt iPhone backup button I need to go to Settings>General>is Profile and delete any profiles shown. I have 2 profiles, from Crashlytics and HockeyApp, 2 development tools I have used in the past. I thought “There is no way this is going to work.”, but I don’t need the profiles so clicked into them and deleted them. It worked.

Notice how Encrypt iPhone backup is not greyed out now. ¯\_(ツ)_/¯

Passcode: 3, Joshua: 1

So I unchecked Encrypt iPhone backup, selected ‘Don’t Encrypt’ in the pop up and iTunes started backing up my iPhone again. A few minutes later I had an un encrypted backup.

I opened iBackupBot again, and select the backup I just made.

I navigated to System Files>HomeDomain>Library looking for the file

I use the search box and find it and double click to open it up.

Open that file, and I need to find the text:

<key>SBParentalControlsMCContentRestrictions</key> <dict> <key>countryCode</key> <string>us</string> </dict>

You can just search for <key>countryCode as it is not repeated in the file.

Unfortunately the search in iBackupBot is horrifically broken (Passcode: 4, Joshua: 1) so I manually look for it, scrolling through 550 lines and actually find it. (Passcode: 4, Joshua: 2)

The <key>countryCode text is near a snippet that has SBParentalControls in it so I am hopeful. Then I paste in the code to make a new PIN.


(Side note: I also had to google how to enter code blocks in Medium. ⌘ + Alt + 6 creates a code block)

I pasted it in and saved the file. Then I right clicked my device and chose ‘Restore from Backup’. iBackupBot started churning and then hit this error.

(Passcode: 5, Joshua: 2)

So I googled how to turn off Find My iPhone. Turns out it is pretty easy. Settings > iCloud>Find My iPhone. Flip the switch to turn off Find My iPhone, and enter you AppleID password. (Passcode: 5, Joshua: 3)

Select restore from backup again. It churns away for about 20 mins. I spend the time waiting and wishing I had a donut.

My iPhone boots up, I type in my AppleID password, and my Macbook Pro password which I hadn’t seen before and the home screen appears.

This is the moment of truth.

Settings>General>Restrictions> and enter the passcode we just created 1234… and holy cow it worked. 😇🐮

(Passcode: 5, Joshua: over 9000)

Since the video I originally found skips some steps, and isn’t super clear, I made this video with all the steps clearly written in the description.

Step by step. ⚡️

Hopefully it helps someone in the future.

Code, design, cook. Make stuff. Cookies. @BYU grad.

Code, design, cook. Make stuff. Cookies. @BYU grad.