Search code examples
androidmacosterminalosx-mavericksandroid-sdk-tools

OSX Maverick: Run anddroid SDK from an external hard drive (different from the default Machintosh HD)


I want to run the Android from an external HardDrive on OSX Maverick because my Macbook Air doesn't have enough space on the Machintosh HD.

My problem is, when I run the "android" command, the shell script doesn't find the basics system commands:

$ android /Volumes/ValVMS/Adroid

SDK/adt-bundle-mac-x86_64-20140702/sdk/tools/android: line 30: dirname: command not found /Volumes/ValVMS/Adroid

SDK/adt-bundle-mac-x86_64-20140702/sdk/tools/android: line 33: basename: command not found /Volumes/ValVMS/Adroid

SDK/adt-bundle-mac-x86_64-20140702/sdk/tools/android: line 40: dirname: command not found /Volumes/ValVMS/Adroid

SDK/adt-bundle-mac-x86_64-20140702/sdk/tools/android: line 44: dirname: command not found /Volumes/ValVMS/Adroid

SDK/adt-bundle-mac-x86_64-20140702/sdk/tools/android: line 48: basename: command not found

:can't find sdkmanager.jar

Everything works fine when I use the default Machintosh HD.

I'm looking for a way to relay the paths from the Machintosh HD to my external HD and run the commands from this one.

Thanks for your help.


Solution

  • The android file is just a shell script. Can you try sh android and let me know what happens?

    I just downloaded the Android ADT and extracted it to an external USB 2.0 disk. Unzip, open terminal (I use iTerm), cd to the folder and just run the command above.

    It worked perfectly for me. The Android SDK Manager opens up.

    This should have actually gone in as a comment but I don't have the rep to do so! Please feel free to delete the answer if it serves no value!