[GUIDE] Lazyman's installation guide to ADB on Ubuntu 10.10 - Now with Ubuntu 11.10 !

Search This thread

tumbleweed65

Senior Member
Apr 17, 2011
129
8
Rock Hill
nice guide tnx couple questions if you can
1: I have to ./adb kill-server then ./adb sudo start-server everytime to have adb find my device any idea why
2: why do I have to type ./adb I used to have this in windows and only had to type adb before the command. is there a way to change that?

just wondering why the windows vs ubuntu installation would make that difference
 

lanternslight456

Senior Member
Jan 14, 2011
868
522
www.androidinsomnia.com
nice guide tnx couple questions if you can
1: I have to ./adb kill-server then ./adb sudo start-server everytime to have adb find my device any idea why
2: why do I have to type ./adb I used to have this in windows and only had to type adb before the command. is there a way to change that?

just wondering why the windows vs ubuntu installation would make that difference

What version of Ubuntu are you using? On 11.04 32bit after performing step 7 of the OP I only have to type "adb devices" for example (just adb, no ./ ) did you perform this step?

Sent from my HTC Glacier using XDA Premium App
 

eris72

Senior Member
Aug 12, 2010
188
33
im going to apologize in advance, I'm new to ubuntu (actually d/l 11.04 it this morning) and am trying to get this setup for the my thunderbolt. Had it working on windows 7 no problem. Followed the instructions, everything seemed to work fine, except for this possible problem when installing the JDK, after doing apt-get update:

W: Failed to fetch http://ppa.launchpad.net/sun-java-community-team/sun-java6/ubuntu/dists/natty/main/source/Sources 404 Not Found

W: Failed to fetch http://ppa.launchpad.net/sun-java-c...ubuntu/dists/natty/main/binary-amd64/Packages 404 Not Found

After completing step 3, trying to check if adb recognizes my device, the return is ./adb command not found. I see adb in my platform-tools folder, it shows up under is as bright green in terminal.

im still very new to ubuntu so be nice please and any help is appreciated :D
 
Last edited:
im going to apologize in advance, I'm new to ubuntu (actually d/l 11.04 it this morning) and am trying to get this setup for the my thunderbolt. Had it working on windows 7 no problem. Followed the instructions, everything seemed to work fine, except for this possible problem when installing the JDK, after doing apt-get update:

W: Failed to fetch http://ppa.launchpad.net/sun-java-community-team/sun-java6/ubuntu/dists/natty/main/source/Sources 404 Not Found

W: Failed to fetch http://ppa.launchpad.net/sun-java-c...ubuntu/dists/natty/main/binary-amd64/Packages 404 Not Found

After completing step 3, trying to check if adb recognizes my device, the return is ./adb command not found. I see adb in my platform-tools folder, it shows up under is as bright green in terminal.

im still very new to ubuntu so be nice please and any help is appreciated :D

First up, welcome to the world of Ubuntu where almost every question, there's always an answer. Now to your problem, I've checked launchpad and it seems packages for Natty (11.04) is not available. But there's an alternative repository you can use. Type the following in terminal

Code:
sudo add-apt-repository ppa:ferramroberto/java
sudo apt-get update
sudo apt-get install sun-java6-jre sun-java6-bin sun-java6-jdk

If that doesn't work, you might want to use Ubuntu 10.10 repository instead of 11.04 for Java. Again, from terminal, type
Code:
gksu /usr/bin/software-properties-gtk
Then, in the "Other software" tab, click on "Add" and type the following
Code:
deb http://archive.canonical.com/ubuntu maverick partner
It will prompt to reload the software sources when you press on "Close". Click on "Reload". Once it finishes reloading the sources, type the following in terminal.
Code:
sudo apt-get install sun-java6-jre sun-java6-bin sun-java6-jdk

Hope these helps!
 
Last edited:

threestripebrand

Senior Member
Mar 7, 2011
1,188
144
Boiling Springs,NC
Well I went through the guide 3 times and its still giving me the ??? No permissions on my EVO. I'm on ubuntu 10.10.

Edit: never mind I got it figured out. Had to go to the adb.exe/properties/open with/ and then add autorun prompt.
Sent from my Nike hating synergized EVO!
 
