Use these instructions at your own risk! We assume no responsibility for what happens to your phone. The instructions below WILL wipe all your personal data from your device and there is the potential to cause permanent damage to your phone. Also your warranty will probably be voided. You have been warned!
This guide was created using an Apple computer running OS X 10.9.2 and a Nexus 4 Android phone running KitKat 4.4.2. We'll try to keep the instructions as general as possible, but if you're using something other than these exact devices and software versions, the process may differ, and the suggested tools here might not work for you.

Install Android File Transfer and back up important data on phone including photos, videos, sms messages, music, etc. If you use Google to back up your contacts, double check they're all synced. This guide makes no claim that your app settings/logins will be preserved, even if you follow the backup steps described below. OK enough disclaimers, LET'S START HACKING!

You'll need to download the command line tools fastboot and adb, both for communicating with your phone while it's plugged into your computer. Various rooting packages online contain these programs but the safest place to download them is just to grab the whole Android ADK for your OS and locate these tools inside the platform tools directory. You may want to copy fastboot and adb to another folder closer to your home folder for easier command line navigation later (like your desktop).
Now let's prep your phone! First up make sure it's charged at least 80%. To communicate over USB, you'll need to enable the developer features on your phone. Inside Settings, select About phone and repeatedly tap Build number until a popup indicates you have enabled developer mode.

Go back one screen (to the main settings menu) and select Developer options. Check the box to enable USB debugging.

In Settings -> Security, check the box to allow installation of apps from Unknown sources.

If you haven't already, use system update to make sure your phone is running Android 4.4.2.
Open Terminal and navigate to the folder containing fastboot and adb (mine is a folder on my desktop called RootNexus4, seen in the Terminal screenshot above). With the phone plugged in and awake (no lock screen), type:
chmod 755 *type ./adb devices
You should see your device appear in a list and be labeled device. If your device is labeled unauthorized, be sure the phone is awake and unlocked (no passcode/lock screen) and try unplugging/replugging. Then type:
./adb backup –apk –all –f backup.ab
to initiate a system backup (system and app settings), and confirm the backup on your phone's touchscreen. This can take up to 20 minutes or more. If it finishes instantly, be suspicious. Remember, we're not guaranteeing anything here-- you may lose your system and app settings if this backup is not performed/restored successfully.

You already remembered to separately back up your important files like photos and videos, right? The next step will wipe all the personal data from your device, so now's your last chance to back up. When the backup is finished, power down your phone and unplug it from USB.

Press and hold the Power and Volume down buttons until you see the bootloader menu. The bottom line of text should say your phone is locked.

Now plug your phone into your computer with a microUSB cable.

In Terminal type:
./fastboot oem unlock
This will erase all your data! You made a backup, right?!

Press the Volume up button to select Yes. Then press the Power button to confirm. After erasing, the bottom line of text should now say unlocked. Congrats, you unlocked the bootloader! Press the power button again to reboot your phone.
Set up your phone as if it were new (enter your info), or skip through if you plan to restore your settings from a backup. Check for system updates in Settings->About phone, and perform any system updates required to get you to Android 4.4.2 if you haven't already.

In Settings -> About phone, you will have to re-enable developer options by tapping the build number repeatedly, then in Developer options turn USB debugging back on. In Settings -> Security, re-check Unknown sources to allow apps from unknown sources.
Install CyanogenMod, the easiest way is to visit on your device (you'll also have to download the desktop installer for mac during this process - G+ support community)

All that modding was for one purpose: to swap out the NfcNci.apk file, which is accomplished by downloading and running this updater for NfcNci.apk for cyanogenmod11/android 4.4.2. Use Android File Transfer to drag this zip file onto your phone.
To run this updater (.zip), power down your phone and re-start in bootloader mode (holding power and volume down buttons). Press the Volume down button until the option Recovery mode appears. Press the Power button to select and launch into recovery mode.
Using the Volume down/up buttons to scroll and the Power button to select, scroll to and select install zip then choose zip from /sdcard.
select /0 then scroll to the updater zip file and select it. Scroll to and select Yes on the confirmation screen, which will run the update and install the custom NfcNci.apk file.

Then select go back until you see the reboot system now option, and select it to restart your phone.

Congrats, now your phone will poll NFC on the lock screen! Test it out by holding a tag to your phone when the screen is on but still locked-- you should hear the quiet noise that indicates a tag has been read!

Now it's time to set up the custom actions that will unlock the phone when the correct NFC tag is near the phone.
Google publishes factory images for its devices, so if something goes wrong, you can always download and install previous/fresh versions of the operating system. I found my phone softbricked whenever I tried to manually install Android KitKat (4.4) or manually update the NfcNci.apk file, and so eventually I reinstalled Jelly Bean (4.3) and used the built-in system update to get my phone up to 4.4.2, required for this guide.

This guide was first published on May 14, 2014. It was last updated on May 14, 2014.

This page (Mod Android Installation) was last updated on May 08, 2014.

Text editor powered by tinymce.