(how to) adb for noobs, by a noob - Droid Eris Android Development

This instructional piece is brought to you by a complete noob. Please be aware that this is simply telling how I got ADB to work on LinuxMint 10 Julia. Some of the steps may be unnecessary but since I am a noob, I took bits and pieces of info and advice to finally accomplish my mission. The main reason I am writing this is because a lot of the tutorials I found are not written for people new to Linux like myself and I found myself confused by simple instructions because I was unfamiliar with some basic terminal commands.
The first thing I did is watch this video on youtube.com. The instructions I am about to give for installing the SDK comes from here.
http://www.youtube.com/watch?v=t8UREMU-wSU
This video walked me through step by step how to install the Android SDK in Ubuntu. Since LinuxMint is a derivative of Ubuntu, it worked perfectly.
The first thing to do is go to this link and download the SDK for Linux.
http://developer.android.com/sdk/index.html
Then move the file to your home folder. Open a terminal and first “cd” to your download folder. Then move the file as follows: ( please be aware that anywhere you see “tombepa”, replace it with your username)
[email protected] ~ $ cd Downloads
[email protected] ~/Downloads $ mv android-sdk-linux_x86.tgz /home/tombepa
After you have moved it, you must unzip it. This is done with the “tar” command. First you must be in your home folder within the terminal because that is where the file is. After you moved the file, your terminal will still be in the Downloads folder and look something like this:
[email protected] ~/Downloads $
Simply type “cd” without the quotes and press enter to return to the home folder:
[email protected] ~/Downloads $ cd
[email protected] ~ $
Then type in the “tar” command and press enter to unzip the file:
[email protected] ~ $ tar xvf android-sdk-linux_x86.tgz
You will then see a lot of lines of text as it unzips. This will create a folder within your Home folder named “android-sdk-linux_x86” and it will contain all the contents it needs for now. It is then safe to remove the android-sdk-linux_x86.tgz file itself from the Home folder. If it is the only .tgz file in the folder then you can type this and press enter. It will remove all .tgz files from the Home folder.
[email protected] ~ $ rm *.tgz
Now it is time to start the SDK and download the packages for Android Development. Now I am not sure if this is needed just to get ADB to work, but once again, I am a noob and was just going by the instructions. In the terminal, you must enter the newly created folder by typing:
[email protected] ~ $ cd android-sdk-linux_x86/
Now that you are in the folder, type this to start the SDK:
[email protected] ~/android-sdk-linux_x86 $ tools/android
A fews lines of text will come up and then after about 5 seconds the SDK graphical interface will open.
This can be seen in the video. On he left side, click the option that says “Available Packages.” Then click “Android Repository” in the middle of the screen. Once you have clicked that, it will automatically select all packages. I left it that way and clicked “Install Selected.” This took about 15 minutes to complete. Once again, probably overkill to install everything, but whatever.
From there I was graced with a link from CondemnedSoul to set up ADB. The link was:
http://wiki.cyanogenmod.com/index.ph...he_Android_SDK
This wasn't exactly the right page I was looking for, but in bold print, it said for ADB go here:
http://wiki.cyanogenmod.com/index.php?title=ADB
(I left the first link in because it gave good info as well on installing the SDK. So thanks CondemnedSoul on pointing me in the right direction!)
It instructed me to download a file linux_adb_fastboot.zip and extract it to ~/bin. After learning how to do that, I typed:
[email protected] ~/Downloads $ unzip linux_adb_fastboot.zip -d ~/bin
What does it do? I don't know, just following orders.
Then it said I needed to set up udev. This apparently gives me and you the permission to use adb on the android device. There has to be rules written and permission given that the computer and the phone recognizes. The first thing to do is create a file called “51-android.rules” in this directory: /etc/udev/rules.d/
Since I can't remember which step actually worked to create the file. Here is the link I was using. I used them all because I did not really know what I was doing but it worked. If anyone can be more specific on how to create it, please enlighten me and I will amend this and give you credit of course.
http://forum.androidcentral.com/linux/57132-how-set-up-udev-rules-ubuntu-10-10-a.html
After it was created, I had to put all the rules in place. After using the instructions on setting up udev from Cyanogen, I came up with these rules. I put them in the file I created by using Nautilus to go to the file, right click on it, then select “Open as Administrator.” I do not know how to do it from the terminal, sorry.
SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666"
SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0c98"
SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0ff9"
SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", OWNER="tombepa" GROUP="tombepa"
SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", MODE="0666"
SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", MODE="0c98"
SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", MODE="0ff9"
SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", OWNER="tombepa" GROUP="tombepa"
SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", USER="tombepa"
(Once again, wherever you see “tombepa”, replace it with your username.)
Click save, then exit all programs and reboot your computer.
Plug the phone in and open a terminal. Navigate to the tools folder inside the android-sdk-linux_x86 folder by typing:
[email protected] ~ $ cd android-sdk-linux_x86/
[email protected] ~/android-sdk-linux_x86 $ cd tools
[email protected] ~/android-sdk-linux_x86/tools $
Then to test to see if it is working, type:
[email protected] ~/android-sdk-linux_x86/tools $ adb devices
If it says;
List of devices attached
HTXXXXXXXXXX device
And the X's are actually numbers, then there you have it! ADB is working.
From there I was able to push my very first apk straight to my phone. With some help from Busphan, I was directed to save the apk I wanted to the “tools” folder, then type:
[email protected] ~/android-sdk-linux_x86/tools $ adb push WHATEVER.apk /system/app
The first several tries it did not work. I then read some more and one website suggested to type:
adb kill-server
adb start-server
adb devices
adb remount
adb push WHATEVER.apk /system/app
I knew it had worked this time because after the last line, a line of text came up telling me how large the file was that was moved. Then I rebooted the phone by typing:
adb reboot
And there it was. Thank you one again to Tazzpatriot, CondemnedSoul, all the devs out there that put this stuff on the internet and youtube for us to learn, and especially Busphan for seeing me through the last steps.
Once again, if you guys see somewhere for me to be more clear about something, tell me what to fix and I will amend this post and give you credit.

