Replace hand written offsets with structures.

Given that all current & future android ABIs are
little endian, we can get rid of the explicit conversions
from memory regions to little endian data members.

Also cleans up a few C style casts that snuck in during
several -Werror efforts and fixes temporary file generation
on target.

bug: 15448202

Change-Id: I4fcbb3c1124cb82c82139d328344e54fc7895353
2 files changed