Last edited:

dibb_nz

Senior Member
Sep 23, 2010
1,636
467
Shake City
install 'hanging' configuring package

hi all, trying to get adb installed using ubuntu 10.10

after entering the last command of the first step to install java the terminal is now blue & opened at sun micro systems documentation with this "<ok>" at the bottom which is not a clickable link - and then it just sits there not seemingly doing anything - do i just need to wait while it finishes what it is doing???

I did try stopping it and trying again but i just keep ending up at the sun micro systems page.
so now I have 2 updates and 0 installs - tried a 'purge' but it tells me it needs to be installed correctly before it can be uninstalled.

yeh i'm a noob and usually like to figure things out for myself, but i think i'm in need of some help on this one..

oh and another quick q - is there a default folder where these 'packages' are installed so i can delete the failed installs - is it a good idea to do this with a r/click delete or do things HAVE to be done from the terminal?
TIA donna
 

thedsk

Member
Aug 12, 2010
18
0
Colfax, North Carolina
Ok, trying this on 11.4 IDK what I'm missing, but everything i try pretty much gives me this. - sudo apt-get install sun-java6-jre sun-java6-bin sun-java6-jdk - Any ideas where I have gone wrong?
 
Haven't log on for a while, anyways, some answers to your queries...

@dibb_nz
You might want to try installing it again using apt-get install. For the <ok> button in terminal, you'll need to hit "Enter" to continue installation. You use tab and arrow keys to navigate btw

@thedsk
Have you tried adding in the java repository? Which is the following: sudo add-apt-repository ppa:ferramroberto/java sudo apt-get update. The one at the front page is for ubuntu 10.10
 

ferreinf

Senior Member
Jun 26, 2010
2,314
537
Thanks it worked...

Itś my first steps on linux so it has to be copy/paste.... :rolleyes:

Thank you
 

Scott

Retired Recognized Developer
Linux Newb!

Ok, I followed the directions and got everything installed. I set the permission in the 99-android.rules and get the following error messages:


scott@scott-VirtualBox:~/Desktop/android-sdk-linux_x86/platform-tools$ sudo gedit /etc/udev/rules.d/99-android.rules

(
Code:
gedit:3344): Gtk-WARNING **: Attempting to store changes into `/root/.local/share/recently-used.xbel', but failed: Failed to create file '/root/.local/share/recently-used.xbel.BQ6P2V': No such file or directory

(gedit:3344): Gtk-WARNING **: Attempting to set the permissions of `/root/.local/share/recently-used.xbel', but failed: No such file or directory

(gedit:3344): Gtk-WARNING **: Attempting to store changes into `/root/.local/share/recently-used.xbel', but failed: Failed to create file '/root/.local/share/recently-used.xbel.OZ4G2V': No such file or directory

(gedit:3344): Gtk-WARNING **: Attempting to set the permissions of `/root/.local/share/recently-used.xbel', but failed: No such file or directory

(gedit:3344): Gtk-WARNING **: Attempting to store changes into `/root/.local/share/recently-used.xbel', but failed: Failed to create file '/root/.local/share/recently-used.xbel.EGHG2V': No such file or directory

(gedit:3344): Gtk-WARNING **: Attempting to set the permissions of `/root/.local/share/recently-used.xbel', but failed: No such file or directory

What am I doing wrong? I got ADB working but I still get

Code:
List of devices attached 
????????????    no permissions

even after restarting ADB. I am assuming its because of the errors I got when I tried to modify the rules file?

Any thoughts?

Ubuntu 11.04 32 bit running in virtual box on Win 7x64.

Thanks!

-Scott
 

gunnermike

Senior Member
Dec 13, 2010
1,918
510
Crestview
best guide ive seen.

a note for virttual box users, dont forget to add the usb device in vb settings or it wont show on your computer.
 

CheesyNutz

Senior Member
Oct 26, 2010
12,181
3,339
Springfield
since google changed the name of the file i would assume its ok to change the command in step 2 new name is

android-sdk_r15-linux.tgz
 

nzahorchak

Senior Member
Oct 25, 2010
283
95
Toronto
Should the steps for Ubuntu 11.10 be the same as 11.04? How do you get your device to come up using "lsusb"? Mine's not showing.

