First please fix the wifi for xcu. I can't get wifi to work on my XCU device running on G530HXCU1BPB1 firmware. I can then look into camera bug.
install my twrp, and extract zip miuibackup.zip
and paste it into internal
go to recovery select restore, and restore persist and persdata
reboot completed wifi repair in hxcu
recovery : https://drive.google.com/open?id=1xAMF2-5Ijx6Ehh7hjcnXLgaXUOPRdaBg
Backupmiui : https://drive.google.com/open?id=1G2N1TER0bLUQYIwG84vYfB9OCnXKl5tL