Awesome job man, I will definitely check this out, as I'm in the process of replacing ubuntu with mint 10 to try it out. This will come in handy to set up sdk and adb. Thanks for posting this.

Thank you, I'll add the thanks and check it out when I get home
Sent from my phone, duh

Just finished installing Mint 10. I will post again after I run through the sdk advanced process.
Sent from my Ginger Tazz using XDA App

Busphan said:
Just finished installing Mint 10. I will post again after I run through the sdk advanced process.
Sent from my Ginger Tazz using XDA App
Click to expand...
Click to collapse
When you get to the part about creating the File in udev for rules, if you can help me polish it up a bit, I am sure others would appreciate it.
Sent from my Droid using XDA Premium App

tombepa said:
When you get to the part about creating the File in udev for rules, if you can help me polish it up a bit, I am sure others would appreciate it.
Sent from my Droid using XDA Premium App
Click to expand...
Click to collapse
Well, all went well, except we I got to the tools/android command. I kept type cd tools/android, lol. As for the udev portion that is beyond me, but I just followed the commands in the link and it worked. Although, I didn't do the extra stuff you said with nautilus. I wish I had some more input to "polish up" the udev portion but if folks follow the link it will be fine. So my thoughts are you wrote very good instructions to get adb working on Mint or Ubuntu. Again great job. Now all I have to do is go back in and set up eclipse.

Just a quick tip, most of the time when you are typing on a command line, such as the cd command, you can let the shell auto-complete the line by pressing tab. For example, when the active directory is your home, you can start typing cd andr and then press the tab key and it may/should automatically fill in the rest for you (cd android-sdk-linux_x86/.)

doogald said:
Just a quick tip, most of the time when you are typing on a command line, such as the cd command, you can let the shell auto-complete the line by pressing tab. For example, when the active directory is your home, you can start typing cd andr and then press the tab key and it may/should automatically fill in the rest for you (cd android-sdk-linux_x86/.)
Click to expand...
Click to collapse
Thanx for the tip. Tgat does make it go faster and have less mistakes
Sent from my Droid using XDA Premium App

Thanks for the guide, i got it working, once i remembered it was abd instead of adb lol... i'm a noob still

Related

Ubuntu No devices permission

