title: Android APK refuses to install its native .so into /data on some devices
body: <p>I successfully compiled and packaged the NativeActivity example from the Android NDK. It runs fine in the Android emulator and even on a TI OMAP3621 device (Nook Color). However, it crashes on a Tegra 2 device. I also noticed that the .so included in the APK is getting copied to /dev/dev/com.example.native_activity/lib/libnative-activity.so on the Nook, but not on the Tegra 2 phone. The /data/data/com.example.native_activity/lib directory is indeed created, but the .so that should be in there is missing! I even tried copying the .so in there manually, but the app still crashed when I tried to launch it.</p>
  
  <p>Why would the installer allow the APK to install, but refuse to copy the .so?</p>
  
  <p>The emulator is running Android 2.3.3
  The Nook Color is running Android 4.0.4
  The Tegra 2 phone is running Android 2.3.7</p>
  
  <p><strong>Update:</strong></p>
  
  <p>It turns out the app <em>does</em> run if I copy the .so to /data manually. So the problem now seems to be due to aapt's packaging, since when the phone installs the app it does not copy the .so. I am using aapt from the command line (not through Eclipse), so perhaps I'm not using the right options when including shared libraries. Can someone explain how aapt packages an APK that contains native shared libraries?</p>
  
  <p><strong>Another Update:</strong></p>
  
  <p>Well, this is weird. I just discovered that if I install the APK, then immediately get application info on the installed app and "Move to SD card," it works! The .so is copied to /data/data/com.example/native-activity as expected. And if I then choose "Move to phone," it works, too!</p>
  
  <p>I am running Cyanogenmod 7 on a Tegra 2 device. Why would this work when moving/installing to the SD card, but not the phone?</p>