I'm using the factory camera app on Android emulator (API 25, 26) to take captures of the emulated camera. It seems that when the orientation is portrait, the captures are rotated by 90 degrees.
Camera preview:
Captured image:
How come it's rotated by 90 degrees? The EXIF data seems to suggest the orientation is 0.
Any thought appreciated.