title: Android APK filepath layout for NDK binary executables how-to
body: <p>I've developed a cross-platform application that runs on Lua and Mongose. Both are binary ELF executables.</p>
  
  <p>For Android I just cross-compile both of them and launch Mongose in a background process. </p>
  
  <p>It works properly but to run them I'm doing something quite "unprofessional". </p>
  
  <p>STEP 1 - I place Lua and Mongose in assets/appFiles/bin to create the apk.</p>
  
  <p>STEP 2 - Then, at startup I check whether the bin/* files have been copied to a proper directory in getFilesDir().getAbsolutePath()+"/appFiles/bin". If that's not the case I copy them, change execution permissions, and finally run Mongose in background. </p>
  
  <p>It works, but I guess there must be a more direct way that will not require to place binary files in the asset directory and then copy to a second location.</p>
  
  <p>(The Android-NDK docs I've read speaks just about how to layout JNI libraries in jni/lib/"abi"/..., but they don't mention anything about proper file layout of ELF binary executables inside the APK)</p>