- 01-29-2011, 10:55 PM
Thread Author #1
- 02-04-2011, 07:06 PM #2
Had to set up the SDK on a different ubuntu machine and im having trouble setting up the path to make life easier.
http://forum.androidcentral.com/htc-...ed-ubuntu.html
You helped me out awhile back in that thread, and i dont remember how i saved the path after i was done in nano. I type it in, and im not sure if its sticking or not.
My forgetfulness is killing me, im completely lost. Do i just throw in #SDK path (enter) export PATH=${PATH}:/path/to/your/sdk/tools/folder (enter) Then exit out of the terminal? What do i do next?Last edited by igotsanevo4g; 02-04-2011 at 07:12 PM.
Some say the glass is half empty. Some say its half full. I say, "Are you going to drink that?" - 02-04-2011, 07:27 PM
Thread Author #3
lol. Blame it on nano. It's weird if you're not used to it.
changes to your home folder, and opens .bashrc (for editing, the -w is write mode)Code:cd ~ nano -w .bashrc
Once it opens, you're no longer in your shell. That's nano. Scroll to the bottom of the file. Add these lines at the very end, but put your user name instead of <user name>:
then hit ctrl + x (exit nano)Code:PATH=$PATH:/home/<user name>/android-sdk-linux_86/tools export PATH PATH=$PATH:/home/<user name>/android-sdk-linux_86/platform-tools export PATH
since you made changes, it's going to ask if you wanna keep them. Enter y to keep the changes. It will ask where to save the file, and since we opened nano with the -w switch, it will want to overwrite the original. That's what we want it to do, so just press enter to accept it.
You can edit .bashrc in ANY editor, and don't need to be root as long as you're editing your own .bashrc. You can use gEdit instead of nano if you like. I use nano for everything, so that's the way I go in tutorials.
Now you need to restart your shell to use your new $PATH. Do it like this:
To see that the changes stuck, enter this at the prompt:Code:exec bash
you'll see a list of folders, make sure android-sdk-linux_86/platform-tools and /tools are both listed. If so, plug your phone in and try this:Code:echo $PATH
The first portion (the stuff as root) needs done to make sure the adb server is running as root. Once you set up udev, you never have to do this. After you exit out of root, you're going back home (to make sure you're not sitting in /platform-tools) and trying adb. Notice you don't use ./ unless you're in the same folder as the file you're trying to run, and in this case we aren't.Code:sudo su <password> cd /home/YOUR USER NAME/android-sdk-linux_86/platform-tools ./adb kill-server ./adb start-server exit cd ~ adb shell
Hope this makes a little more sense
(•‿•) - 02-04-2011, 09:00 PM #4
It made sense, but i think something is still wrong lol. Should it look like this -
dylan@dylan-DM174A-ABA-S5300NX-NA310:~$ cd ~
dylan@dylan-DM174A-ABA-S5300NX-NA310:~$ nano -w .bashrc
dylan@dylan-DM174A-ABA-S5300NX-NA310:~$ exec bash
dylan@dylan-DM174A-ABA-S5300NX-NA310:~$ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/dylan/Desktop/AndroidSDK/platform-tools:/home/dylan/Desktop/AndroidSDK/tools:/home/dylan/Desktop/AndroidSDK/platform-tools
dylan@dylan-DM174A-ABA-S5300NX-NA310:~$ sudo su
root@dylan-DM174A-ABA-S5300NX-NA310:/home/dylan# cd /home/dylan/AndroidSDK/platform-tools
bash: cd: /home/dylan/AndroidSDK/platform-tools: No such file or directory
root@dylan-DM174A-ABA-S5300NX-NA310:/home/dylan#
Im guessing no
Some say the glass is half empty. Some say its half full. I say, "Are you going to drink that?" - 02-04-2011, 09:31 PM
Thread Author #5
(•‿•) - 02-05-2011, 12:51 AM #6
Ahhh, got sloppy. Its All working now

