if possible (hardware support) please use replicant, not cyanogen – it might fix this backdoor: http://dwaves.de/2017/05/01/the-problem-with-closed-source-driver
ClockworkMod, abbreviated as CWM, is a popular custom recovery for Android phones and tablets developed by Koushik Dutta (Koush) – a well-known name in the Android dev community. ClockworkMod recovery allows you to perform several advanced recovery, restoration, installation and maintenance operations on your Android device that aren’t possible with the stock recovery, and is one of the most common ways used to gain root access, back up device data, install custom ROMs, kernels, themes & mods, and more. However, for anyone new to Android customization and hacking, some of its options might prove to be a tad confusing. In what follows, we will cover all that this recovery is capable of doing, and how to do it.
Here is what we shall be covering in this guide: