title: How to unpack some files from .apk to /data/data/<package> folder while installing the .apk?
body: <p>My android application needs another NATIVE application executable to run before the android one, so that they can communicate through sockets. Android application has a JNI layer for handling the client-side communication.</p>
  
  <p>Now i need to bundle up the native executable along with the apk file, so that when it is installed on a device it gets unzipped into either the phone memory or the memory card.</p>
  
  <p>How do i do this? 
  I tried keeping the native executable in res/asset and in res/raw folders, but they still don't get unzipped in /data/data/ folder.</p>
  
  <p>One way I could find is to use AssetManager and then with help of InputStream and OutputStream, i can write this file onto the device the first time it is run and then use it. But there is no point to write it manually on phone memory as it might eat up the memory. ( the case where if memory card is not present. )</p>
  
  <p>Can anyone help me on how can i achieve this? It would be great if there is an option to unzip the necessary files automatically at the time of installation.</p>