If you have Magisk installed download "File Manager" from Google Play.
Install File Manager and give it superuser permissions for all partitions ( Root, and Internal Memory)
Go into Root Directory and click search Icon and type vendor ( let it search for a few minutes) If nothing appears to happen click cancel.
You should now see several vendor folders
Click Vendor, then look for folder called Lib
Inside Lib you should see the following files that are listed at the bottom of this post.-
If you do have them then copy the files from Lineage file that Murat1150 posted
https://drive.google.com/open?id=1kW...64E5HPvyVSx5ee ( Note any Lineage Rom, or Omni Rom that you may already have downloaded will very likely already have these files as well.)
Paste them to your phone from the computer and then use file manager to paste them into root "vendor/lib/ " directory.
Download file and make a copy of needed files and paste them into the vendor/lib/ directory
Click icon with two people,
Check boxes to give Read permissions (R) permission > User ( Check) > Group ( Check) > Other ( Check)
Check boxes to give Cut permissions (X) permission > User ( Empty) > Group ( Empty) > Other ( Empty)
Reboot your phone, the camera should now work. If it does not reflash Magisk.
You need the files listed below: If you already have these files check the permissions > it has to be the issue.
vendor/lib/libSonyIMX298_ofilm_ak_PdafLibrary.so
vendor/lib/libSonyIMX298_ofilm_PdafLibrary.so
vendor/lib/libSonyIMX298_truly_ak_PdafLibrary.so
vendor/lib/libactuator_ak7371.so
vendor/lib/libactuator_bu63165.so
vendor/lib/libactuator_bu64297.so
vendor/lib/libactuator_lc898212xd.so