Full backup of only firmware and ROM from non-rooted Android devices (namely Samsung devices)
So, after the discussion in the comments you can backup the phone using the command adb backup [-f &lt;file&gt;] -all to backup all of your data, where file is you should put a recognizable name for the back up to track it easier when you will need it. Store it somewhere safe.

If you will ever need that you can use the command adb restore *name of the backup* after the flashing of the stock firmware and all will be as you wanted it.

There is more: in the case you don't want to backup ALL data, you can leave the -all option and use specific selections: 

-obb/-noobb: you can save the OBB data of every application

-apk/-noapk: you can save the application themselves

-shared/-noshared: you can do a backup of the SDCARD contents

-system/-nosystem: backup of system apps (stock ones)