(Tutorial) Setting up Linux for ADB to recognize Pantech Burst - Android Software/Hacking General [Developers Only]

Anyone wanting to use adb with your Pantech Burst through Ubuntu/Linux... follow these steps (these steps will make accessing adb much easier and allow abd to recognize your phone)[Please note - modifying the .bashrc in step 1 is not required; it will just make using Android SDK much easier for beginners]:
1. Modifying the PATH Environment Variable will help out immensely when it comes down to making use of SDK tools like ADB. Doing this will also allow you to execute certain protocols like ADB from ANY location. So if you're operating from the Desktop, you don't have to redirect to the SDK's platform-tools folder to make use of ADB if you need to make use of it.
To modify the PATH variable of your system, you need to edit your .bashrc file. To do so, in a terminal, execute the following command:
$ nano ~/.bashrc
You will now have the Nano text editor enabled on the terminal. Now, at the very top of the file(yes, that means go to the top and hit enter to create some space at the top. Then just copy and paste - a caveman really could do it!), enter the following:
#AndroidDev PATH
export PATH=${PATH}:~/android-sdk-linux/tools
export PATH=${PATH}:~/android-sdk-linux/platform-tools
Once you're finished, press CTRL + X, Y, and then hit Enter to save your changes and exit the Nano text editor.
2. Now that we have our PATH variable set up, we need to make sure our hardware will be detected once we initialize ADB. However, Ubuntu won't allow ADB access to the Android phone via USB unless the appropriate udev rule is set. This is Bug #316215. In order to get around this rule, you need to create a rule file as root.
In a terminal, execute the following command that will create the rule file. This will utilize the graphical sudo command, so that we can still have control over the file if we're not a root user.
Now, you create a file:
sudo nano /etc/udev/rules.d/51-android.rules
Copy and paste the following udev rule in the text editor that opened up which contains the new rule file we created:
SUBSYSTEM=="usb", ATTRS{idVendor}=="10a9", MODE="0666"
Once you've copied and pasted the udev rule in the text editor which contains your newly created rule file, save your changes and quit (Control+X, Y, Enter). Now that you've set your udev rule you have to reboot (shut down terminal and reopen; I also recommend unplugging your phone from usb and plugging it back in) so that ADB will be in your path.
To test your changes, open up a terminal and execute the following:
$ adb devices
You should now see:
List of devices attached
PRESTO01111085383518 device
If you see:
List of devices attached
???????????? no permissions
Reread this post and try to follow directions next time.

idProduct
To complete we can add the "idProduct"
On my computer doing in the console "lsusb":
Bus 001 Device 006: ID 10a9:6050 SK Teletech Co., Ltd
Click to expand...
Click to collapse
So, if I'm not mistaken, the line including "idProduct" would be:
SUBSYSTEM=="usb", ATTRS{idVendor}=="10a9", ATTRS{idProduct}=="6050", MODE="0666"
Click to expand...
Click to collapse
Thank you. Greetings.

worked for me!
USB debugging also needs to be on. To enable it, the USB cable must be disconnected.
My adb devices only picked it up after I switched the USB connection type to USB Storage mode. Not sure if that's necessary but it could help.
Also, slight typo here:
jackattack79 said:
In a terminal, execute the following command that will create the rule file. This will utilize the graphical sudo command, so that we can still have control over the file if we're not a root user.
Now, you create a file:
sudo nano /etc/udev/rules.d/51-android.rules
Click to expand...
Click to collapse
I think either terminal "sudo nano" or "gksudo gedit" will work just fine. But you should remove the bit about "this will utilize the graphical sudo command" when using "sudo nano" so as not to confuse people!
But anyway, thanks! The method worked and now I am off to the races.

Related

[HOW-TO]Set up Android SDK/ADB/Fastboot on Ubuntu Linux

