Android camera hardware has gotten very good in the last few years, but the quality of the images you get are largely dependent on the processing technology that a device maker has chosen to implement. When most phones have very similar image sensors, this software can make a huge difference. Slowly but surely, the power to produce better images is being granted to the users with support for RAW image capture.
If your phone can capture in RAW, you don't have to worry about substandard processing algorithms in the phone. You can take matters into your own hands. Here's how to make RAW photo capture work for you on Android.
What is RAW and which phones support it?
Most Android phones are only set up to spit out processed images that have been compressed into JPEGs. This is usually fine, but you're relying on the ability of the stock software to do the scene justice. A lot of data is thrown away in the process, and a RAW file gives you access to all of that. A JPEG from a high-resolution camera sensor might be 4-5MB on Android, but a RAW file could easily be upwards of 30MB.
These files come with file extensions like .dng and .nef (Android uses .dng). They contain virtually all the data from the sensor, so they're not ready to be tweaked with a standard image editing program or posted on your favorite social network. You need to work with each file and make changes to the colors, white balance, exposure, and more. It can be a significant amount of work, but you're not doing this because it's easy.
On Android, RAW image capture can be done in a few ways. Both LG and HTC have opted to add the ability for users to snap both JPEG and RAW with the stock camera app on the G4 and One M9. You don't need to do anything other than pop into the settings to make this work. When you press the shutter, the phone outputs a DNG to the internal storage (or microSD card in the case of the G4) along with the JPEG. Samsung is supposed to be adding RAW support to its stock camera app in Android 5.1 for the Galaxy S6, which should be out in a month or so.