Google makes it pretty easy to flash custom software on their Nexus line of devices, primarily due to the fact that Nexus devices are aimed at developers. However, before one can attempt to tinker with the system by rooting or flashing unofficial ROMs, the bootloader on a Nexus device needs to be unlocked.
Now while the process to unlock the bootloader is quite easy and straightforward, all the data on the device is wiped whenever the bootloader is unlocked (using the “fastboot oem unlock” command in a shell or terminal). This is done in the interest of the consumer for security reasons, so that someone can’t access your data by unlocking the bootloader, but for those looking to flash custom ROMs, etc it can be quite irritating to have to back up and restore all data.
However, if you have a rooted Nexus 4, Galaxy Nexus, or Nexus 10, BootUnlocker is an app that can let you unlock and re-lock your device’s bootloader while keeping all your data safe. The app does it all from right inside your device, without needing a USB cable or even a reboot of the system, making it extremely easy and quick to lock and unlock the bootloader whenever you need it.
BootUnlocker works by bypassing fastboot for unlocking the bootloader and directly writes to the partition on the internal storage (the “param” partition) that stores the status of the bootloader. Since the official “fastboot oem unlock” command is unused, the instruction to wipe data is never passed to the device, hence preserving all data on it.
BootUnlocker needs root access as mentioned above, and works on the Galaxy Nexus (all variants), Nexus 4, and the Nexus 10. I should warn you though that if you intend to re-lock the bootloader on your device, you should make sure you flash back to stock official firmware and kernel before doing so, as a locked bootloader doesn’t let the device boot up with unofficial software/kernel.
Hit the link below to download BootUnlocker from the Google Play Store, and enjoy hacking away on your Nexus without worrying about its data getting wiped when you unlock the bootloader.