You will need to have a rooted device to create a complete backup. If you are installing ROMs and flashing it, you probably already have root. Rooting is fairly easy for most popular devices, but you should always do it at your own risk and liability.
If you have a rooted device, you will already have a custom recovery installed. The most common custom recovery is CWM, which has a host of features for flashers.
Reboot into recovery by pressing your power, volume up and home key together or choosing recovery from your ROM’s reboot menu.
Once you are in recovery, you will see several options, including the option to flash a zip file, perform a factory reset and wipe your cache. One of the options should read backup and restore. You need to press your volume keys to navigate up and down the list and the power key to select an option.
After selecting the backup and restore option, you can choose to change the format of the backup and the location. By default the backup is created in your external memory card and the .tar format is chosen.
Once you tap on backup, the screen will change to show an Android logo and you can see text scrolling up from the bottom to provide info on the process. Don’t worry if it seems like there is no progress because the process takes time. You will see text notifying you of system backup and data backup etc. The duration will depend on how many installations you have.
After the backup is complete, the recovery will generate an md5 sum before finally notifying you that a successful backup has been created.
In order to restore a backup, you will again have to reboot in recovery, select backup and restore, tp on restore and then select the backup you want to restore.