When I install the Android NDK, I like to put it into /usr/local/android-ndk-r5b since it seems to be a logically place to be. That means installing as root, or using sudo. The Android NDK is setup without ‘other’ permissions, so this means you get odd problems and Permission denied errors when trying to use ndk-build, etc. To fix this:
sudo chown -R root.root /usr/local/android-ndk-r5b/
sudo chmod -R a+r /usr/local/android-ndk-r5b/
sudo find /usr/local/android-ndk-r5b/ -perm 754 |xargs sudo chmod a+x
sudo find /usr/local/android-ndk-r5b/ -type d | xargs sudo chmod a+x
September 6th, 2011 at 4:31 pm
made a little edit, changed `chown -R root` to `chown -R root.root`