When I first attempted to install the SDK, I found tutorials that only had bits and pieces about the whole procedure. A lot of Google searches and hours of eye strain. I wanted to write a solid tutorial, but instead of publishing it in a personal blog, I chose to publish it here on xda-developers. This is the definite forum to come to if you are interested in Android/G1/HTC Dream development or costumization. I wrote this to make the enlarge the knowledge of this community.
!! THIS TUTORIAL IS FOR THE LATEST UBUNTU RELEASE: JAUNTY JACKALOPE 9.04 !!
!!START -------------------------------------- Optional Preparation --------------------------------------
This applies if you -
Are interested in installing Ubuntu for the first time.
Are/will be reinstalling Ubuntu from scratch.
Want to keep your SDK installation easy to reach.
Want to keep things nice and clean.
And your machine -
Has a second hard drive.
Has free space for another small partition.
This procedure will make things easier during installation of the SDK and in the long run. Hopefully you've read about partitions. If you are dualbooting, please read this first to get an idea of what you're doing.
While installing Ubuntu and on the Prepare Disk Space screen (partition editor), select "Specify partitions manually (Advanced)"
On the Create Partition dialog, select the following options:
Type for the new partition: Primaryor Logical if you're dualbooting and know what you are doing.​
New partition size in megabytes: 5120MB (5GB) might work. BUT:
ccyrowski said:
It should be noted that if you ever plan on compiling kernels and/or cupcake ROM's you will NEED ubuntu8.04. You'll also need at least 10GB.
Click to expand...
Click to collapse
Location for the new partition: Beginning
Use as: Ext4 or Ext3Filesystem doesn't matter. (?)​
Mount point: /AndroidSDKEnter this manually​
Complete Ubuntu installation as usual.
-------------------------------------- Optional Preparation -------------------------------------- END!!​
You will now install the SDK.​
!!START -------------------------------------- Installing Android SDK --------------------------------------
Installing the SDK is the easiest of all.
Download the SDK.169.9 MB [http://developer.android.com/sdk/download.html?v=android-sdk-linux_x86-1.5_r3.zip]​
Right-click and select Extract Here.
Move the contents of the android-sdk-linux_x86-1.5_r3 directory to your desired location.If you followed Optional Installation, move the contents to your /AndroidSDK directory in the root of your filesystem.​
Close directory window.
-------------------------------------- Installing Android SDK -------------------------------------- END!!​
You will now set up your bashrc file and UDEV to recognize your HTC Device.​
!!START -------------------------------------- ADB + FASTBOOT --------------------------------------
The Android Debug Bridge (adb) is one of the tools that will help you the most when you run into flashing problems or running shell commands directly from your machine. UDEV will not recognize your G1 out of the box, but we will configure it with some rules so it can connect.
We will work with /AndroidSDK as the location of your sdk. If this is not your setup, I think you're smart enough to figure it out.
Editing .bashrc file to use tools from /AndroidSDK/tools/ directory -
Go to your home folder.Example: /home/wddglr/​
Press Control + H to view hidden files.
Look for your .bashrc file and double click to open it with gedit.
Add the following lines to the top of the file:
Code:
#AndroidDev PATH
export PATH=${PATH}:/AndroidSDK/tools
IMPORTANT NOTE
savethechicken said:
This is the way that I have my .bashrc file setup. For those having problems with it not recognizing the adb as a command try this...
Code:
export PATH=$PATH:/AndroidSDK/tools
I removed the {} around ${PATH} and it is working if I had them on it would say that it didn't recognize the command. Removed them and all works well.
Click to expand...
Click to collapse
Setting up UDEV to recognize HTC Device -
Type the following into a terminal (Applications > Accessories > Terminal):
Code:
gksudo gedit /etc/udev/rules.d/51-android.rules
Now add the following line to the blank file:
Code:
SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666"
Click save and close.
To restart udev, open up a terminal and enter:
Code:
sudo /etc/init.d/udev restart
Setting up fastboot -
Download this fastboot binary from http://android-dls.com.130.4 KB [http://android-dls.com/files/linux/fastboot]​
Once downloaded to your desktop, right click and select Properties.
Navigate to the Permissions tab and configure the following option:Execute: [√] Allow executing file as program​
Click Close.
Move the fastboot bianary to your /AndroidSDK/tools/ directory.
Reboot.
-------------------------------------- ADB + FASTBOOT -------------------------------------- END!!​Now you can use adb and fastboot directly from any terminal. If you chose to do the Optional Preparation, you can now save your Eclipse Workspace and your downloaded/custom ROMs/Themes in this new /AndroidSDK directory keeping things easier to reach and safe from evil disk errors or other mishaps!!! :O​If you are having problems, send me a PM. I will be happy to help.
*applaudes* awesome. Should be added to helpful threads.
very nice! perhaps add a "(How-To)" prefix to thread??
Everything was going great in setting this up until I got to this part "gedit /etc/udev/rules.d/51-android.rules"
I cannot find "51-android.rules" inside of "rules.d"
Any thoughts>?
nicholasbithell said:
Everything was going great in setting this up until I got to this part "gedit /etc/udev/rules.d/51-android.rules"
I cannot find "51-android.rules" inside of "rules.d"
Any thoughts>?
Click to expand...
Click to collapse
it does not exist, you will make it.
do the command as stated above.
Code:
gksu gedit /etc/udev/rules.d/51-android.rules
Damn you beat me to it!
I was just thinking earlier about doing this same "How-To" guide, I was surprise to see it posted just now.
Anyways, great job!
Can someone sticky this thread. Now I have ADB & fastboot on my Win7, Ubuntu, and OS X Partition. Thank you wddglr.
bravo...linux rocks even better now!...
Awesome tutorial for setting this up. Have been using adb/sdk on ubuntu since oct. but this would have saved me some headaches back in the first couple of weeks.
The onlything that is not clear and/or confuses me is
Setting up the udev to recognize the device.
SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666"
Have never used this (will now to see if it will do anything) and the only problem i have is that sometimes i have to kill-server to get it to connect correctly but i have seen this happen to almost everyone on many forums since the 9.04 came out. And even after putting this file on the computer i have had the problem.
savethechicken said:
Awesome tutorial for setting this up. Have been using adb/sdk on ubuntu since oct. but this would have saved me some headaches back in the first couple of weeks.
The onlything that is not clear and/or confuses me is
Setting up the udev to recognize the device.
SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666"
Have never used this (will now to see if it will do anything) and the only problem i have is that sometimes i have to kill-server to get it to connect correctly but i have seen this happen to almost everyone on many forums since the 9.04 came out. And even after putting this file on the computer i have had the problem.
Click to expand...
Click to collapse
It happens to me also from time to time. especially when i reboot and want to go into adb while the device is rebooting. although that file, 51-adndroid.rules, is what helped me get adb to recognize the device. the guide on developer.android.com talked about 50-android.rules but after a few deep searches i found this: http://groups.google.com/group/android-developers/browse_thread/thread/1d3488c601243686
Okay A few questions for you....
First I fixed the whole "couldnt find the (51-android.rules) file now I am having issues with executing ADB!
When in terminal this is what I get...
"[email protected]:/home/nick# /AndroidSDK/tools/adb
bash: /AndroidSDK/tools/adb: cannot execute binary file
[email protected]:/home/nick#"
and I also noticed something different from when I start terminal the first lines now state
"bash: : command not found
[email protected]:~$"
I dont remember the first line ever being there, but I could be mistaken!
Any help would be greatly appreciated!
Edit: You state creating "Mount point: /AndroidSDK" During Installation, and what I did was Just place my AndroidSDK at root so it is at "/AndroidSDK". I dont know if this makes a difference.
I am actually running ubuntu 8.10 ha! I just tried to update But I keep getting errors! is there anything I can change to get this to work on ubuntu 8.10?
nicholasbithell said:
First I fixed the whole "couldnt find the (51-android.rules) file now I am having issues with executing ADB!
When in terminal this is what I get...
"[email protected]:/home/nick# /AndroidSDK/tools/adb
bash: /AndroidSDK/tools/adb: cannot execute binary file
[email protected]:/home/nick#"
and I also noticed something different from when I start terminal the first lines now state
"bash: : command not found
[email protected]:~$"
Edit: You state creating "Mount point: /AndroidSDK" During Installation, and what I did was Just place my AndroidSDK at root so it is at "/AndroidSDK". I dont know if this makes a difference.
I am actually running ubuntu 8.10 ha! I just tried to update But I keep getting errors! is there anything I can change to get this to work on ubuntu 8.10?
Click to expand...
Click to collapse
okay, a few things -
seems like your .bashrc file isn't setup right (?)
make sure that the two lines you inserted into it are on separate line
Code:
#AndroidDev PATH
export PATH=${PATH}:/AndroidSDK/tools
because maybe export PATH=${PATH}:/AndroidSDK/tools got commented on accident if you copy pasted.
When copying your SDK to the root of your filesystem, did you copy it as your own user or as root? you can use:
Code:
gksu nautilus
to copy system files with complete root privileges.
What exactly are you trying to update, Ubuntu or ... ? There shouldn't be a difference to get this working on 8.10, the only thing that seemed to change was the 51-android.rules file. Maybe this can help -
renaming it to 50-android.rules with
Code:
gksu nautilus
and deleting any backups (use CTRL+H to view hidden files).
restarting udev using:
Code:
sudo /etc/init.d/udev restart
Remember this is for 9.04, not 8.10. I hope this helps.
wddglr said:
okay, a few things -
seems like your .bashrc file isn't setup right (?)
make sure that the two lines you inserted into it are on separate line
Code:
#AndroidDev PATH
export PATH=${PATH}:/AndroidSDK/tools
because maybe export PATH=${PATH}:/AndroidSDK/tools got commented on accident if you copy pasted.
When copying your SDK to the root of your filesystem, did you copy it as your own user or as root? you can use:
Code:
gksu nautilus
to copy system files with complete root privileges.
What exactly are you trying to update, Ubuntu or ... ? There shouldn't be a difference to get this working on 8.10, the only thing that seemed to change was the 51-android.rules file. Maybe this can help -
renaming it to 50-android.rules with
Code:
gksu nautilus
and deleting any backups (use CTRL+H to view hidden files).
restarting udev using:
Code:
sudo /etc/init.d/udev restart
Remember this is for 8.10, not 9.04. I hope this helps.
Click to expand...
Click to collapse
Okay this is how I moved my "AndroidSDK" Folder to root....
[email protected]:~$ su
Password:
[email protected]:/home/nick# mv /home/nick/Desktop/AndroidSDK /
[email protected]:/home/nick#"
And I went to the bashrc file and it is entered in there correctly.
This is still what I get even after restarting Udev...
" bash: : command not found
[email protected]:~$ adb
bash: /AndroidSDK/tools/adb: cannot execute binary file
[email protected]:~$ su
Password:
[email protected]:/home/nick# adb
bash: adb: command not found"
Edit: This is what my .bashrc file looks like, well the top part of it anyways....
#AndroidDev PATH
export PATH=${PATH}:/AndroidSDK/tools
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
Okay your .bashrc is setup right and it's recognizing adb and its directory.
I would say it's something to do with permissions. since you moved it under su, you are not the owner so i would say that you'd have to change the permissions of /AndroidSDK
you can do that with -
Code:
gksu nautilus
Navigate to /
Right click on /AndroidSDK and select Properties
Click on Permissions tab
Select your user account as the owner
hopefully now it will function correctly
wddglr said:
Okay your .bashrc is setup right and it's recognizing adb and its directory.
I would say it's something to do with permissions. since you moved it under su, you are not the owner so i would say that you'd have to change the permissions of /AndroidSDK
you can do that with -
Code:
gksu nautilus
Navigate to /
Right click on /AndroidSDK and select Properties
Click on Permissions tab
Select your user account as the owner
hopefully now it will function correctly
Click to expand...
Click to collapse
I dont understand what this line does...
"gksu nautilus"
when i type it in it asks me for my administrative password and then after i put it in it hangs for a sec and then back to...
bash: : command not found
[email protected]:~$ gksu nautilus
[email protected]:~$
nautilus is the file browser, while using gksu nautilus you can use the file browser under root privileges
wddglr said:
nautilus is the file browser, while using gksu nautilus you can use the file browser under root privileges
Click to expand...
Click to collapse
I dont have Nautilus as a file browser I have Thunar I believe.
Then gksu thunar
wddglr said:
nautilus is the file browser, while using gksu nautilus you can use the file browser under root privileges
Click to expand...
Click to collapse
For permissions it says that I am the owner and the group (I=Nick) for Others it says Read and Write, Access says Read and write. So it seems it has all the right permissions. Any other Ideas?
Partitioning HD
First off, thank you for this thread, it's most excellent. I have a question that is slightly off topic, but not so much. I have Ubuntu 9.04 installed on my recovery partition. This partition is only 10 GB, while I have Vista on my main. I have almost 100 GB free on my main drive, and what I want to know is, if I resized my partitions to give more space to Ubuntu, how would it affect my comp? (if at all). And which OS should I be on while resizing, Ubuntu or Vista?

[HOWTO] Guide to running ADB under Fedora 11 (and equivalent distros)

Ok, I have fedora 11 installed on most of my computers, since i love this distro to death. My big thing was trying to get adb to work. This is my guide to get it to work, for now.
First things first. Navigate to /etc/udev/rules.d as root. Create a rules file called 50-android.rules (touch 50-android.rules). NOTE: You are better off looking at the contents and picking a rules number set other than what is listed. Sometimes udev is picky. For the newbies, so if any rules start with '50', then change the number by one or two, like 51 or 52. Paste this into the file:
Code:
SUBSYSTEM=="usb",ATTRS{idVendor}=="0bb4",SYMLINK+="android_adb",MODE="0666"
Make sure you use ATTRS, not ATTR or SYSFS, since this is a newer updated udev system.
After that, run udevadm control --reload-rules to reload your rules files. Now just run ./adb devices as root to make sure it recognized your HTC dream. I am working on this fix right now so you don't need to be root, keep patient. Now you can adb shell into your device either as root OR normal user, just as long as you start the server as root. This is a permissions problem, and hopefully I can fix this and/or find a fix soon.
I wrote this because i searched high and low through google, and only found a few good parts as far as a fix. Hopefully this helps a few people out there.
Just wondering if this has helped anyone. If not, delete this thread or do whatever with it....
I have adb on my eeepc 900 with f11 I believe this method works too as well. although it says it has been tested with ubuntu, it works pretty well with f11.
http://www.talkandroid.com/android-sdk-install-guide/
Installing The Android SDK
First you will need to download the Android SDK pack .zip archive, once downloaded find a suitable installation location on your machine and extract the zipped files.
Please note: This installation location will be referred to as $SDK_ROOT from now on through this tutorial
Alternatively you can add /tools to your root path which will prevent the need to specify the full path to the tools directory along with enabling you to run Android Debug Bridge (adb) along with other command line tools.
To add /tools:
Linux
1. Edit the ~/.bash_profile or ~/.bashrc files looking for a line that sets the PATH variable.
2. Add the full path location to your $SDK_ROOT/tools location for the PATH variable.
3. If no PATH line exists you can add the line by typing the following:
4. export PATH=${PATH}:<path to your $SDK_ROOT/tools>
Click to expand...
Click to collapse
It helped me, since the creation of the file my OpenSuSE 11.0 recognizes the phone perfectly
Thanks a lot for your hint.
thanks it helped me. ill be looking forward to getting it to work without root
just use sudo instead
Just a heads up for user's using Ubuntu 9.10, this isn't needed. I connected my G1 to it and ran ADB with no adjustments to udev or anything else.
Pretty much it works out of the box.
Here is my version
download the .tgz file from googlecode
http://developer.android.com/sdk/index.html
sudo tar -xzvf android-sdk_r3-linux.tgz
Click to expand...
Click to collapse
Code:
sudo gedit ~/.bash_profile
heres my bash_profile
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
export PATH=$PATH:/android-sdk-linux/tools
Click to expand...
Click to collapse
logout
login
connect android g1 device via usb to pc
open a terminal
Code:
adb devices
if you cant get a device try it with superuser.
Don't you think that this is all just a little bit excessive?
To make it work in F11, just do this;
Download SDK, extract.
To use, type:
/path/to/sdk/tools/adb
Another option is to edit the /etc/profile and add
PATH=$PATH:/<Path to android-sdk>/tools
This option will allow any user to use the adb tools when logged in or if you
su -
into another user
I wrote a short guide as well for Windows and Ubuntu. Might help others.
Unfortunately, as anyone with a passing acquaintence with ADB knows, the scrolling issue can be a killer. I swear the other day I pressed "up" twice and it composed "rm /sdcard/rootfs.img /sdcard/system.ext2" and executed it. We run Android on our SD's btw.. Was not cool. Instead, I use ADB via telnet and it works beautifully. Here's how:
Code:
adb shell telnetd &
adb forward tcp:9999 tcp:23
Now type this: "telnet localhost 9999"
Enter "root" and hit enter
Finally update PATH: "export PATH=/usr/bin:/usr/sbin:/bin:/sbin:/system/sbin:/system/bin:/system/xbin:/system/xbin/bb:/data/local/bin"
Okay, so 4 lines to enter and you have a "regular, sane" shell connection to the phone and you can actually scroll through history and text without it jumbling the text and executing random code. Enjoy.
lbcoder said:
Don't you think that this is all just a little bit excessive?
To make it work in F11, just do this;
Download SDK, extract.
To use, type:
/path/to/sdk/tools/adb
Click to expand...
Click to collapse
that works too as well but i would rather open up a terminal and type
sudo adb devices
sensimila said:
that works too as well but i would rather open up a terminal and type
sudo adb devices
Click to expand...
Click to collapse
WHY would you want to make it *MORE COMPLICATED*??
There is NO NEED for root.
/path/to/adb ...
THATS ALL.
This is kind of funny... i wrote this because i had trouble with it, so i am just sharing my fix...
In case this is interesting to someone:
The fix mentioned in the first post has to be applied to open SuSE x86 and x64 edition to make the G1 work. The external device works without it, but not the adb device.
Thanks again!
Just wanted to come and post that this does work with OpenSUSE 11.2 x86. Did this hoping to get adb to work with my LG Ally and it does. Thanks!
(Still) works for me on 64bit SUSE 11.4.
Before adding this file, I could not access my device with adb, received permissions errors.
Added this file, and I can shell into my device.
Permissions on adb itself was not the problem, it was access to the device when udev found it.
[edit]Actually used the lines from http://developer.android.com/guide/developing/device.html[/edit]

[How to]? ADB on Ubuntu 10.10?

Can someone provide a step-by-step guide to installing ADB on Ubunto 10.10 for a beginner please?
Thanks
Still need help
t0ph0id said:
Can someone provide a step-by-step guide to installing ADB on Ubunto 10.10 for a beginner please?
Thanks
Click to expand...
Click to collapse
It's been awhile since you posted, do you still need help. I have a simple method, let me know and I will make you instructions. It wouldn't be a problem.
blas4me said:
It's been awhile since you posted, do you still need help. I have a simple method, let me know and I will make you instructions. It wouldn't be a problem.
Click to expand...
Click to collapse
I would love a quick step-by-step. Been trying to figure this out but failing. Hard.
ADB & FASTBOOT Help: Updated 6/6/12
WORKS FOR x86 VERSION OF 12.04 - 12.10 TO MAKE IT WORK FOR x64 FOLLOW LINK BELOW, THEN COME BACK HERE AND FINISH SETUP. I ALSO ADDED A VIDEO, CHECK IT OUT
1. You must have java installed before you start set up.
http://askubuntu.com/questions/131207/android-sdk-cant-be-installed-on-ubuntu-12-04-64
I know if your new the other instructions can be confusing, so I kinda know what you guys are looking for, just a basic breakdown, I remember when I started playing around with 9.04, the adb setup had me stuck, Ubuntu used to frustrate me, because I didn't understand Unix based systems, but you catch on, especially if your a android user.
JUST A TIP: I make my SDK folder androidsdk, for simplicity and that's how I learned to install. so I'm just showing you the way I learned. I have rooted over 20 different Android devices, and I've installed this method on multiple Linux distros without a problem. For those of you that are new to Linux, know that Linux is hardwired for Andorid devices, same kernal and all, and that's why it's wise to do all things Android on Linux machines, I try to anyway
RECENT CHANGES TO SDK: updated 11/1/12: Just installed on Ubuntu 12.10, and the Linux adb installer is no longer needed, when I ran adb command after copying SDK to my /usr/local/ directory, my device showed up. Some resent changes to the SDK, also changed the way you set up, but not very much. The SDK provides all the files you need to set up, including fastboot.
NOTE: Once you've finished the setup, know that you push & pull right from your home folder, no need to put things in the tools folder like Windows, same thing when you pull, look for the files in the home folder.
1. Go here for the latest SDK
http://developer.android.com/sdk/index.html
(once download, double tap and extract right to home folder, rename to androidsdk)
a. Make android file executable
2. Open teminal.
a. Navigate to your SDK directory
Code:
cd /home/username/androidsdk/tools
you should get [ $ ] at the end of your path.
b. Type
Code:
./android
your SDK Manager should start.
ADVICE: I suggest you only download tools and platform-tools to make the setup quick, you can go back later and install what you need
NOTE: For development purposes you need a copy of ADB & Fastboot in your tools folder, Eclipse looks for ADB in the folder, so if you plan on developing, then you'll need those files there.
3. Open home folder, press ctrl & H to show hidden files, find bashrc
a. Paste in terminal from your document after you input your user name:
Code:
#AndroidDev PATH
export PATH=${PATH}:/androidsdk/tools
export PATH=${PATH}:/androidsdk/platform-tools
export PATH=${PATH}:/home/*********/androidsdk/tools
export PATH=${PATH}:/home/*********/androidsdk/platform-tools
4. Paste in terminal from your document after you input your user name:
Code:
export PATH=$PATH:/androidsdk/tools
export PATH=$PATH:/androidsdk/platform-tools
export PATH=$PATH:/home/*********/androidsdk/tools
export PATH=$PATH:/home/*********/androidsdk/platform-tools
NOTE: For this part you'll need your devices id, here's a list, if your devices id isn't here, use code below.
Acer 0502
ASUS 0b05
Dell 413c
Foxconn 0489
Fujitsu 04c5
Fujitsu Toshiba 04c5
Garmin-Asus 091e
Google 18d1
Hisense 109b
HTC 0bb4
Huawei 12d1
K-Touch 24e3
KT Tech 2116
Kyocera 0482
Lenovo 17ef
LG 1004
Motorola 22b8
NEC 0409
Nook 2080
Nvidia 0955
OTGV 2257
Pantech 10a9
Pegatron 1d4d
Philips 0471
PMC-Sierra 04da
Qualcomm 05c6
SK Telesys 1f53
Samsung 04e8
Sharp 04dd
Sony 054c
Sony Ericsson 0fce
Teleepoch 2340
Toshiba 0930
ZTE 19d2
In terminal type:
Code:
lsusb
and that will give a list of all USB devices attached to your machine.
a. In terminal, type:
Code:
gksudo gedit /etc/udev/rules.d/51-android.rules
b. Add these lines, put your device ID between quotations, then save
Code:
SUBSYSTEM=="usb", ATTRS{idVendor}=="HERE", SYMLINK+="android_adb", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="HERE", SYMLINK+="android_adb", MODE="0666"
c. In terminal type:
Code:
sudo restart udev
5. Download the Linux ADB installer zip, extract to your home folder, make script executable and to run with auto prompt (plug your phone in if it isn't already) then just double click and choose run, then let it do it's thing Takes a second, and it should ask for permissions = user password
NOTE: When you run nautilus your going into file system directory as root, so proceed with caution, and back up any file you plan on editing. Installing SDK doesn't make a folder in /usr/local/ any more, so you'll have to copy SDK to that directory as root.
6. Open terminal, type:
Code:
sudo nautilus
a. Go to :File system /usr/local
b. Copy and paste a copy of your SDK folder there
c. Close root session
d. Close terminal
7. Open terminal, type:
Code:
adb devices
you should see your device, then type fastboot devices it should just go to the next line, you have to be in fastboot to see your device
Now you should have ADB & Fastboot on your beautiful Ubuntu machine!!!!!!!!!!
With narration
http://www.youtube.com/watch?v=HsCd1nMywR8&hd=1
Without
http://www.youtube.com/watch?v=IGAiHkPuhg8
Extra goodie (Aero Snap Windows.) Extract and follow intructions. Enjoy!!!!!!!!!
TIP: For trigger delay, the lower you set it the faster your widows will resize, and I have mine set for left & right edge. Having it set @ right & left is a headache because every time your pointer touches left or right side of the screen , widows resize. So, having them set to the edges works for me.
Just wanted to say thanks, awesome post.
Thanks
star.gazer said:
Just wanted to say thanks, awesome post.
Click to expand...
Click to collapse
I've been waiting to hear feedback, was it a simple process.
I see two problems at first glance with the instructions above:
1. This will only work with two brands, the one
SUBSYSTEM=="usb", ATTRS{idVendor}=="0bb4", SYMLINK+="android_adb", MODE="0666"
Click to expand...
Click to collapse
being HTC ("0bb4"), the other
SUBSYSTEM=="usb", ATTRS{idVendor}=="18d1", SYMLINK+="android_adb", MODE="0666"
Click to expand...
Click to collapse
not known to me. For a list of other vendors, have a look at http://developer.android.com/guide/developing/device.html .
2. You're mixing up adb-related instructions with instructions to change Ubuntu's UI, which is totally unrelated. This "Extra goodie (Aero Snap Windows.)" is neither needed for the task in question nor is it asked for by many Linux users (like me). Also, I wouldn't recommend -- at least not to an average user -- to bypass Ubuntu's package management in order to get some visual sugar. Bypassing might conflict with further updates and lead to a situation where thorough knowledge is required.
As a simple, efficient and painless way I recommend the app adbWireless. No need to install anything but the SDK (downloaded from developer.android.com and only from there) and the app. Then start adb and the app and give the command line provided by the app's display, and you're connected without any messing around with udev and permissions.
Who are you!!!!!!!!!
mizch said:
I see two problems at first glance with the instructions above:
1. This will only work with two brands, the one being HTC ("0bb4"), the other not known to me. For a list of other vendors, have a look at http://developer.android.com/guide/developing/device.html .
2. You're mixing up adb-related instructions with instructions to change Ubuntu's UI, which is totally unrelated. This "Extra goodie (Aero Snap Windows.)" is neither needed for the task in question nor is it asked for by many Linux users (like me). Also, I wouldn't recommend -- at least not to an average user -- to bypass Ubuntu's package management in order to get some visual sugar. Bypassing might conflict with further updates and lead to a situation where thorough knowledge is required.
As a simple, efficient and painless way I recommend the app adbWireless. No need to install anything but the SDK (downloaded from developer.android.com and only from there) and the app. Then start adb and the app and give the command line provided by the app's display, and you're connected without any messing around with udev and permissions.[/QUOTE/]
The other number is the new HTC id, for those who have other android devices, I included the auto script. I've been waiting for someone like you to come along, "a mister know it all", but it's kool. Just to let you know I got Aero Windows from OMGubuntu. I still get updates. as I'm typing my Update Manaer just notified me, that there are updates for me. Obviously your not familiar with setting up ADB&Fastboot on Ubuntu. And you should be smart enough to see that the instructions are just for ADB&Fastboot setup. The instructions for Aero are inside the zip. I put everything here instead of starting a new post, duh, how many members have you helped on this forum. Don't try to confuse other members, with your babble. Next time don't just glance read, read, read, Maybe you just need a friend Two words for you " Open Source "
Click to expand...
Click to collapse
I've been waiting for someone like you to come along, "a mister know it all", but it's kool.
Click to expand...
Click to collapse
Hope you feel better now.
Just a quick post to say thanks.
Easy to follow and got me working on flashing my radio from my new 10.10 installation.
nategs said:
Just a quick post to say thanks.
Easy to follow and got me working on flashing my radio from my new 10.10 installation.
Click to expand...
Click to collapse
Thanks for the feedback.
Thanks
Thank you for the easy to follow post. I am a new user to Ubuntu (and Linux in general) and this was an extremely user friendly tutorial.
blas4me said:
I know if your new the other instructions can be confusing, so I kinda know what you guys are looking for, just a basic breakdown, I remember when I started playing around with 9.04, the adb setup had me stuck, Ubuntu used to frustrate me, because I didn't understand linux based systems, but you catch on, especially if your a android user. You can just copy & paste all of the command. I've done this on 10.04 about four or five times, and 10.10 twice so far.
Edit: I just set up adb on my other lappy, and I notice the SDK is a little different. There is no adb file in the tools folder, it's just in another folder. You don't have to give it permissions, so just follow the instructions, and enjoy the new additions to the SDK.
Note: Once you've finished the setup, know that you push & pull right from your home folder, no need to put things in the tools folder like Windows, same thing when you pull, look for the files in the home folder.
1.Go here for the latest SDK
http://developer.android.com/sdk/index.html
(once download, double tap and extract right to home folder, rename to androidsdk)
2.Open folder and got to tools folder
a.right click on adb, go to properties and check allow execution, choose or add open with auto prompt, do same for android file then double click on android and choose run
b.download and install, let it finish
Note: When I say add these line, I'm saying add the lines under the alphanumeric instructions
3.Open home folder, press ctrl & H to show hidden files, find bashrc
a.add these lines to the top of file,# include, then space it from next paragraph of text
#AndroidDev PATH
export PATH=${PATH}:/androidsdk/tools
4.Open terminal, type: export PATH=$PATH:/androidsdk/tools
a.in terminal, type: gksudo gedit /etc/udev/rules.d/51-android.rules
b.add these lines, then save
c.in terminal type: sudo restart udev
SUBSYSTEM=="usb", ATTRS{idVendor}=="18d1", SYMLINK+="android_adb", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0bb4", SYMLINK+="android_adb", MODE="0666"
(plug your phone or phones in if it isn't already)
5.Extract the installer zip to your home folder, make script executable and to run with auto prompt, then just double click and choose run, then let it do it's thing
Note: When you run nautilus your going into file system directory
6.Open terminal, type: sudo nautilus
a.go to /usr/local/androidsdk/tools
b.make adb file executable, and choose or add open with auto prompt, then close root session and close terminal
7.Open terminal, type: adb devices, you should see your device or devices
8.Set up fastboot, go here for the file
http://forum.xda-developers.com/showthread.php?t=537508
a.once downloaded, copy to tools folder in your home directory, and enter root session with sudo nautilus command and add fastboot to /usr/local/androidsdk/tools
b.don't forget to make both files executable, and open with auto prompt,then close root session, close terminal.
9.Open terminal, type: adb devices
a.type:fastboot devices
(if it just go's to the next line your cool, you need to be in fastboot to see your device, if you get fastboot not found, then go back to the fastboot files and make sure you did part:8b
Now you should have adb&fastboot on your beautiful Ubuntu machine!!!!!!!!!!!
Extra goodie (Aero Snap Windows.) Extract and follow intructions. Enjoy!!!!!!!!!
TIP: For trigger delay, the lower you set it the faster your widows will resize, and I have mine set for left & right edge. Having it set @ right & left is a headache because every time your pointer touches left or right side of the screen , widows resize. So, having them set to the edges works for me.
Click to expand...
Click to collapse
Excellent Post. Thank you very much.
I can't get anything but "No command 'adb' found"
I'm trying to follow your instructions, but the section with the export PATH stuff is very hard to follow.
I know that adb is located in:
Code:
/home/USERNAME/Applications/android-sdk/platform-tools
So I would put this in my .bashrc:
Code:
#AndroidDev PATH
export PATH=${PATH}:/Applications/android-sdk/platform-tools
# include
And then I'd type this into the terminal:
Code:
export PATH=$PATH:/Applications/android-sdk/platform-tools
Right?
blas4me said:
TIP: For trigger delay, the lower you set it the faster your widows will resize, and I have mine set for left & right edge. Having it set @ right & left is a headache because every time your pointer touches left or right side of the screen , widows resize. So, having them set to the edges works for me.
Click to expand...
Click to collapse
I followed your guide for adb installation and it worked great. I just want to say thanks.
In the Aero tip, I just wanted to know what you meant by setting it to the right and left edges. When I put my pointer to the edges, the windows resize like you said and I wanted to set it up like you have yours.
You'll get it
Mogomra said:
I can't get anything but "No command 'adb' found"
I'm trying to follow your instructions, but the section with the export PATH stuff is very hard to follow.
I know that adb is located in:
Code:
/home/USERNAME/Applications/android-sdk/platform-tools
So I would put this in my .bashrc:
Code:
#AndroidDev PATH
export PATH=${PATH}:/Applications/android-sdk/platform-tools
# include
And then I'd type this into the terminal:
Code:
export PATH=$PATH:/Applications/android-sdk/platform-tools
Right?
Click to expand...
Click to collapse
Your SDK folder should be in your home directory. You should rename your SDK folder to androidsdk for simplicity, if your pasting the commands from my post. I see the path you tried to export and it's not correct. I said in my post that they changed the location of the adb file, but to follow the instructions. You need to redo your bashrc file, just copy and paste my code lines, and you can't go wrong, trust me. I want your adb&fastboot up & running. Let me know what happens.
I figured it out. I should have put a ~ in front of "/Applications" or "home/USERNAME" in front of it.
Thanks
Devildog8791 said:
I followed your guide for adb installation and it worked great. I just want to say thanks.
In the Aero tip, I just wanted to know what you meant by setting it to the right and left edges. When I put my pointer to the edges, the windows resize like you said and I wanted to set it up like you have yours.
Click to expand...
Click to collapse
You can set edge bindings from two applications, SCSM or Compiz
Mogomra said:
I figured it out. I should have put a ~ in front of "/Applications" or "home/USERNAME" in front of it.
Thanks
Click to expand...
Click to collapse
That's strange I've never heard of anybody using that path, can you still just type in " adb devices " and see you phone or do you have to type " sudo adb "
blas4me said:
You can set edge bindings from two applications, SCSM or Compiz
Click to expand...
Click to collapse
So instead of going to the sides, you are going to the corners, correct?

[Q] ADB doesn't work on Mac

When I CD to the platform-tools folder and type
Code:
adb devices
it says "adb: command not found" If anyone could help me that would be wonderful. I am on the Inspire/DesireHD running AOSP Gingerbread. Thanks!
You have two choices. You can either run the command prefixed with ./ (dot slash), which allows for executing an executable in the current directory:
Code:
./adb devices
Or, the other choice (which will be better if you intend to use adb a lot) is to add the platform-tools folder to your path by editing or creating the file .bashrc in your home folder (~/.bashrc).
Let's suppose your platform tools folder is: ~/.android-sdk/platform-tools
Then, you would want to add something along the lines of the following to your bashrc:
Code:
export PATH="$PATH:$HOME/.android-sdk/platform-tools"
Save the file, the run this or log out/in:
Code:
source ~/.bashrc
Et voila, you should now be able to run adb from any folder without issue.
Explanation: adding the new path (folder) to your PATH environment variable tells BASH to include that folder in its search for an executable. The reason $PATH is added at the beginning of the new string is so that your default path does not get overwritten. $HOME will simply expand to /home/your_user_name when BASH interprets it.
GENIUS! IT WORKED! Thank you! Now, one more question- how do I get superuser privileges using ADB? (device is rooted, of course)
No problem.
On my G1 you were root as soon as you adb'd in. Just tested on my Defy and '$' - shocking. So once you have run adb shell, just run 'su' (without quotes of course) and accept the permission on your phone screen as usual for root programs and you should be good to go.
Sorry to keep asking questions, but when I typed
Code:
su
into adb, it asked for a password. No popup on device screen. I do have superuser installed on the device.
That is odd. I'm not sure why that would be. I'll see if I can think of something though. Hopefully someone else can make a suggestion.
Thanks! You have been very helpful.
Don't think I can hit the thanks button from the app, sorry
Sent from my Inspire 4G using XDA App

[GUIDE] ADB on Ubuntu

This will setup ADB to work on Ubuntu with your Transformer Tablet.
Step 1: Download the Android SDK.
Step 2: Unzip the Android SDK to /home.
Step 3: Next we will add the SDK to your path, substitue the example will the path to the tools folder of your SDK.
Example Path:
export PATH=/home/USER/android-sdk/tools/:$PATH
Click to expand...
Click to collapse
Step 4: To make 99-android.rules, run the following command.
sudo gedit /etc/udev/rules.d/99-android.rules
Click to expand...
Click to collapse
Step 5: Add the following lines:
#Transformer
SUBSYSTEMS=="usb", SYSFS{idVendor}=="0b05", MODE="0666", OWNER="USER"
Click to expand...
Click to collapse
Step 6: Save the file.
Step 7: To restart udev, run the following command.
sudo restart udev
Click to expand...
Click to collapse
Step 8: Run the following commands:
adb kill-server
adb start-server
adb devices
Click to expand...
Click to collapse
If device is saying 'no permissions', go to step 5 and add those lines to the other .rules files in /etc/udev/rules.d.
Great guide! You could add step three to ~/.profile or /etc/profile (no dot) to make it permanent at each login. You don't need to add it to both profiles. The /etc/profile is for every one that logs on, ~/.profile is just for your ID.
Also, if you are editing the rules files, you might as well add support for APX mode.
Code:
SUBSYSTEMS=="usb", SYSFS{idVendor}=="0955", ATTRS{idProduct}=="7820", MODE="0666"
You probably don't need the product ID.
EDIT: Not sure why the "no permissions" problem would come up, but I suspect it is because of conflicts with other rules in /lib/udev/rules.d/ You want to make changes in /etc/udev/... The rule with the highest number takes precedence. I think specifying the product ID will prevent conflicts too.
Hi thanks for the help, finally I get my adb working with my Transformer thanks to your .rules file (alwways kept me telling i had no permissions).
Perhaps, there is something I think you should specify for newbies:
Step 3: Open terminal and run the following commands.
export PATH=/home/USER/android-sdk/tools/:$PATH
Click to expand...
Click to collapse
Its important to exactly tell ubuntu where adb is.
In my case its not at TOOLS folder, its been move reciently to /android-sdk-linux_x86/platform-tools/
sylar666 said:
Hi thanks for the help, finally I get my adb working with my Transformer thanks to your .rules file (alwways kept me telling i had no permissions).
Perhaps, there is something I think you should specify for newbies:
Its important to exactly tell ubuntu where adb is.
In my case its not at TOOLS folder, its been move reciently to /android-sdk-linux_x86/platform-tools/
Click to expand...
Click to collapse
It was an example path, you have to give the actual location of your sdk because it may vary.
Sorry if I'm missing something obvious, but doesn't the SDK download off the Google site (linked above) not include adb by default?
I've had to go into the actual program:
Code:
cd /home/USER/[B]Android-SDK[/B]/tools/
./android
(substitute the bold for whatever your SDK directory is called)
Then via the GUI:
- click the Available packages menu option
- click the arrow on Android Repository
- choose to install Android SDK Platform-tools, revision X package
Then once the platform-tools package is installed, you can make sure it's in your path as well as "Tools" (shown in original post). I do this in my .bashrc file (in your home directory):
Code:
export PATH=/home/USER/[B]Android-SDK[/B]/platform-tools/:$PATH
(again, the replace the bold with your SDK directory)
Depending on how you do this, the adb command should now work in a terminal by typing 'adb'. If you put the path in your .bashrc or profile, you might like to run the command 'exec bash' first then try.
Confirmed to work on Arch (get it from the AUR) and just did it tonight on Ubuntu 11.04 x86-64. And thanks for the guide, OP Took me ages to work the udev rules out when I first got my TF. Hopefully this helps someone in the same position in the future.

Categories

Resources