From what I could find only the front camera is shared between the s7, s7 edge, and s7 active. When it comes to the back camera however, there’s three variants and you have to use the correct one or it won’t work. It should tell you who made the camera on the flex cable so you’ll need to disassemble the phone. You can find them here: https://www.mobilesentrix.com/replacement-parts/samsung/galaxy-s-series/samsung-galaxy-s7-edge