How do I fix this issue?
I am a linux n00bie
[email protected]:~$ adb devices
List of devices attached
???????????? no permissions
You need to create a file named
/etc/udev/rules.d/51-android.rules
containing the line:
SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666"
you need to be root to create the file, use
sudo -s
to become root, then
gedit /etc/udev/rules.d/51-android.rules
will open the new file for editing.
You'll have to reboot when done.
Thank you for your help and please excuse my ignorance in linux.
I just installed ubuntu today
The above didn't seem to work after a reboot.
I did successfully create the file however.
Any ideas?
Thanks.
There is another Vendor id for NexusOne. "0bb4" is not for Nexus but G1:
Working record for Nexus is:
SUBSYSTEM=="usb", ATTRS{idVendor}=="18d1", MODE="0666"
As stated by DEEsx1 the following is correct:
Code:
SUBSYSTEM=="usb", ATTRS{idVendor}=="18d1", MODE="0666"
However, it has been a mystery as to why the following location/file does not work for everyone:
Code:
/etc/udev/rules.d/51-android.rules
I am running Ubuntu 9.10 on my laptop with nothing special, just a straight load. the 51-android.rules code did not work for me.
I searched around on a few linux/android forums and found that some people had luck with creating the following file:
Code:
/etc/udev/rules.d/90-android.rules
However, that did not work for me. I had to create the following file:
Code:
/etc/udev/rules.d/99-android.rules
Now, if you are still getting the error, you don't need to reboot, you just need to restart udev:
Code:
sudo /etc/init.d/udev restart
You may also need to restart the adb daemon:
Code:
adb kill-server
adb start-server
adb devices
Now, worse case that I have seen, make sure the phone is not plugged into the computer, reboot the system AND the phone then try again (I have only seen this once).
Hope these tips help!
DEEsx1 said:
There is another Vendor id for NexusOne. "0bb4" is not for Nexus but G1:
Click to expand...
Click to collapse
You are correct, I didn't realize I had two udev files and I opened the wrong one.
thanks for your help! I'll try this out when I get home.
Yay! it worked. Thanks for your help.
Just out of curiosity how in the hell would I have otherwise known to create a file with a seemingly random name in a random folder?
and why 51-android.rules? why not 1-android or 5000000-android?
What's the logic there?
thanks again
charkosh said:
Just out of curiosity how in the hell would I have otherwise known to create a file with a seemingly random name in a random folder?
Click to expand...
Click to collapse
Welcome to Linux!
Actually, the more you use it, you'll find that you'll pickup these bits along the way, just like this.
charkosh said:
and why 51-android.rules? why not 1-android or 5000000-android?
Click to expand...
Click to collapse
The files are processed in order of their name so 51-xxx is mid-way through, 99-xx is at the tail end of the processing order. Sometimes, the order is important.
Also, after posting the wrong info to you earlier, I deleted the entry I posted. But, it turns out, the Nexus one poses as both id numbers. While in Android its VendorId=18d1, but in the bootloader (waiting in fastboot usb), the VendorId=0bb4.
So, I put both lines in one file today and all is well again.
I.e:
SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666"
SUBSYSTEM=="usb", SYSFS{idVendor}=="18d1", MODE="0666"
and I changed my filename to 99-android.rules
then ran:
sudo restart udev
and now I can access the phone as a non root user again, either from adb or fastboot-linux.
rotohammer said:
Welcome to Linux!
Actually, the more you use it, you'll find that you'll pickup these bits along the way, just like this.
The files are processed in order of their name so 51-xxx is mid-way through, 99-xx is at the tail end of the processing order. Sometimes, the order is important.
Also, after posting the wrong info to you earlier, I deleted the entry I posted. But, it turns out, the Nexus one poses as both id numbers. While in Android its VendorId=18d1, but in the bootloader (waiting in fastboot usb), the VendorId=0bb4.
So, I put both lines in one file today and all is well again.
I.e:
SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666"
SUBSYSTEM=="usb", SYSFS{idVendor}=="18d1", MODE="0666"
and I changed my filename to 99-android.rules
then ran:
sudo restart udev
and now I can access the phone as a non root user again, either from adb or fastboot-linux.
Click to expand...
Click to collapse
Thanks for this! You're a life saver. Actually a hair saver, I get to quit pulling mine out now!
I am definitely glad you posted about the differing device id when using the bootloader. That little detail kicked my butt for about an hour before I figured out what was going on. In Ubuntu (and probably other distros) there is a command line utility called lsusb, that gives you the nitty-gritty details about all the connected usb devices, including the device id. Just in case anyone stumbles across this thread for some yet unreleased android phone.
rotohammer said:
Welcome to Linux!
Actually, the more you use it, you'll find that you'll pickup these bits along the way, just like this.
The files are processed in order of their name so 51-xxx is mid-way through, 99-xx is at the tail end of the processing order. Sometimes, the order is important.
Also, after posting the wrong info to you earlier, I deleted the entry I posted. But, it turns out, the Nexus one poses as both id numbers. While in Android its VendorId=18d1, but in the bootloader (waiting in fastboot usb), the VendorId=0bb4.
So, I put both lines in one file today and all is well again.
I.e:
SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666"
SUBSYSTEM=="usb", SYSFS{idVendor}=="18d1", MODE="0666"
and I changed my filename to 99-android.rules
then ran:
sudo restart udev
and now I can access the phone as a non root user again, either from adb or fastboot-linux.
Click to expand...
Click to collapse
Thanks! It worked for me!
Samsung Vibrant
Thanks adding the file allowed me to remote debug my samsung vibrant on Ubuntu 10.4 - Many thanks!
Unable to see the Galaxy S on Ubuntu after above steps
mattb3 said:
I am definitely glad you posted about the differing device id when using the bootloader. That little detail kicked my butt for about an hour before I figured out what was going on. In Ubuntu (and probably other distros) there is a command line utility called lsusb, that gives you the nitty-gritty details about all the connected usb devices, including the device id. Just in case anyone stumbles across this thread for some yet unreleased android phone.
Click to expand...
Click to collapse
I have followed each of the steps mentioned above. adb devices gives the below response
List of devices attached
????????????? no permissions
adb host restart
Try to restart the host and then try again to connect the phone. The adb host seems to not start correctly after start or reboot of the linux system:
Talderon said:
You may also need to restart the adb daemon:
Code:
adb kill-server
adb start-server
adb devices
Click to expand...
Click to collapse
rotohammer said:
You need to create a file named
/etc/udev/rules.d/51-android.rules
containing the line:
SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666"
you need to be root to create the file, use
sudo -s
to become root, then
gedit /etc/udev/rules.d/51-android.rules
will open the new file for editing.
You'll have to reboot when done.
Click to expand...
Click to collapse
It's not closely necessary reboot. You can try following this steps:
1. Unplug your smarthone from USB
2. Run this command: sudo restart udev
3. Plug your smartphone to USB
These permission issues were driving me nuts. I finally just decided to run adb as root user:
Code:
sudo adb kill-server
sudo adb start-server
sudo adb devices
These steps works fine with a motorola dext (with the right Id). Thank you so much
Fixed
rotohammer said:
You need to create a file named
/etc/udev/rules.d/51-android.rules
containing the line:
SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666"
you need to be root to create the file, use
sudo -s
to become root, then
gedit /etc/udev/rules.d/51-android.rules
will open the new file for editing.
You'll have to reboot when done.
Click to expand...
Click to collapse
Thanks ! Had the same problem ..
Worked Fine on Ubuntu (Virtual Machine) using HTC Desire.
With the same idVendor -as it's the right one for Bravo-
^^
+1 on having to:
sudo ./adb kill-server
sudo ./adb start-server
The most complete set of directions in this thread boil down to (read thread for details):
Put both of the vendor ID lines in 99-android.rules
unplug
restart udev
kill and restart adb server as root
plug in
./adb devices

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

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:
[email protected]~/android-sdk-linux_x86/platform-tools:~$ ./adb shell
To grab files from phone
Code:
[email protected]~/android-sdk-linux_x86/platform-tools:~$ ./adb pull /system/etc/file.txt file.txt
To send file to phone
Code:
[email protected]lelune-~/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.
Took me about 10 mins to get this going. Thank you very much!
I have a guide to setup up a build enviroment for compiling android on a ubuntu 10.10 64bit or 32bit that covers adb also along with test signing. Just google guide to compiling android, covers cm7 and you will find it. It might be under gridlock32404 which was my old user name
Sent from my HTC Vision using XDA App
ffffffffuuuuuuuu where was this last year? took me 2 days to get ADB working in Ubuntu 10.04 lol.
i do have the Ubuntu 10.10 ISO image...thinking about dual booting with win7 64bit.
not sure why i want to go back to Linux though...games ran slower on it =/
Amazing work man. It works like a charm with my milestone.
nice tutorial but it would be even nicer to have a .deb; I never made debs before but I think this should all be doable with rpm though, so I guess it should also be doable with debs
(eg with a postinstall script update udev rules, using sed, restart abd and add a .desktop file)
saved a lot of do it myself
i was about to do this thank you for doing it first nice
I get following error when i try to refresh sources.
Failed to fetch URL https://dl-ssl.google.com/android/repository/repository.xml, reason: java.lang.RuntimeException: error instantiating default socket factory: java.security.KeyManagementException: java.security.KeyStoreException: java.io.FileNotFoundException: /usr/lib/jvm/java-1.5.0-gcj-4.4/jre/lib/security/cacerts (No such file or directory)
Click to expand...
Click to collapse
Edit:- I installed all packages like openjdk, openjre, icedtea etc and i was able to connect to google repo.
thanks Im installed
atapia984 said:
Took me about 10 mins to get this going. Thank you very much!
Click to expand...
Click to collapse
You're welcome! Honestly, it took me about 2 to 3 hours to get it running.
godutch said:
nice tutorial but it would be even nicer to have a .deb; I never made debs before but I think this should all be doable with rpm though, so I guess it should also be doable with debs
(eg with a postinstall script update udev rules, using sed, restart abd and add a .desktop file)
Click to expand...
Click to collapse
Personally, I don't think a .deb file is required. Almost everything can be found in the repository anyways and it's quite easy to set up using terminal, and uh, I never really made debs before either
thank u very muchhhhhhhhhhhhhhhhhhhhhhh, ADB was big problem with me .
thanks again.
sdk now says "x86"
I'm not sure if anyone else had this problem, but I was foolishly copying and pasting the commands over from the OP and it didn't work.
However, when I realized that the SDK package is now titled "android-sdk-linux_x86" with that tiny little "x" before the "86", I got it to work flawlessly.
Now my Ubuntu ADB installation works easier than my Windows ADB!
could someone tell me if you can run movie after you run ubuntu on your PDA
expeciali .mkv video...
please ansevar me...
strikeir13 said:
I'm not sure if anyone else had this problem, but I was foolishly copying and pasting the commands over from the OP and it didn't work.
However, when I realized that the SDK package is now titled "android-sdk-linux_x86" with that tiny little "x" before the "86", I got it to work flawlessly.
Now my Ubuntu ADB installation works easier than my Windows ADB!
Click to expand...
Click to collapse
Thanks for the heads up! I've updated the guide accordingly. Looks like they've changed the name with revision 10
Cool write up. definitely bookmarked.
only because i want to compare it to the method i used to get it running earlier. There are a lot of extra steps it looks like with this method that i didn't do earlier.
Thanks. First method to add to path didn't work, but second did finely.
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.
loveubuntu said:
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.
Click to expand...
Click to collapse
Thanks, I'm gonna try it out on my notebook when I get a chance on Monday. Left it at my workplace. Hopefully, that little space is the reason why the path didn't work on my notebook .
As for the HowtoForge guide link, I wasn't able to find a more updated version for it. It'll be great if they update that guide as well though.
It really is kind of sad, and ironic, that Windows is dominating even on a Linux based OS which is Android. But after playing around with both Windows and Ubuntu for ADB, I personally find ADB on Ubuntu is much more easier (and a bit more stable) to handle. Maybe it's because I usually work with command line on Linux and more on GUI on Windows.
I came across this thread on DF also that seems to be very helpful. CorCor67 put a lot of time into it.
http://www.droidforums.net/forum/droid-themes/129400-themer-studio.html
I cross referenced both threads for those looking
Anybody know howto - about fastboot.exe I mean I have done all the steps ahead and have adb installed but cant figure out how to install fastboot in platform-tools directory.
I reinstalled it again but there is no fastboot.exe it hadn`t appeared in platform-tools. 3 month`s ago I did it just like that and it installed fastboot automagically but this time I just don`t now what to do and where to dig. Not able to flash radio at the moment.
Ubuntu 10.04
Desire HD

Guide to setting up ADB for Ubuntu/Linux

Hopefully his isn't totally redundant or horribly written, MODS feel free to do what you will with it. This is just me trying to give back to the community that's giving so much to us.
This is for the ubuntu/linux user that has never setup or succesfully set up the android sdk and adb but does know what terminal is and is fairly computer literate.
AKA: I couldn't Find the guide I'd been looking for so I decided to write it myself.
Credit goes to s3gfault for getting me thru this process and having the knowledge, this guide is based off the steps that he guided me thru and I recorded over a chat log. This guide is written for someone who has no idea where to start or what to do or has tried and failed to get adw/sdk fully functional on their linux/ubuntu box.
Step 1) Create a folder named "ANDROID" in your home folder
Step 2) Download the Android SDK for Linux(i383) from here: Android dev site and place it in the newly created ANDROID folder
Step 3) Right click on "android-sdk_r10-linux_x86.tgz" (the file you just downloaded and moved to the ANDROID folder) and select "Extract here"
Step 4) Open the Ubuntu Software Center. Select Edit-->Software Sources (at this point it will ask for your sudo/root password)-->Other Software. Checkmark "Canonical Partners" then Close
Step 5) Right next to the "Get Software" in the left hand list column in the Software center you will see a arrow/indicator. Ckick on that to expand the list and then select "Canonical Partners" Look thru the list on the right and find "Sun Java(TM) Development Kit(JDK) 6" and click "more info." In the "Add-Ons" section* checkmark the (sun-java6-javadb) package and (sun-java6-source) options. Click "Apply Changes," and accept the License Agreement. Exit the Software Center after install.
*honestly the extra add-on packages may not be needed (I honestly don't know) but unless you're hurting for bandwidth I can't see them hurting.
Step 6) Start a terminal session and input
Code:
sudo vi /etc/udev/rules.d/70-android.rules
Terminal will then ask for your password, then will output something that should look like this:
Code:
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
"/etc/udev/rules.d/70-android.rules" [New File]
once it does, close the terminal window.
Step 7) Start a new terminal window and input
Code:
gksudo gedit /etc/udev/rules.d/70-android.rules
This will open the geditor. Once it does paste
Code:
SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666"
INTO the GEDIT file, Save and Exit. Exit terminal.
Step 8) Navigate back to your "ANDROID" folder. open the file folder that you exctracted, multi-select the contents of the entire folder (folders add-ons, platforms, tools and a readme.txt) and cut/paste them directly into the ANDROID folder where the .tgz file is. Delete the now empty shell folder. Navigate to ANDROID/Tools/ find the file named "android" and double click on it. A pop-up box will appaer asking you what you want to do. Click "Run". At this point the Android SDK and AVD Manager will open. in the left navigation pane select available packages. IMPORTANT: If you're in a hurry or low on bandwidth you can expand Android repository--> and just select "Android SDK Platform-tools, revision 3" as that is where ADW is located, otherwise you may want to go ahead and install everything. Your choice.
Click "Install Selected"-->"Install" after download pop-up about ADW, select "Yes" watch the dialogue for a succesful kill/restart of ADW and then hit "Close" and exit the SDK Manager
Step 9) Open a terminal session and type
Code:
cd /home/*****/ANDROID/platform-tools
where ***** is your ubuntu username, in the case of my laptop, loganmobile.
Protip: navigate to the adb file and right click-->Properties copy/paste path after cd command in terminal.
Step 10) On your Android phone: Menu-->Settings-->Applications-->Development: USB Debugging. Make sure it is checked on. Connect your phone via usb to your computer, DO NOT mount as sdcard.
Step 11) Back in terminal type in
Code:
./adb devices
it should now list your phone! huzzah!
Step 12) And you thought you were done? A few more things to wrap everything up all nice and tidy.
Open a new terminal instance and type
Code:
gedit ~/.bashrc
and add this line to the bottom of the file:
Code:
export PATH=$PATH:/home/*****/ANDROID/platform-tools
where once again ***** is your Ubuntu username. Save and exit the file.
Reboot your machine and verify that ADB still works afterwards via the same
Code:
cd /home/*****/ANDROID/platform-tools
./abd devices
winning
***DISCLAIMER***
I am by no means an expert and s3gfault is not at fault if you blow something up, he coached me thru this and it worked for me on both my desktop and laptop running Ubuntu 10.10. I provided this write up in hopes that it helps someone who was/is in the same boat I was in; somewhat lost and very frustrated as to why their adb didn't work right. Please add critiques and suggestions, or just flame me.
Thanks go out to andrew8806 for helping root my thunderbolt the first go around, jcase for helping me reroot it after it somehow messed up (and being an awesome dev) and s3gfault for handholding me thru the process of getting adb permanently working.
Good write up
Sent from my Thunderbolt using XDA Premium App
Guess this isn't as useful/helpful as I thought it would be.
qwirked said:
Guess this isn't as useful/helpful as I thought it would be.
Click to expand...
Click to collapse
It is if your new to linux, it's really a good write up
Sent from my Thunderbolt using XDA Premium App
Another, bit more compehensive guide, good one:
Lazyman's installation guide to ADB on Ubuntu 10.10
Cheers!
I found it helpful
qwirked said:
Guess this isn't as useful/helpful as I thought it would be.
Click to expand...
Click to collapse
I liked it and found it quite helpful. I've known how to use adb in windows, but not Ubuntu (which I use 90% of the time) until now. This write up got me going and I would like to say thanks...
Now I don't have to boot into windows for adb anymore
Thanks mate i know this is a very old post but believe me you have helped me much thank you...
or you can follow my signature.

[Q] Setting up ADB on nook with Ubuntu

Hey everyone, I'm a big newb when it comes to Ubuntu. I got into it because I wanted an OS that was as open as CM7, and so far it's great! I was trying to install ADB on my computer and I was using the link http://forum.xda-developers.com/showthread.php?t=921169. I got JDK installed, and sdk, its about step 4 that I get lost. In terminal when I put in $ ./adb devices it doesn't list any devices. I might be wrong, but I think it needs to recognize my nook as a adb device before I can do anything else. Am I missing a step? Any help would be great!
actorman46 said:
Hey everyone, I'm a big newb when it comes to Ubuntu. I got into it because I wanted an OS that was as open as CM7, and so far it's great! I was trying to install ADB on my computer and I was using the link http://forum.xda-developers.com/showthread.php?t=921169. I got JDK installed, and sdk, its about step 4 that I get lost. In terminal when I put in $ ./adb devices it doesn't list any devices. I might be wrong, but I think it needs to recognize my nook as a adb device before I can do anything else. Am I missing a step? Any help would be great!
Click to expand...
Click to collapse
Follow the steps from Nookdevs.com here http://nookdevs.com/NookColor_USB_ADB
In your case, since you have everything setup. Make note specifically to run this command from the link posted above:
Ensure that your rooted NOOKcolor is plugged in.
Run the following command in terminal:
Code:
mkdir -p ~/.android && echo 0x2080 > ~/.android/adb_usb.ini && adb kill-server && adb devices
If you get output that looks like the following you have succeeded:
Code:
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
List of devices attached
[YOUR NOOKCOLOR SN] device
-Racks
racks11479 said:
Follow the steps from Nookdevs.com here http://nookdevs.com/NookColor_USB_ADB
Click to expand...
Click to collapse
okay on step 4 it says to edit your .bash_profile, by putting the command in terminal
nano ~/.bashrc
then append these lines at the end and save the file.
export PATH=${PATH}:<your_sdk_dir>/platform-tools
I'm not sure what it's asking me to do. After putting in nano ~/.bashrc do I just scroll to the bottom and add that line? And if that's it, how do I save it?
Told you I new! But thanks for showing me the right link.
Oh, that command you told me to pay attention to doesn't work for me but when I type in
$ cd ~/android-sdk-linux_x86/platform-tools
[email protected]:~/android-sdk-linux_x86/platform-tools$ ./adb devices
it now lists my device with permission, the same way that command was supposed to.
I just need help setting my path in bashrc!
actorman46 said:
okay on step 4 it says to edit your .bash_profile, by putting the command in terminal
nano ~/.bashrc
then append these lines at the end and save the file.
export PATH=${PATH}:<your_sdk_dir>/platform-tools
I'm not sure what it's asking me to do. After putting in nano ~/.bashrc do I just scroll to the bottom and add that line? And if that's it, how do I save it?
Told you I new! But thanks for showing me the right link.
Oh, that command you told me to pay attention to doesn't work for me but when I type in
$ cd ~/android-sdk-linux_x86/platform-tools
[email protected]:~/android-sdk-linux_x86/platform-tools$ ./adb devices
it now lists my device with permission, the same way that command was supposed to.
I just need help setting my path in bashrc!
Click to expand...
Click to collapse
1. Yes, just scroll to the bottom and add 'export PATH=${PATH}:~/android-sdk-linux_x86/platform-tools/platform-tools' to the file.
2. Once you add the path, to save and exit. Press 'Control' and 'X'. It will give you an option to save changes. Type in "Y" and then press "Enter"
3. After you save the file you have to run:
Code:
$ source ~/.bashrc
That should now set the correct path to your SDK tools. You might have to restart terminal for it to take effect.
-Racks

Enable ADB under Ubuntu/Linux

Alright so it turns out making ADB work for the Kindle Fire under Ubuntu is just a touch more difficult than in Windows.
Thanks to Gbhil (@ AndroidCentral) for the write up on windows it was a great jumping off point to try to figure this out.
Also thanks to the guys on chat.andirc.net (Skourg3 in particular for helping me figure this out the first time).
Let's get down to the nitty gritty yeah?
First you will still need the entry provided by Gbhil, go ahead and set it using the echo command in a terminal.
Code:
echo 0x1949 >> ~/.android/adb_usb.ini
You can confirm that it took by using the cat command
Code:
cat ~/.android/adb_usb.ini
You should get a return of '0x1949' (plus any other rules that you may have added in the past).
Now really that should work but everytime you run adb you will have to either run it as root or using the sudo command. To allow standard user access we have to setup a udev rule.
Code:
sudo gedit /etc/udev/rules.d/51-android.rules
That should open up gedit for you to edit the file 51-android.rules. If this is the first time you have added any udev rules the file will be empty as gedit will have just created it for you. go ahead and add in the following.
Code:
# adb/fastboot protocols for blaze / otter (Amazon Kindle Fire)
SUBSYSTEM=="usb", ATTR{idVendor}=="1949", ATTRS{idProduct}=="0006", MODE="0660", OWNER="root", GROUP="androiddev", SYMLINK+="android%n"
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTRS{idProduct}=="0100", MODE="0660", OWNER="root", GROUP="androiddev", SYMLINK+="android%n"
Save that than add in the user group androiddev.
Code:
sudo addgroup --system androiddev
And add your username to that group.
Code:
sudo adduser <username> androiddev
Replace <username> with your primary username without the <> around it.
After that you will need to logout and log back in for these values to apply. You will probably need to restart the adb server as well.
Change directory to your platform-tools directory and run the following.
Code:
./adb kill-server
./adb start-server
Assuming all went well that should work properly and you can than connect through adb, if for some reason this doesn't work try restarting your computer (though I do not believe this is necessary).
If you don't want to type the "./" before all of your adb and fastboot commands, you need to add their parent directory into your PATH environment variable. For example, (assuming you are using the bash shell) if you have adb and fastboot in your /home/<username>/bin directory, you want to define...
Code:
PATH=~/bin:${PATH}
or
Code:
PATH=${PATH}:~/bin
It just depends on whether you want your own binaries to be used before the system equivalents or after. Most people would probably use the first one to have your own binaries be the preferred ones, but either one should work for adb and fastboot since there are no system binaries by the same names.
If you don't want to have to do this for every shell you open, you can place the definition at the end of your ~/.bashrc file. If you need it for you your login shell, you also need to put it into your ~/.bash_profile file. If you don't want to maintain two parallel files with much of the same information, take a look at this post.
Sblood86 said:
First you will still need the entry provided by Gbhil, go ahead and set it using the echo command in a terminal.
Code:
echo ~/.android/adb_usb.ini 0x1949
Click to expand...
Click to collapse
Thanks for the guide on setting this up for linux. I just wanted to point out a small error in the instructions. The echo command above is incorrect and will not do what you intended. It should be corrected to
Code:
echo 0x1949 >> ~/.android/adb_usb.ini
That will create or append to the file as necessary.
no adb_usb.ini file
kinfauns said:
Thanks for the guide on setting this up for linux. I just wanted to point out a small error in the instructions. The echo command above is incorrect and will not do what you intended. It should be corrected to
Code:
echo 0x1949 >> ~/.android/adb_usb.ini
That will create or append to the file as necessary.
Click to expand...
Click to collapse
Somehow the guide I followed for setting up adb/fastboot on Ubuntu did not create the udb_usb.ini file.
I had to go into android-sdk-linux folder on my home directory and copy the one provided with KFU. Only then I could use the echo command.
freefaling said:
Somehow the guide I followed for setting up adb/fastboot on Ubuntu did not create the udb_usb.ini file.
I had to go into android-sdk-linux folder on my home directory and copy the one provided with KFU. Only then I could use the echo command.
Click to expand...
Click to collapse
This...
Code:
echo 0x1949 >> ~/.android/adb_usb.ini
will definitely create the file if it doesn't exist, but only if the ~/.android/ directory exists (with the correct permissions). It won't make those directories if they don't exist. I'm guessing the .android directory wasn't there when you ran the command.
kinfauns said:
This...
Code:
echo 0x1949 >> ~/.android/adb_usb.ini
will definitely create the file if it doesn't exist, but only if the ~/.android/ directory exists (with the correct permissions). It won't make those directories if they don't exist. I'm guessing the .android directory wasn't there when you ran the command.
Click to expand...
Click to collapse
I read a lot of guides and did what they all said and ended up with a working adb command but my kindle was still not detected. At the end it was this thing that solved the issue.
I dont think I had that "android" folder (i did not unhide the home folder to check but since i setup the android sdk inside "android-sdk-linux" folder, i doubt "android" folder was there).
It's because of these tiny details I was sugesting that you, sir, create a how-to for setting up adb on ubuntu (only if you feel comfortable doing it, that is).
Thanks.
Sent from my Amazon Kindle Fire using XDA
My OS is Mint 12, so same as Ubuntu (except for Unity and a bit of non open-source software) and setting up ADB was also a little bit more difficult than I anticipated. I don't know how other distros are.
The guide that got me most of the way there was this one http://forum.xda-developers.com/showpost.php?p=19446284&postcount=62, and then I hit the same problems as the OP. I had to do a bit of mostly useless searching and reading before I found the entry provided by Gbhil and .adb/ devices made the legend "0123456789ABCDEF device" pop up.
I updated every platform in the sdk while I was at it, oops, must get that 4 or 5 gigs of space in my Home folder back sometime.
A kindle fire specific guide for Ubuntu would be awesome, I hereby second freefaling's nomination of you, Sblood86, as author of said guide, if you're into it, because you seem pretty good at it.
Someone asked me about my Ubuntu setup last night and I thought that I should contribute back to this thread with the same information.
You can add another udev rule to cover fastboot commands on FFF so they don't have to be run as root...
Code:
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTRS{idProduct}=="0100", MODE="0660", OWNER="root", GROUP="androiddev", SYMLINK+="android%n"
If you don't want to type the "./" before all of your adb and fastboot commands, you need to add their parent directory into your PATH environment variable. For example, (assuming you are using the bash shell) if you have adb and fastboot in your /home/<username>/bin directory, you want to define...
Code:
PATH=~/bin:${PATH}
or
Code:
PATH=${PATH}:~/bin
It just depends on whether you want your own binaries to be used before the system equivalents or after. Most people would probably use the first one to have your own binaries be the preferred ones, but either one should work for adb and fastboot since there are no system binaries by the same names.
If you don't want to have to do this for every shell you open, you can place the definition at the end of your ~/.bashrc file. If you need it for you your login shell, you also need to put it into your ~/.bash_profile file. If you don't want to maintain two parallel files with much of the same information, take a look at this link.
http://www.joshstaiger.org/archives/2005/07/bash_profile_vs.html
I follow the recommendation at the end.
Hope that helps someone.
kinfauns said:
Someone asked me about my Ubuntu setup last night and I thought that I should contribute back to this thread with the same information.
You can add another udev rule to cover fastboot commands on FFF so they don't have to be run as root...
Code:
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTRS{idProduct}=="0100", MODE="0660", OWNER="root", GROUP="androiddev", SYMLINK+="android%n"
If you don't want to type the "./" before all of your adb and fastboot commands, you need to add their parent directory into your PATH environment variable. For example, (assuming you are using the bash shell) if you have adb and fastboot in your /home/<username>/bin directory, you want to define...
Code:
PATH=~/bin:${PATH}
or
Code:
PATH=${PATH}:~/bin
It just depends on whether you want your own binaries to be used before the system equivalents or after. Most people would probably use the first one to have your own binaries be the preferred ones, but either one should work for adb and fastboot since there are no system binaries by the same names.
If you don't want to have to do this for every shell you open, you can place the definition at the end of your ~/.bashrc file. If you need it for you your login shell, you also need to put it into your ~/.bash_profile file. If you don't want to maintain two parallel files with much of the same information, take a look at this link.
http://www.joshstaiger.org/archives/2005/07/bash_profile_vs.html
I follow the recommendation at the end.
Hope that helps someone.
Click to expand...
Click to collapse
I spent something like 3 weeks trying to find the rule that worked with fastboot lol... thanks!
Your link is dead btw.
Sblood86 said:
I spent something like 3 weeks trying to find the rule that worked with fastboot lol... thanks!
Your link is dead btw.
Click to expand...
Click to collapse
Well it worked a couple of days ago when I made my post. It's not my fault it took you so long to read it.
All it really said was to add...
Code:
if [ -f ~/.bashrc ]; then
source ~/.bashrc
fi
to the .bash_profile file so that it will source the .bashrc file regardless of the way you got to the shell. Then you only have to maintain the .bashrc file and only put login shell specific info into .bash_profile
I picked up another tidbit yesterday while engrossed in the whole CWMR bricking thread. Ubuntu has a plugdev group that's used for (mounting?) hot-pluggable firewire/USB devices... sounds a lot like the KF. The first user created on the system is automatically put into that group. Since most Ubuntu desktop are going to be single user machines anyway, that's going to be THE user for the majority of these cases. So, creating a androiddev group just for the KF is probably not necessary most of the time. You can just skip the addgroup and adduser to group commands if you just want to adjust your rules to use the plugdev group instead.
First I'm going to apologize for not being good with this stuff. Now I'm going to ask questions that will probably frustrate some readers. If you aren't irritated by them please help me out.
Sblood86 said:
First you will still need the entry provided by Gbhil, go ahead and set it using the echo command in a terminal.
Code:
echo 0x1949 >> ~/.android/adb_usb.ini
Click to expand...
Click to collapse
What is the entry provided by gbhil? Where do I get it? I thought I had adb in here but apparently I don't because when I run the echo command I'm getting "no such file or directory."
Can anyone dumb this down for me just a bit. Add the steps I'm obviously going to need as a newb?
Thanks
hortstu said:
First I'm going to apologize for not being good with this stuff. Now I'm going to ask questions that will probably frustrate some readers. If you aren't irritated by them please help me out.
What is the entry provided by gbhil? Where do I get it? I thought I had adb in here but apparently I don't because when I run the echo command I'm getting "no such file or directory."
Can anyone dumb this down for me just a bit. Add the steps I'm obviously going to need as a newb?
Thanks
Click to expand...
Click to collapse
The most likely cause of that error is you don't have a .android directory in your home directory. You'll need to run the following command before that echo command...
Code:
mkdir ~/.android
That will create a ".android" directory in your home directory (~ is shorthand for your home directory). Then you can create that adb_usb.ini file with the "0x1949" line in it.
Thanks for the help. Stuck again.
After that you will need to logout and log back in for these values to apply. You will probably need to restart the adb server as well.
Change directory to your platform-tools directory and run the following.
Code:
./adb kill-server
./adb start-server
Click to expand...
Click to collapse
logged out and in. what is the name of the "platform-tools" directory?
OK found them and realize they're 2 directories. How to I write to 2 directories at once? I'm going to try one at a time. Looking forward to the elaboration on this.
---------- Post added at 06:16 AM ---------- Previous post was at 06:03 AM ----------
ok followed all the steps except this one.
Code:
PATH=~/bin:${PATH}
Code:
PATH=${PATH}:~/bin
Seems like that's for people that not only know what they're doing in the terminal but spend a lot of time there.
Is there a way to confirm that I've enabled adb before I proceed?
Will I need to follow the latter half of these step everytime I want to enable adb or just the start server command?
Again sorry for newb questions and many thanks for the help.
Tried to push pokey's 9000 fb and it didnt work. I don't think I have adb enabled or something.
hortstu said:
What is the entry provided by gbhil? Where do I get it? I thought I had adb in here but apparently I don't because when I run the echo command I'm getting "no such file or directory."
Can anyone dumb this down for me just a bit. Add the steps I'm obviously going to need as a newb?
Thanks
Click to expand...
Click to collapse
I'm guessing Gbhil is a user who originally posted this information, but not sure...
If you go into a Terminal program, like UXTerm or whatever, you simply type that echo command as shown. It will append the 0x1949 to that .ini file in the hidden folder (.android), so adb can see your device. Of course, this is assuming you have a .android folder. It should be in your Home directory.
When I was playing around with custom ROMs and recovery, my KF stopped registering at 0x1949 at one point. Just in case that is happening to you, plug in your KF to your Linux PC. Go into a terminal program and type lsusb. You will get a list of devices and your KF will be there somewhere. If it is not 0x1949, you will see the correct number. If you get a different number (0x whatever), run the echo command for that number, too. No problem having more than one id num in your adb_usb.ini file.
hortstu said:
Thanks for the help. Stuck again.
Click to expand...
Click to collapse
Don't take this the wrong way, but you might want to take a step back from this and learn a little bit about getting around in Linux before you tackle this project with the Kindle Fire. If this is your primary OS, at least knowing how to navigate around the directory structures, how the PATH variable affects how you run commands, and many other things will be invaluable in your day to day use of the operating system. Linux has come a long way to being user-friendly, but it's still reliant on the users knowing their way around the command line interface... much more than the other two big OS's.
There are countless primers and introductions on the basics of getting around the unix/linux command line. I suggest you search for some and familiarize yourself with them.
In the meantime... the "platform-tools" directory the OP refers to in his post is part of Google's Android SDK distribution...
http://developer.android.com/sdk/index.html
kinfauns said:
Don't take this the wrong way, but you might want to take a step back from this and learn a little bit about getting around in Linux before you tackle this project with the Kindle Fire. If this is your primary OS, at least knowing how to navigate around the directory structures, how the PATH variable affects how you run commands, and many other things will be invaluable in your day to day use of the operating system. Linux has come a long way to being user-friendly, but it's still reliant on the users knowing their way around the command line interface... much more than the other two big OS's.
There are countless primers and introductions on the basics of getting around the unix/linux command line. I suggest you search for some and familiarize yourself with them.
In the meantime... the "platform-tools" directory the OP refers to in his post is part of Google's Android SDK distribution...
http://developer.android.com/sdk/index.html
Click to expand...
Click to collapse
This would be a good start:
vic.gedris.org/Manual-ShellIntro/1.2/ShellIntro.pdf
Sent from my Amazon Kindle Fire using XDA
OK thanks for the help. Realize I should probably know more about this stuff.
Really want to root for the sake of swype and google store. Tough to commit hours to this stuff since I have a family and a job that is non tech.
I have rooted my evo but that was a while back. Seems a little more complicated on the kindle. Thanks again. Not taken the wrong way.
Sblood86 said:
Alright so it turns out making ADB work for the Kindle Fire under Ubuntu is just a touch more difficult than in Windows.
Thanks to Gbhil (@ AndroidCentral) for the write up on windows it was a great jumping off point to try to figure this out.
Also thanks to the guys on chat.andirc.net (Skourg3 in particular for helping me figure this out the first time).
Let's get down to the nitty gritty yeah?
First you will still need the entry provided by Gbhil, go ahead and set it using the echo command in a terminal.
Code:
echo 0x1949 >> ~/.android/adb_usb.ini
You can confirm that it took by using the cat command
Code:
cat ~/.android/adb_usb.ini
You should get a return of '0x1949' (plus any other rules that you may have added in the past).
Now really that should work but everytime you run adb you will have to either run it as root or using the sudo command. To allow standard user access we have to setup a udev rule.
Code:
sudo gedit /etc/udev/rules.d/51-android.rules
That should open up gedit for you to edit the file 51-android.rules. If this is the first time you have added any udev rules the file will be empty as gedit will have just created it for you. go ahead and add in the following.
Code:
# adb/fastboot protocols for blaze / otter (Amazon Kindle Fire)
SUBSYSTEM=="usb", ATTR{idVendor}=="1949", ATTRS{idProduct}=="0006", MODE="0660", OWNER="root", GROUP="androiddev", SYMLINK+="android%n"
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTRS{idProduct}=="0100", MODE="0660", OWNER="root", GROUP="androiddev", SYMLINK+="android%n"
Save that than add in the user group androiddev.
Code:
sudo addgroup --system androiddev
And add your username to that group.
Code:
sudo adduser <username> androiddev
Replace <username> with your primary username without the <> around it.
After that you will need to logout and log back in for these values to apply. You will probably need to restart the adb server as well.
Change directory to your platform-tools directory and run the following.
Code:
./adb kill-server
./adb start-server
Thanks for the post and the guide.
I have a little problem. i.e How do i change the directory to platform-tools directory before i ru the code u gave me. Please dont be mad at me becouse the truth is i am a new user.
Click to expand...
Click to collapse
majexy033 said:
Thanks for the post and the guide.
I have a little problem. i.e How do i change the directory to platform-tools directory before i ru the code u gave me. Please dont be mad at me becouse the truth is i am a new user.
Click to expand...
Click to collapse
As in; from your terminal use the 'cd' command to change directory to where-ever platform-tools is actually installed on your PC.

Categories

Resources