Flashing a stock Android image without wiping user data

Software Android

Until today my Nexus 10 was running Android 4.4.2 (stock firmware from Google). I couldn’t install the OTA update to 4.4.4 because I had installed a custom recovery (TWRP) in order to root the device. So today I decided to reinstall the stock recovery and install the update… But the installation failed. The tablet was able to reboot, but it showed that is was still running Android 4.4.2, but cound not find any update anymore. Weird…

(IMHO the problem that happened is that when I reinstalled the stock recovery, I installed the version from the 4.4.4 firmware, but the OTA update expected to have the version from the 4.4.2 firmware. Can this cause the install to fail like this? Not sure, but I have no other explanation.)

So in order to update to 4.4.4 without wiping my device I had to do it by hand:

And voilà! The device booted to Android 4.4.4 and I didn’t lose my data. However root access was lost, but that is extremely easy to restore:

I’m sure all of this is common knowledge for a lot of people. But it’s not obvious to me, so I’m just putting it here for the next time I need it 😃

EDIT: Just tried it and I can confirm that it works well to upgrade from Android 4.4.4. to Android 5.0 “Lollipop”!


Join the conversation by sending an email. Your comment will be added here and to the public inbox after moderation.


OTA is meant to be used on 4.4.3, not 4.4.2.

Makunada Shrestha

Nice article. It worked flawlessly for me. Thanks

Old Man

Great article, short and precise. Worked perfectly updating from 5.1 to 5.1.1 on a rooted nexus 7 2012 mobile. Thanks

Kemal Tolga Oksay

Thanks man used it for 2 times, works flawlessly.

Said Tahsin Dane

This is actually really useful. Thank you very much.The same weird problem is happening to me everytime. For example I had Android 5.1 with TWRP installed on Nexus 5 and I tried to flash the official update “to 5.1.1 from 5.1” and the error said “you have release keys of 5.0.2” and expect me to flash the update for 5.0.2 which also doesn’t work.It is really really weird and it happens all the time when I root my phone. This is the best way to update the rom. I wish we had a better way.


@Said I had the same issue when upgrading from Kitkat to Lollipop on my OPO. If I remember correctly, you have to upgrade TWRP to the latest version available. It’s required to install recent ROMs.

Wadee Bashour

Thank you very much !!!!! now i can update via OTA


Would this work with a custom kernel?


@Bogdan, depends on the kernel, but I’ve used it in the past with my Galaxy Nexus and custom kernels. You can flash the kernel with “fastboot flash boot.img” in bootloader mode, or a kernel .zip from recovery.

Kai Yang Lim

I am using nexus 6p, in my image factory file, I don’t have boot.img, system.img, recovery.img ..


Worked for me as well…
After bricking my software, I stuck on load screen, so I tried so many ways to flash original Rom for my Huawei G6-L11, but always had some errors . And this method worked like a charm. All I did was flashing system.img and my phone was back to life.