So im going to have to do this
sudo su
<password>
cd /home/YOUR USER NAME/android-sdk-linux_86/platform-tools
./adb kill-server
./adb start-server
everytime i want to use adb?Some say the glass is half empty. Some say its half full. I say, "Are you going to drink that?" - 02-05-2011, 01:03 AM
Thread Author #7
cool

You have to do that every time the adb server dies. Any time you reboot, or do something that restarts the adb server.
http://forum.androidcentral.com/linu...u-10-10-a.html
That's how you fix it on Ubuntu 10.10 so you don't have to fool with it any more.(•‿•) - 02-05-2011, 06:44 PM #8Some say the glass is half empty. Some say its half full. I say, "Are you going to drink that?"
- 02-05-2011, 11:06 PM
Thread Author #9
If you set up the SDK as described in this post, then set up udev like described in the other post, you'll be able to plug your phone in, open the terminal and type adb shell without being root, without being in the right directory, and without using sudo.
If you skip the udev part, you need to start adb as root every time it dies.(•‿•) - 02-09-2011, 06:51 PM #10
- 03-06-2011, 03:00 PM #11
Hello,
I'm sorry for resurrecting old thread, but I'm really desperate..
I've got N1 and I just cannot connect it with adb. I have tried on windows 7, xp and now linux 10.10.
I've done everything that was said above but the adb cannot recognize my device. Also i tried with different programs to gain root and that was failure too. I'm starting to think that there is something wrong with the phone
- 04-07-2011, 12:41 AM #12
problems
I am trying to keep up but please be kind i am a COMPLETE NEWB. I followed the directions the best i could but right now everything works until i get to the "sudo su " part.
I type in my password and this is what i get:
[sudo] password for chris:
bash: chris: No such file or directory
bash: chris: No such file or directory
root@chris-Dell-DXP051:/home/chris#
what have i done wrong ?
when i open nano the whole file is :
PATH=$PATH:/home/<user name>/android-sdk-linux_86/tools
export PATH
PATH=$PATH:/home/<user name>/android-sdk-linux_86/platform-tools
export PATH
should it have more before that ?
thanks for even looking at this, i have no idea what to do. - 04-07-2011, 01:40 AM
Thread Author #13
(•‿•) - 04-07-2011, 10:23 AM #14
got that
It took me a while but i had figured that out, and i also figured out that i needed to list where it is . in my case:
PATH=$PATH:/home/chris/desktop/android-sdk-linux_x86/tools
but now it seams to have a problem when i try to get into "sudo su"
I searched the issue online and i found one posting of a similar problem and what someone suggested is that the issue might be in ( cat ~/.bashrc ).....
so i type that in and there at the bottom of the list is our :
PATH=$PATH:/home/<user name>/android-sdk-linux_86/tools
export PATH
PATH=$PATH:/home/<user name>/android-sdk-linux_86/platform-tools
export PATH
with all my user name and all that.
so then i thought to my self that some where along the way i put the code there instead of in the nano where you said to put it, (it is in nano now).. but i don't know now how to remove it or if it is supposed to be there.
it does look out of place there?
thanks, thanks , thanks - 04-07-2011, 12:46 PM #15
ahhhhh
chris@chris-Dell-DXP051:~$ cd ~/.android-sdk-linux_x86/tools/
bash: cd: /home/chris/.android-sdk-linux_x86/tools/: No such file or directory
chris@chris-Dell-DXP051:~$ cd ~/android-sdk-linux_x86/tools/
bash: cd: /home/chris/android-sdk-linux_x86/tools/: No such file or directory
chris@chris-Dell-DXP051:~$ cd ~/desktop/android-sdk-linux/tools
bash: cd: /home/chris/desktop/android-sdk-linux/tools: No such file or directory
chris@chris-Dell-DXP051:~$ ./android
bash: ./android: No such file or directory
chris@chris-Dell-DXP051:~$ exec bash
chris@chris-Dell-DXP051:~$ cd ~/android-sdk-linux_x86/tools/
bash: cd: /home/chris/android-sdk-linux_x86/tools/: No such file or directory
chris@chris-Dell-DXP051:~$ sudo su
[sudo] password for chris:
bash: chris: No such file or directory
bash: chris: No such file or directory
root@chris-Dell-DXP051:/home/chris# ^C
root@chris-Dell-DXP051:/home/chris#
guess i cant get the tools to download either. ???? - 04-07-2011, 06:17 PM #16
- 04-07-2011, 06:44 PM
Thread Author #17
A couple things here.
Nano is a text editor, and ~/.bashrc is a text file. You're editing ~/.bashrc using nano. Your PATH entries ahould be at the bottom of ~/.bashrc. If it makes it easier, open your home folder, press CTRL+H to view hidden files, right click on .bashrc and choose to open it with Text Editor for a more notepad like interface.
open a new terminal. At the prompt type:
it will return the exact path to your tools folder if you have the path entered correctly in ~/.bashrc. If it doesn't, you will have to look and see where you extracted the SDK to, and adjust the path. If you followed the direction in post one, it will be in /home/<username>/android-sdk-linux_86/tools/Code:which android
And yes, this is for 32 bit and 64 bit versions. If you're using 64 bit Ubuntu 10.10, there's an extra step in post one.(•‿•) - 04-08-2011, 11:54 AM #18
Ok trying to do this and ran into a snag.
After installing sun-java6-jdk (sudo apt-get install sun-java6-jdk), it comes up to a configuration page with just what looks like a license agreement. There's an <Ok> at the bottom but I can't click on it since it's just text. Tried typing "Ok" and Enter, nothing. Tried ^C - nothing. ^Z backgrounded it, fg brought brings me back into the running process but didn't refresh the page. I typed clear and now all I have is a blue terminal. How do I complete the install?
Edit: Figured it out with the help of this page: - a combination of <tab> and <enter> a few times because of the screwed up screen paint got me to the right combination of OK and Yes prompt acceptance.Last edited by cmags; 04-08-2011 at 12:00 PM. Reason: got it.. moving on.
- 04-10-2011, 11:26 AM #19
- 04-29-2011, 11:01 PM #20
Ok, sorry to resurrect, but this seems to be the most appropriate place for my issue. I just installed Ubuntu 11.04 to try and learn some android programming, and have installed the JDK, platform-tools, etc. I went to try and add the tools to my PATH, and edited the bottom od my .bashrc with this:
PATH=$PATH:/home/myusername/android-sdk-linux_x86/tools
export PATH
PATH=$PATH:/home/myusername/android-sdk-linux_x86/platform-tools
export PATH
Now, for clarification, where it says myusername, I actually have my user name, I just have a paranoia about security with stuff like that.
This is the proper path to my SDK, however, no matter what I do I get that adb is not a file or directory. I have restarted bash, tried in and out of root, and everything else I can think of (which granted, isn't much). Did 11.04 change something in the way I need to do the PATH variables, or is there just something I'm missing? I'm running 64-bit if that matters.
EDIT: Sigh, I got it. Apparently I didn't install the ia32-libs. I swear I did, but apparently not.Last edited by porpherion; 04-30-2011 at 12:09 AM. Reason: Solved
- 06-01-2011, 05:29 PM #21
I know that this is an older thread -but I just wanted to say thanks. I am just starting on ubuntu 11 and this thread and the udev thread were very helpful. Took me a while to figure out my mistakes -but I got it.
I have a question though. I can now use adb from terminal w/o root -but when I
adb reboot bootloader
...the device is no longer recognized. What do I do to fix that? Or do I need to fix anything? I mean if I need to push an ruu -I need adb to work? don't I?
anyways thanks for all this.





Reply


































