[G3 Q&A, Help & Troubleshooting] felmaster:
Hi, I also miss the superior quality of camera from stock ROM. I was trying to follow some tutorials on porting vendor apps to AOSP (getting the camera apk file, some libraries, framework files and permission files and compiling them all together), but it never worked with the camera. Sadly, I'm pretty sure that if it was possible, somebody smarter would have already done it. With LG being jerks and not releasing the sources, we most likely won't get the stock camera on AOSP, ever. That being said, I can think of four possible ways of dealing with the situation.

First, use stock ROM only. Yes, I know, that sucks. Or stock based ROM such as Fulmics, if you really think there is a difference between these two.

Second option is multirom. I was using it for last few months with LineageOS as primary and stock as secondary ROM, and everytime when I knew I would be taking some photos (when I went to concerts/holidays/celebrations/some unusual stuff), I booted to stock ROM and was good to go.

Third option is to have a TWRP backup of your current system and of stock ROM and restoring the backup of the ROM you want to use (AOSP for daily usage, stock for the days you know you'll be using your camera a lot). The previous (multirom) option is faster and easier to manage, and you can always add new ROMs and experiment as you wish. However, it requieres a custom recovery and I wasn't able to pass SafetyNet test with multirom and LineageOS with Magisk. Also, multirom makes a little bit of a mess at your /system partition. This third option (backing up/restoring system in TWRP) takes longer, the backups are large, but I'm liking that a bit more for some reason - it feels "cleaner" and more transparent to me.

The last option is to be on AOSP and use a camera app of your choice which you find has the best quality. I was experimenting with this a lot and tried dozens of camera apps (including the LG G2 camera port). Honestly, most of the photos were about the same quality. Even the G2 camera wasn't better than the rest I tested. I also compared the test pictures to stock camera (yes, I took the time to reboot to my secondary ROM for every test I was making at that time) and I was very sad that nothing was close to the stock camera quality. LG really does some magical post processing which works like a charm and looks really good. Anyways, after the tests I decided to stick with Snap Camera HDR. It has a trial and a paid version on the Play Store, in case you want to give it a shot. At good light conditions, the photos are actually comparable to stock camera. There is tons of settings to play with. It has a special "LG mode", which actually works even on AOSP ROMs and enables some LG specific features. It can also record 4K videos with stabilization. If you give it a try and really look into the settings (I recommend going also to the developer's website, where every option in the settings is described), you might end up with decent stock camera replacement. It took me about an hour to go through all the settings, but I'm fairly satisfied with the photos now. Although it has been last updated almost a year ago on the Play Store, there is a much more recent beta version here on the xda forums.

tl;dr I believe that porting stock camera app to AOSP is impossible. If you want stock camera quality, you really have to use stock ROM one way or another (either be on stock, or have a stock ROM TWRP backup and restore it whenever you want to take a good photo, or use multirom to switch your current ROM more quickly). If you want to use AOSP exclusively, I recommend Snap Camera HDR.