How format nexus 4 before flashing new ROM I have a Google Nexus 4 (mako) and I had installed cyanogen mode which accidentally showed a loop error message like "... has unfortunately closed" telling that several google apps and wizards had been closed.

What I tried to DO:

Now I want to re-install cyanogen. Because cyanogen is outdated I decided to flash the latest lineage ROM. My recovery (CWM version 6) is still unlocked, so I decided to do the fallowing:


Turn off the device
Go into boot loader mode by pressing Volume down and power and selecting to start recovery mode.
Wipe Data / Factory Reset
Enter side load mode and install lineage:
adb sideload lineage-*.zip
Reboot.


After that lineage os booted and showed the same errors than my old cyanogen ROM. There are even error messages regarding some google apps, although they are not installed.

Possible solution:

It seems that the wipe data / factory reset did not delete the whole cyanogen mod. It seems just to delete user data. I think I need to format the whole device. Last time this maybe was done while unlocking the boot loader.

Question:

How to format Nexus 4 before flashing a new ROM.
CWM is long dead, let it stay that way.

You are advised to use the latest TWRP recovery, which has an interactive graphic interface, has a more powerful and thorough wipe function, and has an inbuilt file explorer so that you could just look inside /system to see if the wipe indeed worked (don't forget to mount /system before looking in, though).

After installing TWRP, select Advanced wipe: /data, /cache and /system. Actually it shouldn't be necessary to wipe /system, since newer Android ROMs overwrite the whole /system partition, but since you claim you need a full wipe, this will do.