 <p>ARM support both big and little endian. This will most probably be set by the OS so it might be worth while checking this out beforehand.</p> <p>There is also the issue of padding to word size in a struct:</p> <pre><code>struct st { char a; int b; }; </code></pre> <p>will have a <code>sizeof</code> 8 and not the expected 5 bytes. This is so that the int will be word aligned. Generally align everything to 4 bytes and probably use the gcc packed attribute (<code>struct my_packed_struct __attribute__ ((__packed__)) </code>) as well. This will ensure that the internals of the struct are as you expect.</p> <p>Alternatively use the Android Simulator to generate the data file for you.</p>