Dumping stock firmware
It is a good idea to dump the stock firmware (full flash contents) of your device before flashing custom firmware.
Currently, the easiest way to dump firmware is to use ltchiptool. Download/install the tool, and follow the guide.