title: Android Native JNI Parcel read Data
body: <p>I have the following CPP code that can be compiled using NDK:</p>
  <pre><code>char *byteData = hexToByte(&quot;41540D0A&quot;);
  Parcel req,;
  req.writeInterfaceToken(String16(&quot;com.android.systemui&quot;));
  req.writeInt32(sizeof(byteData));
  printf(&quot;original size is = %d\n&quot;, sizeof(byteData));
  printf(&quot;read size is = %d\n&quot;, req.readInt32());
  req.write(byteData, sizeof(byteData));
  req.writeInt32(255);
  </code></pre>
  <p>When I compile and run the code I got:</p>
  <pre><code>original size is = 4
  read size is = 0
  </code></pre>
  <p>What is the error with me or what is the right way to read all data from Parcel in Android ?</p>