Install or temporarily boot a custom recovery.
Flash SuperSU or other root.
See: Full rooting instructions for the Nexus 4
XDA Developers was founded by developers, for developers. It is now a valuable resource for people who want to make the most of their mobile devices, from customizing the look and feel to adding new functionality.
Are you a developer?
Copyright © xda-developers. Hosted by Leaseweb