Android OS Forum banner
1 - 11 of 11 Posts

·
Registered
Joined
·
63 Posts
Discussion Starter · #1 ·
Here is the intro on my seup and problem.

New install of Ubuntu 12.04, android sdk installed.

From the root directory in terminal I can use adb and it works good.
For example, I can use {adb devices} or any other various commands and adb works.

When I use {fastboot devices} I get "fastboot: command not found"

The only way I can seem to get fastboot to work is to navigate to,

{[email protected]:/usr/local/android-sdk/platform-tools$ sudo ./fastboot devices}

Now here is the question I have been searching for all morning, I am fairly new to ubuntu so please bear with me.

1. How do I get fastboot to run without the "sudo" comand, and having to enter my password?
2. Better yet, how do I get fastboot to work with a simple {fastboot flash.......} from the root directory, eleminating having to navigate to the folder housing fastboot, using sudo command, typing "./"

I have read all about creating system links, setting permissions, wiping everything and trying again......

Can anyone help?

AdamT.
 

·
Banned
Joined
·
2,166 Posts
Add the following line to the bottom of ~/.bash_rc
Code:
export PATH=$PATH:/usr/local/android-sdk/platform-tools
As for starting without sudo, make sure you have your udev rules set up properly.
 

·
Premium Member
Joined
·
4,348 Posts
Code:
echo "export PATH=$PATH:/usr/local/android-sdk/platform-tools" >> ~/.bashrc<br />
source ~/.bashrc<br />
Is the easiest way to do it. There is also no underscore in it.
 

·
Registered
Joined
·
63 Posts
OK, thanks for the replys. I think I am getting closer. I can now launch the fastboot command from the root directory. I still seem to have trouble running fastboot withought the "sudo" command.

while in bootloader,

{fastboot devices};
no permissions fastboot

{sudo fastboot devices};
enter password,
014691050200B005 fastboot

{fastboot reboot};
hangs on "< waiting for device >"

{sudo fastboot reboot};
enter password,
rebooting...

finished. total time: 0.005s
..............

I have checked my udev rules and I think they are all setup properly.
I just cant seem to get fastboot to run withought the "sudo" command. While searching the net I get many of results but they are all answered with a shotgun of fixes with no for sure results.

AdamT.
 

·
Registered
Joined
·
166 Posts
I have the same problem. I added my path and everything but I still have to use sudo. I've just come to terms with it. No big deal.

Sent from my Galaxy Nexus using Tapatalk 2
 

·
Registered
Joined
·
166 Posts
Do cat /etc/group in a terminal. Look at any groups that might pertain to what you want (like android, or fastboot). Then add yourself to the group with sudo gpasswd -a your_username desired_group_to_join then log out and back in.
This worked for me. I added myself to the root group. I know, I know, I probably shouldn't have but its the only way it would work without sudo.

Sent from my Galaxy Nexus using Tapatalk 2
 

·
The Incredible Kangaroo
Joined
·
703 Posts
This worked for me. I added myself to the root group. I know, I know, I probably shouldn't have but its the only way it would work without sudo.

Sent from my Galaxy Nexus using Tapatalk 2
Yeah, I wouldn't do that. If my method didn't work, you could create an alias to have fastboot automatically call sudo.
 

·
Registered
Joined
·
166 Posts
Just thought I'd give an update in case the OP still needed it. I figured out how to use fastboot without the need for sudo and without adding myself to the root group. :D

I came across this:

http://ptspts.blogsp...s-error-on.html

I had been using a 99-android rules. Setting up with 51-android rules using his instructions seems to have fixed this. Followed every step in there and bam. Fastboot works from any directory without the need to be root or call sudo.
 

·
Member Title
Joined
·
112 Posts
Just thought I'd give an update in case the OP still needed it. I figured out how to use fastboot without the need for sudo and without adding myself to the root group. :D

I came across this:

http://ptspts.blogsp...s-error-on.html

I had been using a 99-android rules. Setting up with 51-android rules using his instructions seems to have fixed this. Followed every step in there and bam. Fastboot works from any directory without the need to be root or call sudo.
Thankyou for that link.
 

·
Registered
Joined
·
1 Posts
Creating aliases works fine:

You still need to enter your password each time but you don't have to type the path


# android sdk aliases
alias adb='sudo ~/android/sdk/platform-tools/./adb'
alias fastboot='sudo ~/android/sdk/platform-tools/./fastboot'
 
1 - 11 of 11 Posts
Top