0

This is a recurrent question, and it seems it has several reasons. I cannot discover mine, even after googling. Several people had answered this question, though.

The problem is that when I try to run an android project with Eclipse and ADB, I get:

Failed to get the adb version: Cannot run program "/extraHD/android/android-sdk-linux/platform-tools/adb":
error=13, Permission denied from '/extraHD/android/android-sdk-linux/platform-tools/adb'
- exists=true

Some data: 1) /extraHD is my second HD, 180GB free, where I have full permissions 2) adb executable has full permission 777 3) If, after 'cd /extraHD/android/android-sdk-linux/platform-tools', I run any of these (no adb process running):

./adb 
./adb shell
./adb start-server
./adb kill-server
./adb shell kill you
./adb root
./adb remount

I get the very same answer:

bash: ./adb: Permission denied

And same answer when executing as root! I can create/delete files in that directory, even as a normal user...

Same problem after reinstalling ADB, both through Eclipse and zip file.

Rebooting didn't work either.

I get the same problem with /extraHD/android/android-sdk-linux//tools/emulator.

Tried fsck, reinstalled Eclipse, reinstalled Tools and Platform-tools (adb in particular), reinstalled the APIs. Same thing.

Clues??

Junaid
  • 2,084
  • 1
  • 20
  • 30
Luis A. Florit
  • 2,169
  • 1
  • 33
  • 58

1 Answers1

1

I had a similar problem and I solved it by doing the following (mounting the sdk partition at boot time and changing permissions in fstab in order to allow writing in Windows NTFS partition):

  1. Open a terminal, you can use Ctrl+Alt+t

  2. Use 'blkid' to list the block devices and print the universally unique identifiers (UUID)

    sudo blkid
    
  3. Locate the line with the label of your SDK partition and copy the UUID value:

    /dev/sXX: LABEL="secondHD" UUID="copy_this" TYPE="ntfs"

  4. Add a new line at the end of the fstab file so the partition will be mounted during boot:

    sudo gedit /etc/fstab
    
  5. Remember to customize the "your.." values, the order it's important, fields on each line are separated by tabs or space; type man fstab for further information). Save and exit.

    UUID="yourValueCopied" "yourPartitionPath&Name" ntfs users,uid="YourGroup",gid="YourUserGroup",umask=0022,exec,permissions,auto 0 2

  6. Restart the computer and try another time adb :)

Seems that It's a ntfs partition issue:

https://askubuntu.com/questions/207180/changing-permissions-in-fstab-in-order-to-allow-writing-in-windows-ntfs-partitio

A very good explanation of fstab-permission-masks:

http://www.omaroid.com/fstab-permission-masks-explained/

Community
  • 1
  • 1
albodelu
  • 7,931
  • 7
  • 41
  • 84
  • Thanks for your answer. In my case, the problem was that the ADB installation used symbolic links. Installed everything in the same partition, and didn't see the problem again. – Luis A. Florit Apr 15 '13 at 01:28