How to install Omnirom on your device :
1- TWRP required 3.2.1.0
2- Install required firmware 8.2.1
3- Format your data partition with special button for this.
4- Format all other partition.
5- Install Omnirom & Gapps & Root.
6- Reboot.
To solve the camera error, do the following: (Thanks to
@NicolasMesaH)
After installing Gapps, Cam does not work, it shows "Force close" message. To solve this, use a root file explorer or TWRP file manager, delete the files
/System/framework/com.google.android.camera.experimental2016.jar and /System/etc/permission/com.google.android.camera.experimental2016.xml.
Delete app data and restart the phone.