Tuesday, May 26, 2009

Ooops!..., they did it again

Once again, the new android sdk 1.5 r2 for Linux is distributed as a zip file and if you intend to use it in a multi-user development environment and install it as root to protect it from unintended changes you'll find some problems.

But again, here you are a shell script to fix the permission problems, also useful if you are building packages for your platform. Set the SDK_DIR variable accordingly to your installation.


#! /bin/bash

SDK_DIR=${SDK_DIR:-/opt/android-sdk-linux_x86-1.5_r2/}

sudo find $SDK_DIR/ -type d -exec chmod a+rx {} \;
sudo find $SDK_DIR/ ! -perm -044 -exec chmod g+r,o+r {} \;

Hope it helps.

No comments: