title: Android: Impossible to obtain RAW image data from camera?
body: <p>Currently planning on doing a photography app utilizing RAW data provided by the camera in Android devices.</p>
  <p>I wrote a quick skeleton using the camera API and noticed that in the callback with the RAW image data, the data buffer given is always NULL, regardless of how large or small I make the image, but I'm able to access the JPG buffer.</p>
  <p>I did some searching and found this thread:
  <a href="http://markmail.org/message/sraudbyrsi2hjqfr#query:I%27m%20talking%20about%20deprecating%20the%20raw%20picture%20callback%20that%20has%20never+page:1+mid:sraudbyrsi2hjqfr+state:results" rel="noreferrer">http://markmail.org/message/sraudbyrsi2hjqfr#query:I%27m%20talking%20about%20deprecating%20the%20raw%20picture%20callback%20that%20has%20never+page:1+mid:sraudbyrsi2hjqfr+state:results</a></p>
  <p>Which mentions that at the time of that writing (February 2009), it &quot;had never worked&quot;. So, am I right to assume that today it still doesn't work, or am I perhaps setting something up incorrectly?</p>
  <p>The phone I'm using to debug with is a Droid X.</p>
  <p>Just confused because I do see that the API mentions that the RAW data buffer in the callback can be null if there isn't enough memory available on the device, but it's being returned as null even when I set the image to extremely small sizes(100x100)</p>
  <p>Thanks</p>
  <p>Edit:</p>
  <p>Adding some debug output which I get from LogCat:</p>
  <blockquote>
  <p>DEBUG/CameraHal(1156): Initializing capture memory raw: 0x42d39000 (155648), jpg: 0x429c4000 (57856), pv 0x42d5f000 (276736)</p>
  <p>DEBUG/CameraHal(1156): Received raw yuv 0x4119f000 size 153600<br />
  DEBUG/CameraHal(1156): Received jpg 0x429c4000 size 57584</p>
  <p>DEBUG/CamTest(4716): RAW callback- data is NULL<br />
  DEBUG/CamTest(4716): JPEG callback- data is valid</p>
  </blockquote>
  <p>&quot;CamTest&quot; is my custom debug output.</p>