Search

Nexus 4 - Upgrade your Rooted Phone to Kitkat keeping all your Data

Contents[Hide]

dropcap-android-kitkat-rooted

nexus4-kitkatIf your Nexus 4 is rooted and using a custom recovery, latest Kitkat OTA update may completly crash your phone. This is what has happened to mine two days ago ...

If you really want to try the OTA update, make sure you've done a complete ROM backup with your recovery. It may save your data !

Otherwise, this article explains how to safely upgrade your rooted Nexus 4 running a rooted stock Jelly Bean 4.3 and a custom recovery to the latest Kitkat 4.4 without losing your data. As a result, you'll have upgraded your Nexus 4 the same way as with an OTA update. 

It is using ADB tools and latest factory image published by Google.

As a pre-requisite, you must have latest Android SDK or latest ADB package installed on your computer. An installation guide is available for Ubuntu computers.

It has been tested on a Ubuntu 12.04 computer, but it should work on any computer with an operational ADB setup.

As this guide involves flashing a ROM, you need to know what you are doing. It is meant for advanced users only.
In case of major problem during the flashing process, which is very unlikely, a backup will be the only way to retrieve your data.
So, once again, make sure to have done a ROM backup.

1. Download factory image

First step is to retrieve latest Kitkat factory ROM for Nexus 4.

You will get it from https://developers.google.com/android/nexus/images.

Download latest Nexus 4 Kitkat image. You should get a occam-krt16s-factory-2006f418.tgz file.

Extract this archive, open a console and go in the newly created occam-krt16s directory.

2. Flash factory image in upgrade mode

The directory contains a flash-all.sh that does all the job ... but it also wipes all your data !

This script handles the following steps :

  1. flash new bootloader
  2. flash new radio
  3. flash new recovery
  4. update system partition
  5. wipe data partition

So, to be on the safe side and preserve our data, we will run the same commands as this script, but we will remove the wipe option -w  that asks for the data partition wipe.

# sudo fastboot flash bootloader bootloader-mako-makoz20i.img
sending 'bootloader' (2203 KB)...
OKAY [ 0.089s]
writing 'bootloader'...
OKAY [ 0.323s]
finished. total time: 0.412s
# sudo fastboot reboot-bootloader
rebooting into bootloader...
OKAY [ 0.001s]
finished. total time: 0.001s
# sudo fastboot flash radio radio-mako-m9615a-cefwmazm-2.0.1700.84.img
sending 'radio' (45537 KB)...
OKAY [ 2.755s]
writing 'radio'...
OKAY [ 2.639s]
finished. total time: 5.394s
# sudo fastboot reboot-bootloader
rebooting into bootloader...
OKAY [ 0.001s]
finished. total time: 0.001s
# sudo fastboot update image-occam-krt16s.zip
archive does not contain 'boot.sig'
archive does not contain 'recovery.sig'
archive does not contain 'system.sig'
--------------------------------------------
Bootloader Version...: MAKOZ30d
Baseband Version.....: M9615A-CEFWMAZM-2.0.1700.97
Serial Number........: 01ab0848df57210f
--------------------------------------------
checking product...
OKAY [ 0.002s]
checking version-bootloader...
OKAY [ 0.002s]
checking version-baseband...
OKAY [ 0.002s]
sending 'boot' (6360 KB)...
OKAY [ 0.374s]
writing 'boot'...
OKAY [ 0.355s]
sending 'recovery' (6908 KB)...
OKAY [ 0.425s]
writing 'recovery'...
OKAY [ 0.393s]
erasing 'system'...
OKAY [ 0.618s]
sending 'system' (700496 KB)...
OKAY [ 42.944s]
writing 'system'...
OKAY [ 42.032s]
rebooting...
finished. total time: 87.156s

The phone is now flashed with a stock, unrooted Kitkat image !

All your data should be preserved.

3. Re-Install TWRP recovery & Re-Root

As the update has installed a new stock recovery and has removed your previous root, you'll need to re-install a custom recovery and to re-root your device.

All these steps are explained in this article. You have to follow all the steps from step 3 onward.

Once all the steps are done, you should be rebooting under a rooted Kitkat image.

 

Then, you should notice that all your data have been preserved, even the SU authorization list.

Enjoy your brand new Kitkat device.

Hope it helps.

Signature Technoblog

This article is published "as is", without any warranty that it will work for your specific need.
If you think this article needs some complement, or simply if you think it saved you lots of time & trouble,
just let me know at This email address is being protected from spambots. You need JavaScript enabled to view it.. Cheers !

icon linux icon debian icon apache icon mysql icon php icon piwik icon googleplus