| || |
[KOT49H 4.4.2 KitKat] *Custom recovery flashable zips to return N4 to stock*
Warning: This process is recommended for those who are familar with flashing using custom recoveries, proceed at your own risk. Make a backup of your device before proceeding. You take your own risk and I'm not responsible for any damages to your phone. If you are not familar at using custom recoveries and do not know how to use fastboot to return your Nexus to stock, stop here.
WHAT IS IT
These are flashable zip packages compatible with custom recoveries (CWM
) that will install factory stock image files to the Nexus 4 and returning it to factory state. The image files being flashed are unmodified stock image (*.img) files. The purpose I made these packages is to make it easy to return to factory stock for those who have rooted. The flashable packages will check to make sure if the device is a Nexus 4 before flashing.
1. Download the flashable zip packages and flash them using custom recoveries
Make a nandriod backup of your current working rom and copy the backup to your PC incase you need to restore it.
This is not necessary, but if you previously re-locked your bootloader, make sure your bootloader is unlocked (use this app to unlock bootloader
without wiping data) so in case things goes wrong you can install custom recovery and retrieve your data.
2. If you flashed the "system" zip package, it is not required, though highly recommended do a "factory reset" wipe or "fix permissions" to prevent system errors
The full firmware is split up into 5 packages so you can flash each "partition" individually, or retain certain ones you want to keep. Images available for flashing:[bootloader, boot (kernel), radio (baseband), recovery, system (the main OS)](download links in bottom of post)
It is recommended to wipe "system" partition first if you'll be flashing over it.Notice
: The "userdata.img
" is not included for flashing, which mean your user installed apps, settings and internal storage files will not
be erased. (This do not pertain to system installed apps (apps located in /system/app) and their settings, as well as root. These will be erased when you flash the "system" package.)
If you have flashed the "system" package, which contain the main OS files, I recommend two things before rebooting:A. Factory reset
Factory reset using custom recoveries will erase your apps and settings, but leave your internal storage files alone. This will ensure you don't have any bugs when switching between different Android version or roms.Do not use the factory reset option in stock android or stock recovery unless you must, unlike with custom recoveries they will wipe your internal storage (this is where all your photos, music and downloaded files are located). Custom recoveries leave them alone unless you specifically wipe internal storage (also known as "/data/media").B. If you want to keep your apps, settings and not do a factory reset
Do a "Fix Permissions" in your custom recovery.
Due to potential mismatching of settings between your previously installed rom and the newly installed stock rom, it may cause serious errors. This will not likely be an issue if you go from an older stock Android version to a new one. No guarantee however.
However, when the user migrate from between different custom roms or going from a custom rom back to stock while retaining apps data, issues can and will arise. You may receive a "System UIDs inconsistent
" error. If you do, boot into custom recovery and apply "Fix Permissions". This may not resolve all errors, in which case the only remedy is to do a factory reset. The results will vary depending on the rom you used previously and your specific settings.Hints:
The CWM version I'm using for the Nexus 4 doesn't include a 'fix permissions' option, you might want to use TWRP instead.
Reboot and cross your fingers.
MD5 sums How these packages are made:
-The bootloader files are taken from official Google OTA update package.
-The boot, radio and recovery img are taken from official Google factory image.
-The original system.img is 'sparse' and had to be unsparse to be compatible with custom recoveries, however all files within are unmodified. For more info, see here.
-The script file for each flash package is called "updater-script", which is located in the folder "/meta-inf/com/google/android/" in each zip files. Don't edit it if you don't know what you're doing though.