Edit: Got my device to show up after running the command again, so it is the same for 11.10.
 
Last edited:

misfit61871

Senior Member
Apr 10, 2011
1,162
159
Provo,UT
Should the steps for Ubuntu 11.10 be the same as 11.04? How do you get your device to come up using "lsusb"? Mine's not showing.

I used the same steps to get my 11.10 up and running.
Make sure your device is plugged into one of your PC's USB Ports then run the command again and it should list all devices that are plugged into the PC.

Ad Mortem Fidelis
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 86
    I've been searching around the forums,the stickies and Google on how to install ADB in Ubuntu from scratch but I wasn't able to get a guide anywhere. What I found mostly are for Windows or little bits and pieces of info which did not cover the whole thing. Which is when I decided to grab some Tab and Mountain Dew, and Google my way through to make it work and share it to those who had trouble or no idea how to install it on Ubuntu.

    When I'm writing this, I'm using Ubuntu 10.10 64bit to install and run everything. I will update the guide periodically for updates and other things. There was mentions of using Eclipse SDK while searching around, but I won't be touching on that. There's another guide for it at the end of my guide. I have yet to encounter any problems while using ADB in 64bit environment. I've tested it out on the 32bit platform as well and it works. It'll also work on SD and NAND versions of Android for the HD2, since it's my main phone. Also, this is my first time making a guide, so bear with me if there's any mistakes. I've checked the article a few times hoping that it's clear and easy to understand. From

    Steps 1 to 4 and Steps 6 and 7, there's no differences in installation instructions for Ubuntu 11.04. You do have to take special note in Step 5 and the key difference of ADB working for your device in Ubuntu 11.04 is found here.

    For Ubuntu 11.10, you can see the guide here. Credit goes to loveubuntu for making it.

    Step 1. Install JDK

    You'll need to install JDK for ADB to work. If you have already installed JDK, I recommend reinstalling it again, just in case there are new updates or you have the older version.

    In Terminal, do the following

    Code:
    $ sudo add-apt-repository ppa:sun-java-community-team/sun-java6
    
    $ sudo apt-get update
    
    $ sudo apt-get install sun-java6-jre sun-java6-bin sun-java6-jdk

    Edit: If you're getting a "404 Not Found" when trying to install java in Ubuntu 11.04, this link here will give you a quick fix.

    Edit: If you want or need to use Eclipse, here's a simple installation command

    Code:
    $ sudo apt-get install eclipse ruby rubygems ruby-dev libxml2 libxml2-dev libxslt-dev openjdk-6-jdk ant git
    
    $ sudo gem install nokogiri

    Step 2. Download and Install Android SDK

    Download the Android SDK. Obviously, choose the one for linux (android-sdk_rXX-linux_86.tgz), where "rXX" is the latest version.

    Code:
    http://developer.android.com/sdk/index.html

    Extract the android-sdk-linux_x86 folder from android-sdk_rXX-linux_x86.tgz. Just double click the tgz file, and drag-n-drop the that lone folder to your desired location. In my case, I extracted the files to my Home Folder, which I highly recommend. I'll also advice to not renaming the folder.

    Step 3. Choose packages to install

    In Terminal, type the following -
    Code:
    $ cd ~/android-sdk-linux_x86/tools
    
    $ ./android update sdk

    The 'Android SDK and AVD Manager' window will appear (screencap below). You can choose to accept all of them or just install all except for Android 1.5 and 1.6. Once installation is finished, it will prompt you to restart the manager. Just click 'Yes' and close the manager



    Step 4. Check your device's permission

    Now head over to the platform-tools directory

    Code:
    $ cd ~/android-sdk-linux_x86/platform-tools

    Check if you have permission for your device

    Code:
    $ ./adb devices

    If you're getting the following, go on to Step 5.

    Code:
    List of devices attached
    ????????????	no permissions

    If you're getting something like this or other random numbers with the word device next to it, congrats! You now could use ADB. Now go on to Step 7.

    Code:
    List of devices attached
    0123456789ABCDEF	device

    Step 5. Giving permission to your device

    You'll need to create a certain udev rule. First off type the following in Terminal:

    Code:
    $ sudo gedit /etc/udev/rules.d/99-android.rules

    For those using Ubuntu 10.10, use the following! For Ubuntu 11.04 users, please scroll down a little for 11.04 guide.

    Ubuntu 10.10
    Once the gedit window pops-up, type the following line.

    Code:
    SUBSYSTEM=="usb", ATTRS{idVendor}=="####", SYMLINK+="android_adb", MODE="0666" GROUP="plugdev"

    Take note of ATTRS{idVendor}=="####". Replace #### to the correct Vendor ID of your device. If you're using Acer, then it's 0502, for HTC it's 0bb4. ADB might not be able to detect your device if you use the wrong ID. Here's a list of each vendor's ID. Source: http://developer.android.com/guide/developing/device.html

    Code:
    Manufacturer	USB Vendor ID
    Acer		-0502
    Dell 		-413c
    Foxconn 	-0489
    Garmin-Asus 	-091E
    HTC 		-0bb4
    Huawei 		-12d1
    Kyocera 	-0482
    LG 		-1004
    Motorola 	-22b8
    Nvidia 		-0955
    Pantech 	-10A9
    Samsung 	-04e8
    Sharp 		-04dd
    Sony Ericsson 	-0fce
    ZTE 		-19D2

    Save the file and exit out of gedit. Back in Terminal execute the following

    Code:
    $ sudo chmod a+rx /etc/udev/rules.d/99-android.rules
    
    $ sudo restart udev

    For Ubuntu 11.04. Special thanks to mmdl1001 for figuring this one out! Would've posted it earlier Ubuntu 11.04 was a little nasty on my PC for me to test it out. VMWare saved me though...

    For Ubuntu 11.04 users, you'll need an 8 digit number, which is slightly different from Ubuntu 10.10. Copy and paste the following code in the 99-android.rules file you created

    Code:
    SUBSYSTEM=="usb", ATTRS{idVendor}=="####:####", SYMLINK+="android_adb", MODE="0666" GROUP="plugdev"
    TEST=="/var/run/ConsoleKit/database", \
    RUN+="udev-acl --action=$env{action} --device=$env{DEVNAME}"

    Next, you'll need to find the digits to replace "####:####' above. In terminal type
    Code:
    $ lsusb

    You should be getting a list like so. Note that what is generated in your PC will be much different from mine below!
    Code:
    Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
    Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
    Bus 003 Device 002: ID 046d:c019 Logitech, Inc. Optical Tilt Wheel Mouse
    Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
    Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
    Bus 001 Device 010: ID 046d:c52b Logitech, Inc. Unifying Receiver
    Bus 001 Device 007: ID 22b8:2d66 Motorola PCS

    Look for your device. It's easily identifiable via its brand ;). In this case, "Bus 001 Device 007: ID 22b8:2d66 Motorola PCS" is for my device. Copy the ID numbers, 22b8:2d66 for my case, and replace the ####:#### in the 99-android.rules file. Save the file and close gedit and execute the following in Terminal.

    Code:
    $ sudo service udev restart

    Now to check if it works

    Code:
    $ ./adb devices

    You should be getting the following line or something similar.

    Code:
    List of devices attached
    0123456789ABCDEF	device

    Congrats! Now you can use ADB in Ubuntu! Now hop on to Step 6!

    If that fails and still give you "???????????? no permissions", try restarting the adb server. That should do the trick. If that still doesn't work, check the file, 99-android.rules, that you created earlier. Most likely you have put in the wrong Vendor ID.

    Code:
    $ sudo adb kill-server
    
    $ sudo nohup adb start-server

    Step 6. Now to have fun!

    Head down to Captainkrtek's ADB Workshop and Guide for everyone to learn how to use ADB. Take note that while using adb in Linux, you'll need to type ./adb to execute adb unless you create a path in bashrc. Go to Step 7 for that . For now, here are some examples on running adb if you don't create a path.

    To get into the phone

    Code:
    kay@millelune-~/android-sdk-linux_x86/platform-tools:~$ ./adb shell

    To grab files from phone

    Code:
    kay@millelune-~/android-sdk-linux_x86/platform-tools:~$ ./adb pull /system/etc/file.txt file.txt

    To send file to phone

    Code:
    kay@millelune-~/android-sdk-linux_x86/platform-tools:~$ ./adb push this.txt /sdcard/this.txt

    Also, do take note that when you pull a file, it will save itself in your android-sdk-linux_86 folder if no destination folder was given.

    Step 7. Create path for ADB

    Code:
    $ sudo gedit ~/.bashrc

    Add the following line at the very end of the file. Once you're done, save and exit.

    Code:
    # Android tools
    export PATH=${PATH}:~/android-sdk-linux_x86/tools
    export PATH=${PATH}:~/android-sdk-linux_x86/platform-tools

    Now you can just run adb like it's a command.

    Edit: Okay, for some odd reason, while the above worked for my desktop, it failed when I tried it on my notebook. If you tried to create a path but it failed, here's an alternative method

    Code:
    $ gedit ~/.profile

    Once the gedit window pops up, scroll down to the very bottom of the file and add this line

    Code:
    [...]
    PATH="$HOME/android-sdk-linux_x86/tools:$HOME/android-sdk-linux_x86/platform-tools:$PATH"

    Once you've saved and closed gedit, run the following command in Terminal

    Code:
    export PATH="$HOME/android-sdk-linux_x86/tools:$HOME/android-sdk-linux_x86/platform-tools:$PATH"

    And that's about it. Feel free to comment, give suggestions or ask questions if you're still unsure.

    Also for more in-depth guide, try HowtoForge. Just found this guide today and I find it VERY useful and even have a good guide on Eclipse.
    56
    Ubuntu 11.10 and ADB and fastboot

    Update 3-3-2012: I just tried this on Ubuntu 12.04 Beta and Linux Mint 12 . It worked on both.

    Thank you to the original poster bloodychaos. I used some of his info/code and changed a few things to reflect new versions of Ubuntu/Android SDK.

    OK I can confirm that the method for installing Android SDK and using ADB in the original post for Ubuntu 11.04 also works with the horrible looking, "unity" infested, Ubuntu 11.10 Oneiric Ocelot. There are changes from the OP and how it will work with 11.10/11.04. Here are the steps I took to get ADB working like a charm.

    ***please make sure debugging is enabled on your phone: menu/settings/applications/development/check mark debugging to enable***

    1-Install java by Sun(JDK). There are different ways of installing sun-java and one is mentioned in the original post. I've used my method often and it has worked for me quite well. Here it is:

    method 1: I actually like this method best since you know what you are doing step by step. This is for the 32 Bit Ubuntu. For the 64 Bit, see the source. Source: http://sites.google.com/site/easylinuxtipsproject/java

    1- Remove the browser plug-in for Java (either the open source version or the JRE version, but only the browser plug-in needs to be removed). Open a terminal and type

    Code:
    cd /opt

    and then

    Code:
    ls

    This should list all the folders in /opt. If you see a Java folder, you need to type
    Code:
    gksudo nautilus

    enter your password. Your file explorer (nautilus) opens up. Go to File system and fine theopt folder. In it, delete the Java folder. Now in terminal type:

    Code:
    rm ~/.mozilla/plugins/libnpjp2.so

    If you don't see the Java folder you don't have to do the steps in Blue. Now Go to the software center and search for icedtea. Only remove the icedtea browser plug-in.

    2- Got to http://www.java.com and to the download section and get the right file. It's the one ending in i586.bin (self extracting). None of the RPM files.

    3- Now we are going to make room for Java, install, and make it default. Agree to any license agreement if it pops up. It may not. Do the following one line at a time pressing enter after each line:

    Code:
    cd /opt
    sudo mkdir java
    cd java
    sudo mkdir 32
    sudo mv ~/Downloads/jre-6u31-linux-i586.bin /opt/java/32
    sudo chmod 755 /opt/java/32/jre-6u31-linux-i586.bin
    cd /opt/java/32
    sudo ./jre-6u31-linux-i586.bin
    sudo update-alternatives --install "/usr/bin/java" "java" "/opt/java/32/jre1.6.0_31/bin/java" 1
    [COLOR="Red"]you may have to the last line twice. This is not a code line, skip it.[/COLOR]
    sudo update-alternatives --set java /opt/java/32/jre1.6.0_31/bin/java

    Again use common sense and make sure the file you download and the file name in above codes are the same. It may change in the future.

    4- Now remove the old plug-in and the new install Firefox plug-in:

    Code:
    mkdir ~/.mozilla/plugins
    sudo apt-get remove icedtea6-plugin
    rm ~/.mozilla/plugins/libnpjp2.so
    ln -s /opt/java/32/jre1.6.0_31/lib/i386/libnpjp2.so ~/.mozilla/plugins/

    note that the second and third line may not result in anything.

    5- Go to http://java.com/en/download/installed.jsp and check if it worked. You're done. Reboot your computer.


    This works in Linux Mint 12 also.

    Method 2 (I'm still leaving this here but I strongly suggest you use method 1): If Synaptic is not acting weird (it does in 12.04 Beta), use this method. Since Ubuntu no loinger includes Synaptic, go to Ubuntu Software Center, search for it, check all the add-ons in the middle, apply the changes, once done, click install in the right hand corner. Once installed start the package manager (start typing synaptic in the dock's search) and click on it. Now click on settings/repositories. Click the "other software" tab and click ADD. Now in the APT line copy and paste this: ppa:ferramroberto/java

    click add source and then add volume and close. When you are back in the Synaptic window, click reload. Once reloaded, in the quick filter field type java6. You will see some entries, you need to "right click" the box and choose mark for installation for 4 items: sun-java6-bin, sun-java6-jre, sun-java6-jdk, sun-java6-plugin. Click apply and now you should see the box next to those items as green. You are done with java.

    2- Download and Install Android SDK (which has ADB included of course):

    http://developer.android.com/sdk/index.html

    Click and download the Linux version. Go to your Download folder and “right” click the .tgz file and click extract here. Now you have a folder called android-sdk-linux. Cut it from this folder and paste it in the Home folder. Note that the most of the names have changed from the original post.

    Fire up a terminal (search for terminal in the dock's search field) and change directory from Home (that terminal opens in) to android-sdk-linux/tools type:

    Code:
    cd android-sdk-linux/tools

    ( you can do it in one step like above or two steps, first cd into the android-sdk-linux then into tools)

    Now update the sdk by typing:

    Code:
    ./android update sdk

    The update window and the sdk open up. By default, all platforms have been selected to be installed. This will take a very long time; so if you don't need all those platforms, only pick a few you need to install. I chose all and it took me a few hours. No harm to choose all but be warned, it takes for ever.

    HTC and MOTO now want you to have a dev account. You can create one, it takes a few seconds for each. Once you enter your new login and password in the SDK update window once, you don't need to enter it for all their platforms.


    3- make sure USB debugging box is checked on your phone, settings/applications/development. Now connect your phone. You DO NOT want to turn on USB storage and you should see the usb debugging connected message.

    4- In the terminal type:

    Code:
    cd android-sdk-linux/platform-tools

    to go to that folder. Now type:

    Code:
    ./adb devices

    If you see your device in something like this, you are done.

    Code:
    List of devices attached 
    
    HT12HS005115	device


    But I doubt it. I've never seen it work that easily. You have to give permission to your phone. While still connected to your phone, in the terminal type lsusb to get a list of all usb devices. Usually the last one is your phone. I didn't know HTC stood for High Tech Computer Corp so it took me a few seconds to locate it. :) Now right down the 9 character (xxxx:xxxx) ID to the left of your phone.

    In the terminal, type in cd then press enter to be at the ~$ prompt. Now type:

    Code:
    sudo gedit /etc/udev/rules.d/99-android.rules

    to create a blank file and open it (you have to enter your root password every time you type sudo. You don't see anything being typed but it's there. If you are here reading this you already knew that though). In the file type (copy and paste of course):

    Code:
    SUBSYSTEM=="usb", ATTRS{idVendor}=="####:####", SYMLINK+="android_adb", MODE="0666" GROUP="plugdev"
    TEST=="/var/run/ConsoleKit/database", \
    RUN+="udev-acl --action=$env{action} --device=$env{DEVNAME}"

    (thank you cainn24 for the typo correction)

    now care fully replace the ####:#### with the 9 character you wrote down above. Save and exit.

    Type:

    Code:
    sudo service udev restart

    and press enter.

    5- Now we need to test adb to see if it worked. In a terminal, type:

    Code:
    cd android-sdk-linux/platform-tools

    to change to that directory. ADB is in there. Type in

    Code:
    ./adb devices

    If you see your device and it's serial number your done. If you don't (which I did not) stop and restart adb by using these commands while you are in that folder still:

    Code:
    ./adb kill-server

    Code:
    ./adb start-server

    Now unplug your phone and replug it and tyoe:

    Code:
    ./adb devices

    You should now see your device and it's serial number.

    6- To be able to use adb from any folder in the terminal and use it as a command (without the ./), do this: (creating a path)

    In a terminal type: (it can be at any prompt)

    Code:
    sudo gedit ~/.bashrc

    enter password and enter. A file opens up. You need to add the following at the end of the file: (again note that names have changed from the original post)

    Code:
    # Android tools
    export PATH=${PATH}:~/android-sdk-linux/tools
    export PATH=${PATH}:~/android-sdk-linux/platform-tools

    save and exit. Make sure you are not adding or omitting anything or you will get an error. You need to restart your computer, kill adb and restart adb as above, and unplug/re-plug your phone to complete this step. Now press cd and enter to be at ~$ prompt. Lets see if adb works without being in that folder: type:

    Code:
    adb devices

    if you get the same device name and serial number you got when you were in the adb directory, you are done. You can now run adb from anywhere as a command. If you don't, unplug and re-plug the phone, restart the terminal and should work.

    ------------------------------------------------------
    update 02-22-12: It seems like Google has included fastboot in the platform-tools folder now. Before doing anything check and see if it's there. If it is, all you need to do is test it. Go to the last paragraph marked by *** in this section to test fastboot.


    Extra #1: Setting up fastboot in Ubuntu 11.10: Now that you have adb setup, it's pretty easy to setup fastboot. The source of my knowledge for this is http://wiki.cyanogenmod.com/wiki/Fastboot

    You may run into a guide that would ask you to use fastboot to accomplish something. So it's nice to have it handy when needed but don't be going around using commands you know nothing about. It may mess up your device.

    For fastboot to work, you have to have S-OFF and be in the bootloader (fastboot menu). Remember, Bootloader/fastboot is not the same as the recovery menu. Unlike adb, nothing happens if you have your phone booted normally, you have to be in the fastboot menu. Now go to http://koushikdutta.blurryfox.com/G1/ and download the right version (Linux of course). Extract the zipped file and rename it fastboot for ease of use. Cut and paste it into your android-sdk-linux/platform-tools folder from the above settings. Because you set your path above to be able to issue commands from both tools and platform-tools folders, you are done. I chose the platform-tools since Google has moved adb from the tools folder to this folder. I read somewhere that they by mistake omitted fastboot from the latest version of Androiod SDK.

    ***Now to test it, turn your phone off and boot into the bootloader manually (each phone has different combo keys for this) or fire up a terminal and type:

    Code:
    adb reboot-bootloader

    now type:

    Code:
    fastboot devices

    and see if your device and serial number is recognized.
    -----------------------------------------------------------------

    Extra#2: To get rid of Unity and get an option for GNOME desktop in the log-in screen (the options wheel) do this:

    Ubuntu Natty Narwhal 11.04: It's quite easy to roll back to the original Gnome desktop in Ubuntu 11.04. When you get to the start up login screen, click your user name but don't enter password yet. Look for a small menu that says Ubuntu in the lower panel. Click it and choose Ubuntu Classic. That's all. Enter your password now and log in. You are back where you have started. You only need to do this one time, Ubuntu will remember your choice. You can do the same to switch back and forth.

    Ubuntu Oneiric Ocelot 11.10: Starting with the Ubuntu 11.10, the option to change back to Gnome desktop (Ubuntu Classic) was removed from the start up login screen. To change back you need to follow a few easy steps. Login to Ubuntu with the Unity interface. Press the keys CTRL ALT T (letter T) to fire up the terminal. You can also press the Ubuntu logo in the upper left corner to open the dock and in the search field start typing terminal. Once you see it, click it. (Terminal is a powerful tool that many beginners may not need to use but it is easy to learn and can come in handy in cases like this, it's like the the DOS command in Windows or Terminal in Macs.)


    Once the terminal is up and you click the disclaimers (if any), you will see your user name and computer name followed by symbols that end in the $ sign. You need to type:

    Code:
    sudo apt-get install gnome-session-fallback

    Copy here and use the Ctrl V key combo to paste in the terminal. This way you do not miss any characters or spaces. Press enter. The terminal will ask you for your password. Enter it. You do not see the password being entered but it is. Press enter and see the terminal download and install what is necessary for the Gnome desktop roll back. If it asks you to re-enter password, you may have entered the wrong password. try again. In the process, if it asks you to do something, answer Y for yes. That's it. Shut the computer down and restart it. In the start up login screen, look for the option's wheel above the password field. Click it and choose Classic Ubuntu. Once in Ubuntu you can add to the upper and lower panel to make it look like what you had before. It may look a little different than versions 10.10 or older but you can come very close to it. Click Applications/Internet and drag the Firefox icon from the menus to the desktop and then to the upper panel where it used to be. Also to add to panel you need to use "ALT right click" vs just the right click in the previous versions.
    5
    im going to apologize in advance, I'm new to ubuntu (actually d/l 11.04 it this morning) and am trying to get this setup for the my thunderbolt. Had it working on windows 7 no problem. Followed the instructions, everything seemed to work fine, except for this possible problem when installing the JDK, after doing apt-get update:

    W: Failed to fetch http://ppa.launchpad.net/sun-java-community-team/sun-java6/ubuntu/dists/natty/main/source/Sources 404 Not Found

    W: Failed to fetch http://ppa.launchpad.net/sun-java-c...ubuntu/dists/natty/main/binary-amd64/Packages 404 Not Found

    After completing step 3, trying to check if adb recognizes my device, the return is ./adb command not found. I see adb in my platform-tools folder, it shows up under is as bright green in terminal.

    im still very new to ubuntu so be nice please and any help is appreciated :D

    First up, welcome to the world of Ubuntu where almost every question, there's always an answer. Now to your problem, I've checked launchpad and it seems packages for Natty (11.04) is not available. But there's an alternative repository you can use. Type the following in terminal

    Code:
    sudo add-apt-repository ppa:ferramroberto/java
    sudo apt-get update
    sudo apt-get install sun-java6-jre sun-java6-bin sun-java6-jdk

    If that doesn't work, you might want to use Ubuntu 10.10 repository instead of 11.04 for Java. Again, from terminal, type
    Code:
    gksu /usr/bin/software-properties-gtk
    Then, in the "Other software" tab, click on "Add" and type the following
    Code:
    deb http://archive.canonical.com/ubuntu maverick partner
    It will prompt to reload the software sources when you press on "Close". Click on "Reload". Once it finishes reloading the sources, type the following in terminal.
    Code:
    sudo apt-get install sun-java6-jre sun-java6-bin sun-java6-jdk

    Hope these helps!
    3
    very nice, thank you. Only three hints that helped me get everything working perfectly:

    1- Assume you have no permission and create the udev rule step. In that same step when typing
    Code:
    ./adb devices
    to see if it worked, make sure you cd to the right directory. You have to be in
    Code:
    cd ~/android-sdk-linux_x86/platform-tools
    .

    2- In step 7 creating paths, eliminate the space between {PATH}: and ~/android. If left that way, the terminal gives you a not valid identifier error.

    3- The Howtoforgelink at the bottom is very nice also but note that they are using an older SDK and file name has to be changed if you want the latest (add the x).


    I hate the fact that most guides out there for a Linux based OS (Android) is written for Windows. Quite ironic. Thanks again for your hard work.
    2
    @lanternslight456

    Just a,quick question: is your java sdk and jre installed? Try apt-get them again, just in case. From the error message, it looks like it's missing some java files

    @mervamt
    Run 'lsusb' in terminal and look for your device. Id shouln't have chqnged, but check for it just in case. Are you using ubuntu 10.10 or 11.04?


    Sent from my HTC HD2 using XDA App