Permissions problem with Android SDK under OSX

You must Login before you can answer or comment on any questions.

I have installed the latest Android SDK and Titanium. I am able to compile and use Kitchen Sink on the iPhone emulator but not the Android emulator. When I run a trace, it seems that I am running into permission errors:

[TRACE] File "/Library/Application Support/Titanium/mobilesdk/osx/1.4.1.1/android/androidsdk.py", line 166, in list_devices [TRACE] (out, err) = subprocess.Popen([adb, 'devices'], stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate() [TRACE] File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/subprocess.py", line 595, in init [TRACE] errread, errwrite) [TRACE] File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/subprocess.py", line 1106, in _execute_child [TRACE] raise child_exception [TRACE] OSError: [Errno 13] Permission denied

Any ideas how to fix this issue? I'd really like to get going with Android development with Titanium!

David Anderson

7 Answers

David / Philip

Make sure you follow the information in Preparing for Android development, but in addition also be aware that package "SDK Platform Android 1.5..." also needs to be installed due to a bug explained in ticket #2813. When this ticket is closed, SDK 1.5 cam be uninstalled/removed.

— answered 3 years ago by Paul Dowsett
answer permalink
1 Comment
  • I've completely removed and reinstalled Titanium and the android sdk. Still unable to create a new mobile project using 1.4.2 Titanium SDK. Does anyone have any clues as to what exactly doesn't have correct permissions?

    All other SDK versions are able to launch the Android emulator.

    Below is the error I see in trace:

    [DEBUG] Waiting for device to be ready ... [TRACE] Traceback (most recent call last): [TRACE] File "/Library/Application Support/Titanium/mobilesdk/osx/1.4.2/android/builder.py", line 1015, in <module> [TRACE] s.build_and_run(False,avd_id) [TRACE] File "/Library/Application Support/Titanium/mobilesdk/osx/1.4.2/android/builder.py", line 788, in build_and_run [TRACE] self.wait_for_device('e') [TRACE] File "/Library/Application Support/Titanium/mobilesdk/osx/1.4.2/android/builder.py", line 166, in wait_for_device [TRACE] devices = self.sdk.list_devices() [TRACE] File "/Library/Application Support/Titanium/mobilesdk/osx/1.4.2/android/androidsdk.py", line 166, in list_devices [TRACE] (out, err) = subprocess.Popen([adb, 'devices'], stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate() [TRACE] File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/subprocess.py", line 595, in init [TRACE] errread, errwrite) [TRACE] File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/subprocess.py", line 1106, in _execute_child [TRACE] raise child_exception [TRACE] OSError: [Errno 13] Permission denied

    — commented 3 years ago by philip broadway

Hi, I just had this issue to. The reason is you have to chmod the "/System/Library" directory to allow access 775 should to it. Hope that works for you! E-mail me at unger.steven139@gmail.com if you need me to walk you through it.

— answered 3 years ago by Steven Unger
answer permalink
1 Comment
  • Well unfortunately, there must be other permissions which are set incorrectly because everything in the Library is now 775 and Titanium is still giving up the same error. It appears from the trace that a Python script (in the Library) is being executed and the file that it is trying to open a file that it does not have permission to open (using pOpen). I don't know which file it's trying to open so I don't know where to change the permission. :/

    — commented 3 years ago by David Anderson

Cool. That was my first inclination but I thought it would be prudent to get some confirmation. Thanks!

have the exact same error. has anyone found a workaround for this -- changing permissions on /System/Library doesn't seem like the right thing to do.

  • Only happens when I use the 1.4.2 mobile sdk.

  • Can create a new mobile project, and use any version of mobile sdk except 1.4.2 and thats the version I need to use.

I'm getting the same issue here... using Android SDK 1.5 (although I have 1.6 as well), Titanium 1.2.2, Mac OSX.

[TRACE] errread, errwrite)
[TRACE] File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/subprocess.py", line 1106, in _execute_child
[TRACE] raise child_exception
[TRACE] OSError: [Errno 13] Permission denied
Does anyone have the definitive solution out there?! Much appreciated :-)

— answered 3 years ago by Andy Whitwood
answer permalink
1 Comment
  • I finally was able to get 1.4.2 working. + I completely removed my android environment, including the .android/ and .titanium/ folders in my home directory.

    • Reinstalled android avd package manager and then used that re-download all the android sdk's and google toolkit

    • Copied the adb binary from the android folder's platform-tools/ to the tools/ folder (before I had made a symlink, and im not sure if maybe that was part of the permissions issue)

    basically a fresh install seemed to help me -- hope this helps you too.

    best,

    -p

    — commented 3 years ago by philip broadway

after making a symlink of adb into "tools" directory, don't forget to chmod +x the adb

Now it's working for me.

Your Answer

Think you can help? Login to answer this question!