How to root Google Nexus 4

Little article to explain how to root the Nexus 4 (of course using a GNU/Linux distro!).

Unlock the bootloader

Since this is a Google Phone, it’s very easy and do not require special tools, but only the Android SDK with adb (on Archlinux you can install it via AUR package android-sdk-platform-tools) and of course you need to plug an USB cable! Just type:

adb reboot bootloader

When your are in the bootloader, use the command “fastboot” given by Android SDK to unlock it. Warning! It will wipe all your data!

fastboot oem unlock

Install custom recovery image

Reboot again to the bootloader and flash a custom recovery image. I recommend to use Clockwork Recovery.

fastboot flash recovery '/path/to/the/recovery/image/recovery-clockwork-'

Now, the Clockwork Recovery should be installed in place of initial recovery. Reboot in normal mode, download SuperSu and put the zip file in the root of sdcard.

Root it!

Reboot in recovery mode (using adb or vol down + power.) and install SuperSu using “install zip from sdcard”. And your done, your Nexus 4 is now rooted!

Bonus: You can now replace SuperSu by Superuser (found on F-Droid), an Opensource clone to the binary “su” and the Android Application which permit to authorize applications to be root.

Great Opensource applications for Android

A list of Opensource applications for Android that I have tested and approved! You can find these applications on Google Play or better on F-Droid! (Note: I update this article from time to time).

  • AdAway – No ads!
  • APV PDF Viewer – A simple but smart PDF viewer.
  • Authenticatior – Used for Gmail Two factor authentication.
  • Barcode Scanner – Really need to explain?
  • Battery Widget – Little widget which display percentage and temperature of the battery.
  • CIDR Calculator − For {net,sys}admin.
  • Bubble – A tiny level gauge which works well!
  • F-Droid – Opensource applications repository.
  • Firefox – Best browser in the world?
  • Hacker’s Keyboard – Nice keyboard to type commands in shell.
  • Irssi ConnectBot – Great ssh client.
  • Hacker’s Keyboard – A keyboard like a real keyboard, nice to use when using ConnectBot!
  • KDE Connect − Have notifications or other things to your KDE Desktop.
  • KeePassDroid – To manage passwords.
  • Mifare Classic Tool − Read data on NFC chip (Mifare).
  • Muzei − Live wallpaper of famous art, or from your pictures, nice dim and blur effect.
  • Narau − Japanese revision help.
  • oandbackup − Backup manager (needs root).
  • OpenCamera − Great camera app if you come from DSLR world.
  • OI File Manager – A lightweight file manager.
  • OSMTracker – Tracking using GPS, useful to contribute to OSM 🙂
  • primitive ftpd – A very little ftp daemon, usefull for accessing your data in WiFi.
  • Send reduced − Reduce image size, great for sending tweets.
  • Secret Codes − Scan your device from secret code like which permits to open hidden menus.
  • Search Light – Fucking all flashlight apps are crap, not this one!
  • Slight backup – I use it to backup SMS and call-logs.
  • Superuser – Replace SuperSu which permits to manage root access.
  • TTRSS-Reader − An RSS reader for Tiny Tiny RSS instance.
  • Terminal Emulator – Because you can’t live with no terminal!
  • Trolly – Lightweight shopping list.
  • Twidere − A nice twitter client.
  • Wikipedia – More lightweight that using a browser.

And you, what Opensource apps do you use on your Android?