Guide to setting up ADB for Ubuntu/Linux - Thunderbolt Android Development

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.

Related

Set up/run adb on a MAC

Can someone please help me, or point me in the right direction on how to setup and run simple commands through adb on a MAC? Yes, I've used the search, and yes I've searched all over the internet but I still cannot figure it out. Sorry for my stupidity lol
But any help would be greatly appreciated, thank you
Perhaps you could say a few words about what you have tried already and where you are stopped.
I'm assuming you've downloaded and installed the Mac version of the SDK, yes?
On the phone, you need to turn on Settings -> Applications -> Development -> USB debugging (and may as well check "Stay awake", too).
I don't have a OS/X box, but on Linux you need to perform the *first* adb command as root... the first time an "adb" command is run (after a reboot) it starts up an adb-server process, and that needs to be priviliged enough to write to USB. (After that, you can run adb commands as any user, since those commands "talk" to the adb-server on your Mac, which in turn talks to the phone over the USB cable.)
bftb0
Go to developer. android. com/sdk/index.html (take out the spaces - I still can't post links for some reason) and download the Android SDK for Mac. That same page also includes directions on how to get started with installation. You'll be using the Terminal within Mac OS X for ADB commands, so I would recommend getting comfortable with Terminal before jumping into the SDK. Unfortunately, you'll have to look this up because I couldn't even begin to explain everything, nor do I have the time. Hope the rest helps, though.
bftb0 said:
Perhaps you could say a few words about what you have tried already and where you are stopped.
I'm assuming you've downloaded and installed the Mac version of the SDK, yes?
On the phone, you need to turn on Settings -> Applications -> Development -> USB debugging (and may as well check "Stay awake", too).
I don't have a OS/X box, but on Linux you need to perform the *first* adb command as root... the first time an "adb" command is run (after a reboot) it starts up an adb-server process, and that needs to be priviliged enough to write to USB. (After that, you can run adb commands as any user, since those commands "talk" to the adb-server on your Mac, which in turn talks to the phone over the USB cable.)
bftb0
Click to expand...
Click to collapse
Yes I've downloaded and installed the sdk, turned debugging on and now im trying to flash the recovery image onto my phone and that is where im lost at because I don't know exactly what to do
Los-O said:
Yes I've downloaded and installed the sdk, turned debugging on and now im trying to flash the recovery image onto my phone and that is where im lost at because I don't know exactly what to do
Click to expand...
Click to collapse
Note that what you are asking (now) is completely different than what you asked about in your OP - in fact, OS X is immaterial, really, in light of what you just indicated. That suggests that you are in a hurry... if that is the case, I recommend you spend a couple days reading before you rush off and do something you might regret. It is evident from your response that you really have not been reading the threads here with much diligence.
If you are trying to flash a recovery image, that implies that your phone is already rooted; either that what you are trying it isn't going to work - you have to have a rooted phone to begin with before you flash a custom recovery image. At the moment, you can root your Eris only if it has a 1.5 (1.16.605.1 or 1.17.605.1) official Verizon/HTC release on it. This has been described if not a hundred times in the threads here, at least tens of times - you need to read some more.
Nevertheless, if you want to rush into something, here is a step by step set of instructions which was current a couple of days ago. I won't vouch for it being 100% up to date with the latest and greatest images (either ROM or recovery), but it completely describes the process involved.
Stock 1.5 --> Root (2.1) install --> Custom Recovery install -> recovery to custom ROM 0.3. That's what is working at the moment.
bftb0
bftb0 said:
Note that what you are asking (now) is completely different than what you asked about in your OP - in fact, OS X is immaterial, really, in light of what you just indicated. That suggests that you are in a hurry... if that is the case, I recommend you spend a couple days reading before you rush off and do something you might regret. It is evident from your response that you really have not been reading the threads here with much diligence.
If you are trying to flash a recovery image, that implies that your phone is already rooted; either that what you are trying it isn't going to work - you have to have a rooted phone to begin with before you flash a custom recovery image. At the moment, you can root your Eris only if it has a 1.5 (1.16.605.1 or 1.17.605.1) official Verizon/HTC release on it. This has been described if not a hundred times in the threads here, at least tens of times - you need to read some more.
Stock 1.5 --> Root (2.1) install --> Custom Recovery install -> recovery to custom ROM 0.3. That's what is working at the moment.
bftb0
Click to expand...
Click to collapse
I've already rooted my phone
Los-O said:
I've already rooted my phone
Click to expand...
Click to collapse
Well, then you should be on your way; the instructions for what you are trying to attempt are in that link I provided for you in answer to your question (which you purposely redacted when you quoted my post).
I understand that it's your first post, and I should give some leeway for that reason alone, especially since you might have gotten root without ever having used "adb" or "fastboot". (PB00IMG.ZIP method).
On the other hand, I think you can see my point. Please try to avoid wasting other people's time by providing them useful & relevant details of your situation so they can give you good answers. And reading some of the links adjacent to your own post which actually give exactly the details you are asking for might be a good idea, too.
You wanted to know "What are the directions to DisneyWorld?", but instead asked "How do I put gas in my car?" - when you already knew exactly how to do that. But don't take my word for it - reread your first post for yourself - it actually says nothing about what you are trying to do.
I don't know, maybe I got this all wrong, and you still don't have your phone talking to your OS X machine correctly with adb, and that's the source of the trouble. But then, there would be no way to know one way or another - you haven't really said.
bftb0
Download the android sdk and run this automator script.
20 Questions
Los-O:
You said "any help would be greatly appreciated." Maybe that will also include help from the surly folks, such as me.
You said you have "downloaded and installed the SDK". Let's start there. (Also, note that the Android SDK for Mac OS X is only for x86 Apple machines - stop right here if you are using an older PPC based OS X machine).
The Mac SDK is in a .zip file. I presume that means that you unzipped it somewhere on your hard drive, and that you can remember what the folder name/directory name is where you unpacked all those files. (From where I sit, that could mean that you used a GUI based tool, or something from the command line to unpack the files; but I am guessing.)
Here is a flowchart to help you with the steps.
(1) Have you successfully run the "adb" command from within a Terminal window? (Yes: goto (4), No: Continue)
(2) Do you know how to open a Terminal window in OS X? (Yes: goto (4), No: Continue)
(3) Have a look at this information about Terminal on OS X, and then
(4) Start a Terminal window up.
(5) When you type the command (followed by hitting the Enter key):
Code:
adb --help
at the command line, do you get a pageful of information about the adb command, or an error such as "command not found"? (Help Info: goto step (7), No: Continue)
(6) Add to your PATH the location of the SDK tools (including "adb"). For this step, you need to recall where you unpacked your .zip file. On my Linux box, the "adb" command (and others) are located in the folder at
/opt/android/android-sdk_r05-linux_86/tools/
where the part "/opt/android/" is the folder I unzipped them in. For OS X, surely the next folder name in the path is something other than "android-sdk-linux_86" - just poke around in whatever OS X uses as a file browser, and look for the "tools" folder underneath where you unpacked the files. Once you have done that, you should be able to type the full "path" to that (tools) folder in a command.
Let's suppose that the complete path to that "tools" folder looks something like this:
/HardDrive1/foo/bar/android-sdk_r05-mac_86/tools
Then, for example, we would add this to the current terminal (shell) PATH using the following command:
Code:
export PATH=${PATH}:/HardDrive1/foo/bar/android-sdk_r05-mac_86/tools
Obviously, you would change the part "HardDrive...86" so it matches the complete path to the "tools" folder in the SDK which you unpacked onto your machine.
You can inspect the value of PATH for correctness by typing the command
Code:
echo $PATH
Now, go back to step (5) and keep at steps 5-6 until you are able to run the "adb --help" command successfully - that is, get it to print some help information. Don't close this Terminal window after you have the PATH set correctly - we are going to use it shortly.***
(7) Plug the phone into the USB cable and the USB cable into the computer
(8) On the phone, make sure that Settings -> Applications -> Development -> USB debugging is toggled on.
(9) In the terminal window from step (6), type the commands
Code:
adb kill-server
adb devices
You will see one of three things at this point after the "adb devices" command executes:
A. (this is what we want to see)
Code:
* daemon not running. starting it now *
* daemon started successfully *
List of devices attached
HT9ABCDnnnnn device
If you see this, very good: adb has detected your phone and talked to it; continue to step # (10).
B. (not good - you probably need to run adb as the root user)
Code:
* daemon not running. starting it now *
* daemon started successfully *
List of devices attached
???????????? no permissions
In this case, the "adb" command ran, and detected the presence of the phone, but does not have sufficient privileges to write to the USB device; whether or not this happens in a given flavor or Unix (e.g. OS X) depends on what user and group permissions are set on the device, and which "groups" regular users are in. Not having OS X in front of me, I can not predict; but the solution in this case is to run the command as the root user.
It is my impression that OS X has the "sudo" command for this purpose (read here); if that is the case, then you might want to run the commands
Code:
adb kill-server
sudo `which adb` devices
If sudo is not available to you, or not setup correctly, you might have to read this Apple Technical Note, or this one, or this one
C. (some other problem - no USB device is detected)
Code:
* daemon not running. starting it now *
* daemon started successfully *
List of devices attached
Your on your own for this one - consult your local Apple OS X expert!
(10) Now you are ready to communicate with the phone using "adb" commands.
Note that running the "adb" command for the first time after your OS X machine is booted up creates a long lived adb "server" process. (You might see it in a "ps" command listing as "adb fork-server"). That process is what actually communicates with the phone. Any subsequent "adb" command first communicates with that "adb server" on your OS X machine, and then the server communicates with the phone.
Sometimes it goes stale or gets cranky after unplugging the phone too many times. Simply re-start if you want by doing a "adb kill-server" (any user can do this), followed by any adb command, keeping in mind the results from step # (9) above.
OK, whew! The desired goal was to get a recovery image loaded on to the Eris after it had been rooted - it is time to do that, as adb is working now.
See the Instructions by GrdLock here, in the section entitled "II. Installing Amon's recovery image"
bftb0
***The setting of the PATH when you use the Terminal app using the directions given in step # (6) only last for the life of a single Terminal session. If you want to make this change in such a way that it will be already set up every time you open a new Terminal window, you need to do this by editing a file in your home folder - either ".bash_profile" or ".bashrc" . (Different files names are used depending on which "shell" is used). Setting this up is an exercise left up to the interested reader.
Once you have the android sdk unzipped, add the full path to the android tools directory to your path.
I just added the path to my .bash_profile.
For me it looks like this:
export ANDROID-SDK=/Users/Aaron/android-sdk/
export PATH=$ANDROID-SDK/toolsATH
Then I save and close my bash_profile and run the command, from the terminal:
source .bash_profile
This reloads the bash_profile into the shell. Then cd to your android tools directory. Once you get into the tools directory type the command adb. If everything is correct you should see a help menu spit out to the console.
If you need help with your bash_profile a simple google search will help you out.
hey bftb0,
just wanted to chime in and say thanks for that step-by-step. been wrestling with the same issues as the original poster and your walk through got it going. thanks for being patient.
taocow
bftb0,
thank you so so soo much for that last post, I think i've finally figured it out. and also thank you for your patience, i wish i could buy you a coke or something lol
taocow said:
hey bftb0,
just wanted to chime in and say thanks for that step-by-step. been wrestling with the same issues as the original poster and your walk through got it going. thanks for being patient.
taocow
Click to expand...
Click to collapse
los-O said:
bftb0,
thank you so so soo much for that last post, I think i've finally figured it out. and also thank you for your patience, i wish i could buy you a coke or something lol
Click to expand...
Click to collapse
taocow / los-O
Did you need to run the first "adb" command as root with "sudo" ? Let me know - and also mention the version of OS X that you are using; maybe it will help other Mac users if they read this thread. (I got the impression from reading a little bit that different releases of OS X might handle "sudo" a little differently - or have different device permissions for regular users.)
Also, in reviewing this thread, I have to say ... I acted like an a$$. And I should know better, I did IT for a while. If there is one thing I learned about dealing with people and computers, it's that it is extremely easy for a misunderstanding to occur, and especially if you are helping someone out over the phone or via mail/forum. Please accept my apologies.
bftb0
bftb0 said:
taocow / los-O
Did you need to run the first "adb" command as root with "sudo" ? Let me know - and also mention the version of OS X that you are using; maybe it will help other Mac users if they read this thread. (I got the impression from reading a little bit that different releases of OS X might handle "sudo" a little differently - or have different device permissions for regular users.)
Also, in reviewing this thread, I have to say ... I acted like an a$$. And I should know better, I did IT for a while. If there is one thing I learned about dealing with people and computers, it's that it is extremely easy for a misunderstanding to occur, and especially if you are helping someone out over the phone or via mail/forum. Please accept my apologies.
bftb0
Click to expand...
Click to collapse
also now im able to install the recovery (thanks to you) but when i try and push the recovery and flash images i get
"cannot stat 'recovery.img': No such file or directory" same for the flash image
but i put the files in the tools folder like the guide said to do...?
also im on OS X 10.6.2, but no i didnt have to use the "sudo" thing you were talking about, the "adb devices" command worked the first try. and dont worry about it, i understand where you were coming from. but apology accepted, though
Los-O said:
also now im able to install the recovery (thanks to you) but when i try and push the recovery and flash images i get "cannot stat 'recovery.img': No such file or directory" same for the flash image but i put the files in the tools folder like the guide said to do...?
Click to expand...
Click to collapse
That sounds like you are referring to the files by name, but they are not in the current directory where you are running the fastboot command.
The "pwd" command (Print Working Directory) tells you what your current directory is.
The "cd folder-path" command (Change Directory) allows you to change the Terminal/Shell's idea of where the "current directory" is.
The idea behind the PATH variable is that it is a searchable list (separated by ':' colon characters), so that you can be in a given directory with the files you want to manipulate, but the commands you use are in other directories. When you start a command by typing its' name, the Terminal/Shell app walks through that list of folders in PATH (from left to right in order), looking for that program by name.
That means that if you want to run a program ("proggie") that opens a file ("myfile") that is in the current directory you might type the command.
$ proggie myfile
(or $ proggie ./myfile )
... and as long as "proggie" was in one of the folders listed in your PATH, it would run, and find your file "myfile".
But, there is no requirement that you be in the same directory with your files, or the program that you are running (for instance "fastboot"). In those cases, you need to explicitly specify the complete path to your files or programs, so they can be found. For instance:
$ proggie /users/los-o/mystuff/project3/myfile
or, if "proggie" was not in a folder in your PATH, but you knew that it was located in /opt/tools, you could type the command
$ /opt/tools/proggie myfile
If your current directory contains the file "myfile", or
$ /opt/tools/proggie /users/los-o/mystuff/project/myfile.
Same deal with fastboot - you give it the name of the recovery file as the 3rd argument on the "command line"
$ fastboot flash recovery name-of-my-copy-of-the-recovery-file.img
bftb0
*Whew!* Ok thanks again bftb0 for all the help, I think im finally starting to get the hang of this adb stuff
u have a knack for teaching
bftb0 said:
Los-O:
You said "any help would be greatly appreciated." Maybe that will also include help from the surly folks, such as me.
You said you have "downloaded and installed the SDK". Let's start there. (Also, note that the Android SDK for Mac OS X is only for x86 Apple machines - stop right here if you are using an older PPC based OS X machine).
The Mac SDK is in a .zip file. I presume that means that you unzipped it somewhere on your hard drive, and that you can remember what the folder name/directory name is where you unpacked all those files. (From where I sit, that could mean that you used a GUI based tool, or something from the command line to unpack the files; but I am guessing.)
Here is a flowchart to help you with the steps.
(1) Have you successfully run the "adb" command from within a Terminal window? (Yes: goto (4), No: Continue)
(2) Do you know how to open a Terminal window in OS X? (Yes: goto (4), No: Continue)
(3) Have a look at this information about Terminal on OS X, and then
(4) Start a Terminal window up.
(5) When you type the command (followed by hitting the Enter key):
Code:
adb --help
at the command line, do you get a pageful of information about the adb command, or an error such as "command not found"? (Help Info: goto step (7), No: Continue)
(6) Add to your PATH the location of the SDK tools (including "adb"). For this step, you need to recall where you unpacked your .zip file. On my Linux box, the "adb" command (and others) are located in the folder at
/opt/android/android-sdk_r05-linux_86/tools/
where the part "/opt/android/" is the folder I unzipped them in. For OS X, surely the next folder name in the path is something other than "android-sdk-linux_86" - just poke around in whatever OS X uses as a file browser, and look for the "tools" folder underneath where you unpacked the files. Once you have done that, you should be able to type the full "path" to that (tools) folder in a command.
Let's suppose that the complete path to that "tools" folder looks something like this:
/HardDrive1/foo/bar/android-sdk_r05-mac_86/tools
Then, for example, we would add this to the current terminal (shell) PATH using the following command:
Code:
export PATH=${PATH}:/HardDrive1/foo/bar/android-sdk_r05-mac_86/tools
Obviously, you would change the part "HardDrive...86" so it matches the complete path to the "tools" folder in the SDK which you unpacked onto your machine.
You can inspect the value of PATH for correctness by typing the command
Code:
echo $PATH
Now, go back to step (5) and keep at steps 5-6 until you are able to run the "adb --help" command successfully - that is, get it to print some help information. Don't close this Terminal window after you have the PATH set correctly - we are going to use it shortly.***
(7) Plug the phone into the USB cable and the USB cable into the computer
(8) On the phone, make sure that Settings -> Applications -> Development -> USB debugging is toggled on.
(9) In the terminal window from step (6), type the commands
Code:
adb kill-server
adb devices
You will see one of three things at this point after the "adb devices" command executes:
A. (this is what we want to see)
Code:
* daemon not running. starting it now *
* daemon started successfully *
List of devices attached
HT9ABCDnnnnn device
If you see this, very good: adb has detected your phone and talked to it; continue to step # (10).
B. (not good - you probably need to run adb as the root user)
Code:
* daemon not running. starting it now *
* daemon started successfully *
List of devices attached
???????????? no permissions
In this case, the "adb" command ran, and detected the presence of the phone, but does not have sufficient privileges to write to the USB device; whether or not this happens in a given flavor or Unix (e.g. OS X) depends on what user and group permissions are set on the device, and which "groups" regular users are in. Not having OS X in front of me, I can not predict; but the solution in this case is to run the command as the root user.
It is my impression that OS X has the "sudo" command for this purpose (read here); if that is the case, then you might want to run the commands
Code:
adb kill-server
sudo `which adb` devices
If sudo is not available to you, or not setup correctly, you might have to read this Apple Technical Note, or this one, or this one
C. (some other problem - no USB device is detected)
Code:
* daemon not running. starting it now *
* daemon started successfully *
List of devices attached
Your on your own for this one - consult your local Apple OS X expert!
(10) Now you are ready to communicate with the phone using "adb" commands.
Note that running the "adb" command for the first time after your OS X machine is booted up creates a long lived adb "server" process. (You might see it in a "ps" command listing as "adb fork-server"). That process is what actually communicates with the phone. Any subsequent "adb" command first communicates with that "adb server" on your OS X machine, and then the server communicates with the phone.
Sometimes it goes stale or gets cranky after unplugging the phone too many times. Simply re-start if you want by doing a "adb kill-server" (any user can do this), followed by any adb command, keeping in mind the results from step # (9) above.
OK, whew! The desired goal was to get a recovery image loaded on to the Eris after it had been rooted - it is time to do that, as adb is working now.
See the Instructions by GrdLock here, in the section entitled "II. Installing Amon's recovery image"
bftb0
***The setting of the PATH when you use the Terminal app using the directions given in step # (6) only last for the life of a single Terminal session. If you want to make this change in such a way that it will be already set up every time you open a new Terminal window, you need to do this by editing a file in your home folder - either ".bash_profile" or ".bashrc" . (Different files names are used depending on which "shell" is used). Setting this up is an exercise left up to the interested reader.
Click to expand...
Click to collapse
excellent post...very helpful
Los-O said:
Can someone please help me, or point me in the right direction on how to setup and run simple commands through adb on a MAC? Yes, I've used the search, and yes I've searched all over the internet but I still cannot figure it out. Sorry for my stupidity lol
But any help would be greatly appreciated, thank you
Click to expand...
Click to collapse
I do everything on a Mac, so I would be the guy to ask. How far did you get? Have you unzipped the sdk to a folder?
Basically the difference between mac and others is that when others do a command like adb, we have to do ./adb This is true for other commands too. It's easy once you get used to it.
bftb0,
Thanks so much! Step 6 solved my problem
Thank you!!
bftb0 said:
Los-O:
You said "any help would be greatly appreciated." Maybe that will also include help from the surly folks, such as me.
You said you have "downloaded and installed the SDK". Let's start there. (Also, note that the Android SDK for Mac OS X is only for x86 Apple machines - stop right here if you are using an older PPC based OS X machine).
The Mac SDK is in a .zip file. I presume that means that you unzipped it somewhere on your hard drive, and that you can remember what the folder name/directory name is where you unpacked all those files. (From where I sit, that could mean that you used a GUI based tool, or something from the command line to unpack the files; but I am guessing.)
Here is a flowchart to help you with the steps.
(1) Have you successfully run the "adb" command from within a Terminal window? (Yes: goto (4), No: Continue)
(2) Do you know how to open a Terminal window in OS X? (Yes: goto (4), No: Continue)
(3) Have a look at this information about Terminal on OS X, and then
(4) Start a Terminal window up.
(5) When you type the command (followed by hitting the Enter key):
Code:
adb --help
at the command line, do you get a pageful of information about the adb command, or an error such as "command not found"? (Help Info: goto step (7), No: Continue)
(6) Add to your PATH the location of the SDK tools (including "adb"). For this step, you need to recall where you unpacked your .zip file. On my Linux box, the "adb" command (and others) are located in the folder at
/opt/android/android-sdk_r05-linux_86/tools/
where the part "/opt/android/" is the folder I unzipped them in. For OS X, surely the next folder name in the path is something other than "android-sdk-linux_86" - just poke around in whatever OS X uses as a file browser, and look for the "tools" folder underneath where you unpacked the files. Once you have done that, you should be able to type the full "path" to that (tools) folder in a command.
Let's suppose that the complete path to that "tools" folder looks something like this:
/HardDrive1/foo/bar/android-sdk_r05-mac_86/tools
Then, for example, we would add this to the current terminal (shell) PATH using the following command:
Code:
export PATH=${PATH}:/HardDrive1/foo/bar/android-sdk_r05-mac_86/tools
Obviously, you would change the part "HardDrive...86" so it matches the complete path to the "tools" folder in the SDK which you unpacked onto your machine.
You can inspect the value of PATH for correctness by typing the command
Code:
echo $PATH
Now, go back to step (5) and keep at steps 5-6 until you are able to run the "adb --help" command successfully - that is, get it to print some help information. Don't close this Terminal window after you have the PATH set correctly - we are going to use it shortly.***
(7) Plug the phone into the USB cable and the USB cable into the computer
(8) On the phone, make sure that Settings -> Applications -> Development -> USB debugging is toggled on.
(9) In the terminal window from step (6), type the commands
Code:
adb kill-server
adb devices
You will see one of three things at this point after the "adb devices" command executes:
A. (this is what we want to see)
Code:
* daemon not running. starting it now *
* daemon started successfully *
List of devices attached
HT9ABCDnnnnn device
If you see this, very good: adb has detected your phone and talked to it; continue to step # (10).
B. (not good - you probably need to run adb as the root user)
Code:
* daemon not running. starting it now *
* daemon started successfully *
List of devices attached
???????????? no permissions
In this case, the "adb" command ran, and detected the presence of the phone, but does not have sufficient privileges to write to the USB device; whether or not this happens in a given flavor or Unix (e.g. OS X) depends on what user and group permissions are set on the device, and which "groups" regular users are in. Not having OS X in front of me, I can not predict; but the solution in this case is to run the command as the root user.
It is my impression that OS X has the "sudo" command for this purpose (read here); if that is the case, then you might want to run the commands
Code:
adb kill-server
sudo `which adb` devices
If sudo is not available to you, or not setup correctly, you might have to read this Apple Technical Note, or this one, or this one
C. (some other problem - no USB device is detected)
Code:
* daemon not running. starting it now *
* daemon started successfully *
List of devices attached
Your on your own for this one - consult your local Apple OS X expert!
(10) Now you are ready to communicate with the phone using "adb" commands.
Note that running the "adb" command for the first time after your OS X machine is booted up creates a long lived adb "server" process. (You might see it in a "ps" command listing as "adb fork-server"). That process is what actually communicates with the phone. Any subsequent "adb" command first communicates with that "adb server" on your OS X machine, and then the server communicates with the phone.
Sometimes it goes stale or gets cranky after unplugging the phone too many times. Simply re-start if you want by doing a "adb kill-server" (any user can do this), followed by any adb command, keeping in mind the results from step # (9) above.
OK, whew! The desired goal was to get a recovery image loaded on to the Eris after it had been rooted - it is time to do that, as adb is working now.
See the Instructions by GrdLock here, in the section entitled "II. Installing Amon's recovery image"
bftb0
***The setting of the PATH when you use the Terminal app using the directions given in step # (6) only last for the life of a single Terminal session. If you want to make this change in such a way that it will be already set up every time you open a new Terminal window, you need to do this by editing a file in your home folder - either ".bash_profile" or ".bashrc" . (Different files names are used depending on which "shell" is used). Setting this up is an exercise left up to the interested reader.
Click to expand...
Click to collapse
Wow what a straightforward guide to helping me get this set up!! A million thanks! I don't even have an Eris, but what model of the phone you have is irrevelant to this guide...
Thanks again!!

[GUIDE] Linux Ubuntu: Unlocking Bootloader / Rooting Nexus S

One thing I've noticed is there isn't a lot of documentation for getting set up and unlocking your bootloader on a Linux OS. Setting up your machine to get adb and fastboot to recognize your device takes a tiny bit of extra work on a Linux operating system, but what exactly needs to be done may not be clear to everyone. Whether it's because you're new to the Android SDK/adb, somewhat new to Linux, or can't simply can't seem to find the Vendor Code for the Nexus S. (For those who are looking specifically for this, it's '18d1', and I assume will be the same on all Nexus devices to come; If this means nothing to you right now, read on.)
Disclaimer: I take no responsibility if something goes wrong (if it does, it should be fixable though), Unlocking your bootloader voids your warranty (but you can lock it back), Unlocking the bootloader will wipe your entire phone, including USB Storage; so make a copy of all those family photos and other files you may have put onto the USB storage if you want to keep them.
For the sake of sanity, this guide assumes you are using Ubuntu. If you're using something else (or different applications), there are terminal commands offered, and you probably have an idea on how to adapt the given instructions to your Linux OS.
Preparation: Installing the Android SDK, ADB, Fastboot & Setting Up Your Nexus S to be Recognized
1. Download the Android SDK for Linux: http://dl.google.com/android/android-sdk_r08-linux_86.tgz
2. Save it in a folder of your choice. I chose to keep it in my Downloads folder, myself. If you'd like, you can rename it to the simpler name of 'AndroidSDK.tgz'. The rest of the guide will assume that you did, because I'm lazy, and it makes things simpler; it will also assume you saved it in Downloads. If you feel that you have the intuition to rename and edit the path names based on your own choices, then fine; but if you're utterly lost here, just stick with what I'm doing; download to 'Downloads', rename to 'AndroidSDK.tgz'.
3. Now that you have it, navigate to the folder you downloaded it to, right-click, and click 'Extract' to unzip it. If for some reason you cannot do this, open up a terminal and try this command:
Code:
tar zxvf /home/<your-user-name>/Downloads/AndroidSDK.tgz
You may have to adjust the command if you didn't save it under Downloads or didn't rename the file to AndroidSDK.tgz.
4. Now, we'll install adb and some other software packages by starting up the Android SDK and AVD Manager. Start it either by:
- Navigating to your AndroidSDK folder, going to the 'tools' folder and double-clicking the file called 'android'; if a popup opens asking you what you want to do with it click 'Run'.
- Using this command:
Code:
/home/<your-user-name>/Downloads/AndroidSDK/tools/android
5. In Android SDK and AVD Manager, click on "Available packages". Check the box next to "Android SDK Tools, revision 8" and "Android SDK Platform-tools", and click on "Install Selected" then "Install". When prompted click "Yes" to restart ADB.
6.You should now have a folder in /home/<your-user-name>/Downloads/AndroidSDK/ called "platform-tools".
7. Download fastboot here: http://developer.htc.com/adp.html
- Save it to the aforementioned platform-tools folder.
- Now, navigate to the file, right click it, click 'Properties', go to the 'Permissions' Tab and check 'Allow executing file as program'. Alternatively, run this command:
Code:
chmod +x /home/<your-user-name>/Downloads/AndroidSDK/platform-tools/fastboot
8. Now to set things up so adb and fastboot recognize your Nexus.
- Type this command into a terminal:
Code:
gksudo gedit /etc/udev/rules.d/51-android.rules
- Paste this into the blank file:
Code:
SUBSYSTEM=="usb", SYSFS{idVendor}=="18d1", MODE="0666"
- Click save and close.
- Then, type the following terminal command:
Code:
sudo restart udev
9. Almost done with preparations! Run this command:
Code:
gedit .bashrc
And add this line to the top of the file:
Code:
#AndroidDev PATH
export PATH=${PATH}:/home/<your-user-name>/Downloads/AndroidSDK/tools:/home/<your-user-name>/Downloads/AndroidSDK/platform-tools
Then save the file and close.
10. Download this file and save it to /home/<your-user-name>/Downloads/AndroidSDK/platform-tools: http://www.mediafire.com/?4pe5y906zr67nfh
10.We're ready to go!
Unlocking the Bootloader on your Nexus S and Rooting
Once again, unlocking your bootloader wipes everything on your device, including USB storage. Make a backup of any files you want to keep.
1. On your Nexus S, go to Menu>Settings>Applications. Select "Development" and check the box next to "USB debugging"
2. Power off the phone, and then hold down the Volume Up button and the Power button simultaneously to get into Bootloader/Fastboot mode. Connect your Nexus to the computer via USB.
3. Run this command to unlock your bootloader: (Once again WIPES EVERYTHING!)
Code:
fastboot oem unlock
Hit Enter and on your phone you will be prompted to confirm the action. (Use Volume +/- buttons to choose, power button to confirm choice) Confirm. At this point you will have an unlocked bootloader.
4. Copy/paste the following into the Terminal window:
Code:
fastboot flash recovery /home/<your-user-name>/AndroidSDK/platform-tools/recovery-clockwork-herring.img
5. Use the Volume +/- buttons to choose the Recovery option, then press the power button.
6. In Recovery, go to 'mounts and storage' and choose 'mount USB storage'.
7. Go to this page: http://forum.xda-developers.com/showthread.php?t=682828
About 1/5 of the way down on that page, find the link for "su-2.3.6.1-ef-signed.zip", which is the link for the Froyo version of Superuser. Control-click (right click) on that link and choose "Download Link As..." Save that file to your desktop and then copy it to the main directory of your mounted phone.
8. Click 'Unmount'. Go back to 'mounts and storage' and choose 'mount /system'. Then Go Back and choose 'install zip from sdcard'>'choose zip from sdcard'>su-2.3.6.1-ef-signed.zip
9. When it's finshed installing, reboot. You are now rooted.
Special Thanks
Amin Sabet; I used your Mac guide as a reference and copy/pasted some things for convenience.
Koush; For first posting the unlocking information, developing ClockworkMod Recovery, and ROM Manager. You should probably hook him up with a donation. https://www.paypal.com/us/cgi-bin/w...63663d3faee8d9384d85353843a619606282818e091d0
Michael.B.; for suggesting adding the platform-tools folder to the .bashrc file.
Linus Torvalds; Without which we'd have neither Android nor Ubuntu.
Feel free to leave your comments on the guide below.
Good guide for beginners, I would throw in how to update their path so they can just type adb or fastboot
On Linux, edit your ~/.bash_profile or ~/.bashrc file. Look for a line that sets the PATH environment variable and add the full path to the tools/ and platform-tools directories to it. If you don't see a line setting the path, you can add one:
export PATH=${PATH}:/home/<your-user-name>/Downloads/AndroidSDK/tools:/home/<your-user-name>/Downloads/AndroidSDK/platform-tools
Click to expand...
Click to collapse
Be sure to update your username above.
Thanks a lot man, great guide. I didn't get my NS yet but this is gonna be very useful soon
ps: someone please stick this
Michael.B. said:
Good guide for beginners, I would throw in how to update their path so they can just type adb or fastboot
Be sure to update your username above.
Click to expand...
Click to collapse
Thanks for the tip. I added your tip and instructions for marking fastboot as executable.
Stuck due to the thread's usefulness
I forgot to ask: will this work for 64 bit systems?
nicholasbgr said:
I forgot to ask: will this work for 64 bit systems?
Click to expand...
Click to collapse
It should work just fine.
Thanks, got me rooted nice and quickly.
BlackOtaku said:
It should work just fine.
Click to expand...
Click to collapse
Yes but don't forget to install 32 libs.
Thanks for guide
Useful !
I'm waiting for cyanogen ROM so i'll able to install
Cheers
To confirm, yes it works on 64bit. I am running that
Thanks for the confirmation, guys
Good stuff, much appreciated.
I'm working on a simple shell script that should automate some of the more menial tasks while holding the user's hand through the process. I should have it up later today.
UPDATE: It's up! Link on the first page.
Sent from my Nexus S using XDA App
question:
If I use
Code:
fastboot boot recovery.img
instead of
Code:
fastboot flash recovery recovery.img
will i get OTA updates?
confiq said:
question:
If I use
Code:
fastboot boot recovery.img
instead of
Code:
fastboot flash recovery recovery.img
will i get OTA updates?
Click to expand...
Click to collapse
Or, I don't get OTA until i change OS with zip file (ex: su app) ?
confiq said:
Or, I don't get OTA until i change OS with zip file (ex: su app) ?
Click to expand...
Click to collapse
You shouldn't flash the recovery in the boot partition, I think that will cause problems with the phone period. :S
If you flash a custom boot.img (which this guide doesn't cover, though the script will flash Superboot) or kernel like Paul's Superboot, Supercurio's Voodoo Kernel, or Koush's insecure boot.img, OTA updates will fail to install. OTA updates will also reflash your recovery back to stock. One of the devs around here will probably start modifying them so they don't check the boot.img or reflash the recovery though.
Thanks for this! Worked perfectly
Hi all,
I have a strange problem. I can install ClockworkMod recovery but, when I reboot the phone, I don't have superuser installed and su doesn't work. If I reboot the phone, I have to install the recovery every time. It seems it isn't permanent.
Thanks
Matroska
matroska said:
Hi all,
I have a strange problem. I can install ClockworkMod recovery but, when I reboot the phone, I don't have superuser installed and su doesn't work. If I reboot the phone, I have to install the recovery every time. It seems it isn't permanent.
Thanks
Matroska
Click to expand...
Click to collapse
To fix the problem, before selecting zip file, you have to select mount /system. Then go to apply update.zip and proceed as usual.
Thanks
ok im stock
with this part fastboot oem unlock ware i put this code in my terminal of my pc ,,i put the cell in fasboot , i intall everiting if i put that code in my terminal
bash: /home/toshiba/.bashrc: line 2: syntax error near unexpected token `('
bash: /home/toshiba/.bashrc: line 2: `export PATH=${PATH}:/home/<your-user-name>/Downloads/AndroidSDK/tools:/home/<your-user-name>/Downloads/AndroidSDK/platform-tools# ~/.bashrc: executed by bash(1) for non-login shells.'
[email protected]:~$ fastboot oem unlock
fastboot: command not found
[email protected]:~$
what can i do or im doing wrong

(how to) adb for noobs, by a noob

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

Simplifying ADB installation

There's a lot of angst around getting ADB to work, particularly over USB, and it leaves a lot of folks frustrated. Some of the stuff I have seen is outdated for one and USB itself is problematic.
But, if you use Manual Nooter (for 1.2), GabrialDestruir baked in ADB Wireless, so it should be super easy to go from zero to ADB connected in nothing flat now. Here's some quick instructions that won't change.
1. Make sure you have Java installed (I'm sure you do). You *do not* need the JDK to do this!
2. Go to the android site and grab the Android SDK zip file (the windows executable *requires* the JDK so grab the zip file)
3. Unzip it to the root of your drive (it has the 'android-sdk-windows' folder in it)
4. Now go in the android-sdk-windows folder and launch sdk manager
5. Cancel out of the window that pops up with a list of a bunch of stuff
6. Click on available packages
7. Now expand 'Android Repository' and check 'Android SDK Platform-tools'
8. Now click 'install selected' and then 'install' on the next screen
9. After it finishes it will ask if you want to restart ADB, go ahead and select yes
10. Now do the standard path edit and add these two paths to your environment path: c:\android-sdk-windows\platform-tools and c:\android-sdk-windows\tools
11. On your nook, start up adb wireless and note the command it tells you
12. open a command window on your pc and type the command adb wireless gave you
Voila! You are using ADB to access your Nook Color! No special drivers or ini files, etc. I know there is an easy ADB USB thread, but I actually eventually had issues with that and went back to grab the original "official" kit to get things working. I just did the above on a fresh machine with nothing else and it worked flawlessly.
Anyway, I figured this might help a few people out there.

Guide: Simple sideload OTA update to KitKat

After seeing so many people get hung up on complicated guides to manually update to 4.4, I thought I'd write the simple guide during my next bout of insomnia. So, no sleep tonight for me means a new guide for you. It's very simple, with only four steps: 1) download the OTA update, 2) reboot into recovery, 3) prepare to sideload, and 4) sideload.
Preamble:
I use a Mac. My Nexus 7 2013 is WiFi only (flo). This guide is written from that perspective.
It's just as easy to do this from any computer you'd like (e.g. Linux, Mac, or Windows *see end of post*). The commands are exactly the same. The only difference is the way you install the android SDK (+/- USB drivers *see end of post*) and open a terminal or command prompt on your machine of choice. Learning this is simple and necessary for developing, hacking, rooting, unbricking on ANY ANDROID DEVICE.
Three things you need to have set up before starting
Other than being stock, the other items on this list are going to come in handy if you want to fully realize the potential of your nexus device, so take a minute and set it up if you haven't already.
1. NEXUS 7 2013, build number JSS15R, with STOCK ROM. The guide is written from the perspective of STOCK RECOVERY, but it's been done from TWRP (I swear to god). Yes, you can be any combination of rooted, unrooted, locked, unlocked, but if you're rooted, you should probably revert any changes you've made to system files before starting.
2. Up to date android platform tools from the SDK installed on your Mac:
http://developer.android.com/sdk/index.html
Note: the only platform tool you need to sideload is adb.
3. USB debugging enabled on your Nexus 7:
Settings, About tablet, tap build number a bunch of times to enable developer options, back out to settings, developer options, check USB debugging
THE ACTUAL GUIDE:.
STEP 1 (DOWNLOAD):
This is the second hardest step in this guide. You have to download the OTA, not the factory image, so, on your Mac, download this file: http://android.clients.google.com/p....signed-razor-KRT16O-from-JSS15R.3a3951e8.zip
STEP 2 (REBOOT INTO RECOVERY):
a. Hold the Power and Volume down buttons at the same time to enter fastboot mode.
b. Find and select "Recovery Mode" using the volume and power buttons
STEP 3 (PREPARE TO SIDELOAD):
a. Connect your N7 to your Mac with a USB cord
b. While in recovery mode, hold the power button and tap the volume up button (this is the hardest part of the guide).
c. Select "apply update from ADB"
STEP 4 (SIDELOAD):
a. Open a terminal window on your Mac and type "adb devices". Terminal will identify your nexus 7.
b. Type "adb sideload ". Don't forget the space.
c. Open a finder window and find the file you downloaded in step 1. Drag and drop it to your terminal window. Press enter.
VICTORY!
* Windows 8.1 x64 drivers, thanks to sahilcc7: https://plus.google.com/103583939320326217147/posts/BQ5iYJEaaEH
Command not found
xdhall said:
After seeing so many people get hung up on complicated guides to manually update to 4.4, I thought I'd write the simple guide during my next bout of insomnia. So, no sleep tonight for me means a new guide for you. It's very simple, with only four steps: 1) download the OTA update, 2) reboot into recovery, 3) prepare to sideload, and 4) sideload.
Preamble:
I use a Mac. My Nexus 7 2013 is WiFi only (flo). This guide is written from that perspective.
It's just as easy to do this from any computer you'd like (e.g. Linux, Mac, or Windows). The commands are exactly the same. The only difference is the way you install the android SDK (+/- USB drivers) and open a terminal or command prompt on your machine of choice. Learning this is simple and necessary for ANY developing, hacking, rooting, unbricking on ANY ANDROID DEVICE.
Three things you need to have set up before starting
Other than being stock, the other items on this list are going to come in handy if you want to fully realize the potential of your nexus device, so take a minute and set it up if you haven't already.
1. NEXUS 7 2013, build number JSS15R, with STOCK ROM. The guide is written from the perspective of STOCK RECOVERY, but it's been done from TWRP (I swear to god). Yes, you can be any combination of rooted, unrooted, locked, unlocked, but if you're rooted, you should probably revert any changes you've made to system files before starting.
2. Up to date android SDK installed on your Mac:
Follow instructions here: http://developer.android.com/sdk/index.html
3. USB debugging enabled on your Nexus 7:
Settings, About tablet, tap build number a bunch of times to enable developer options, back out to settings, developer options, check USB debugging
THE ACTUAL GUIDE:.
STEP 1 (DOWNLOAD):
This is the second hardest step in this guide. You have to download the OTA, not the factory image, so, on your Mac, download this file: http://android.clients.google.com/packages/data/ota/google_razor/3a3951e8243c82bc01a620ab858f4454c8ebd65c.signed-razor-KRT16O-from-JSS15R.3a3951e8.zip
STEP 2 (REBOOT INTO RECOVERY):
a. Hold the Power and Volume down buttons at the same time to enter fastboot mode.
b. Find and select "Recovery Mode" using the volume and power buttons
STEP 3 (PREPARE TO SIDELOAD):
a. Connect your N7 to your Mac with a USB cord
b. While in recovery mode, hold the power button and volume up button down (this is the hardest part of the guide).
c. Select "apply update from ADB"
STEP 4 (SIDELOAD):
a. In the terminal window on your Mac, type "adb sideload "
b. Open a finder window and find the file you downloaded in step 1. Drag and drop it to your terminal window. Press enter.
VICTORY!
Click to expand...
Click to collapse
I downloaded the SDK file for Mac and set up the Eclipse app. However I get a "Command Not Found" when I try to type into Terminal? I appreciate seeing instructions for a Mac; thank you.
Make sure you're connected with a microUSB. Type "adb devices" in terminal to verify that you're hooked up.
Sent from my Nexus 7 using Tapatalk 4
Also, be sure there's a space between the word sideload and the file name that shows up after you've dropped the zip onto the terminal window.
Sent from my Nexus 7 using Tapatalk 4
That's another problem I'm having my files automatically unzip. I'm looking to find out how to stop that from happening.
---------- Post added at 02:21 AM ---------- Previous post was at 02:12 AM ----------
Found the reason files unzipping and fixed. FIle is downloading again and I will try your suggestions. Thanks!
---------- Post added at 02:24 AM ---------- Previous post was at 02:21 AM ----------
Found the reason files unzipping and fixed. FIle is downloading again and I will try your suggestions. Thanks!
You can use Mini ADB and Fastboot Installer from xda too, just 2mb. I used it.
Sent from my Nexus 7 (2013)
bobng said:
That's another problem I'm having my files automatically unzip. I'm looking to find out how to stop that from happening.
---------- Post added at 02:21 AM ---------- Previous post was at 02:12 AM ----------
Found the reason files unzipping and fixed. FIle is downloading again and I will try your suggestions. Thanks!
Click to expand...
Click to collapse
In theory the first time you execute an adb command during a session in terminal you'll get the following echo:
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
Then it will execute your initial command.
I've added an adb devices command to the guide so if anyone reports a problem, they'll already know if they've been able to communicate across the microUSB cord.
Sent from my Nexus 7 using Tapatalk 4
I downloaded everything again and even though I deleted a program that aoto unzipped files the both unzipped. I connected the tablet and tried "adb Devices" and still returned -bash: adb: command not found
I've been at this for several hours. Google might even beat me with their installation at this rate.
bobng said:
I downloaded everything again and even though I deleted a program that aoto unzipped files the both unzipped. I connected the tablet and tried "adb Devices" and still returned -bash: adb: command not found
I've been at this for several hours. Google might even beat me with their installation at this rate.
Click to expand...
Click to collapse
I believe you're missing a step or so when installing sdk. You likely need to edit your profile. I couldn't readily find it on the Google site, but here's an independent guide: http://m.androidauthority.com/how-to-install-android-sdk-software-development-kit-21137/. I expect the part your missing begins with step 4 under "Installing on Mac OS X; Installing the Android SDK"
Sent from my Nexus 7 using Tapatalk 4
xdhall said:
I believe you're missing a step or so when installing sdk. You likely need to edit your profile. I couldn't readily find it on the Google site, but here's an independent guide: http://m.androidauthority.com/how-to-install-android-sdk-software-development-kit-21137/. I expect the part your missing begins with step 4 under "Installing on Mac OS X; Installing the Android SDK"
Sent from my Nexus 7 using Tapatalk 4
Click to expand...
Click to collapse
Thanks, I rarely use Terminal so will have to read up some more to get this working.
bobng said:
Thanks, I rarely use Terminal so will have to read up some more to get this working.
Click to expand...
Click to collapse
I should be able to walk you through it tomorrow.
Sent from my Nexus 7 using Tapatalk 4
Thanks, guide worked great. Just the part where you select adb sideload - maybe state that you should hold power and tap vol up to select it. I got stuck there.
And for those with Windows 8.1 x64: https://plus.google.com/103583939320326217147/posts/BQ5iYJEaaEH
Those drivers worked.
bobng said:
Thanks, I rarely use Terminal so will have to read up some more to get this working.
Click to expand...
Click to collapse
Basically you need to tell terminal where to find the bits of the various SDK programs by editing your bash profile. This is how terminal knows what you mean when you ask it to execute an adb or fastboot command. Let me simplify from the androidauthority guide. It takes three lines of code.
Open up a terminal window and execute the following:
Step 1: This step lets you edit the profile that tells terminal where to find executable binary files
Type and press enter:
Code:
vi ~/.bash_profile
Step 2: The step actually edits said profile
Type but don't press enter:
Code:
export PATH=$PATH:
Open a Finder window and find the folder "platform-tools" in the sdk folder (make sure you've put your sdk folder wherever you want it to live--if you move it later, terminal won't be able to find it). Drag and drop the folder on the terminal window. This time you DON'T want a space between the typed code and the file path.
Now press enter.
Step 3: This step saves your changes
Type and press enter:
Code:
source $HOME/.bash_profile
From now on, whenever you open a terminal window, you'll be able to use your sdk tools.
sahilcc7 said:
Thanks, guide worked great. Just the part where you select adb sideload - maybe state that you should hold power and tap vol up to select it. I got stuck there.
And for those with Windows 8.1 x64: https://plus.google.com/103583939320326217147/posts/BQ5iYJEaaEH
Those drivers worked.
Click to expand...
Click to collapse
Updated OP with the recommended tweak to the language and the link to the drivers. Thanks!
Sent from my Nexus 7 using Tapatalk 4
This worked for me without issue. I only had to install the proper drivers and after that it went smooth.
I tried your suggestion and as you can see Step 1 wasn't successful but I tried the rest the result is as follows:
Last login: Mon Nov 18 21:56:38 on ttys000
Bobs-Retina:~ bobng$ vi -/.bash_profile
VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Aug 24 2013 18:58:47)
Unknown option argument: "-/.bash_profile"
More info with: "vim -h"
Bobs-Retina:~ bobng$ vi-/.bash_profile
-bash: vi-/.bash_profile: No such file or directory
Bobs-Retina:~ bobng$ vim -h
VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Aug 24 2013 18:58:47)
usage: vim [arguments] [file ..] edit specified file(s)
or: vim [arguments] - read text from stdin
or: vim [arguments] -t tag edit file where tag is defined
or: vim [arguments] -q [errorfile] edit file with first error
Arguments:
-- Only file names after this
-v Vi mode (like "vi")
-e Ex mode (like "ex")
-s Silent (batch) mode (only for "ex")
-d Diff mode (like "vimdiff")
-y Easy mode (like "evim", modeless)
-R Readonly mode (like "view")
-Z Restricted mode (like "rvim")
-m Modifications (writing files) not allowed
-M Modifications in text not allowed
-b Binary mode
-l Lisp mode
-C Compatible with Vi: 'compatible'
-N Not fully Vi compatible: 'nocompatible'
-V[N][fname] Be verbose [level N] [log messages to fname]
-D Debugging mode
-n No swap file, use memory only
-r List swap files and exit
-r (with file name) Recover crashed session
-L Same as -r
-T <terminal> Set terminal type to <terminal>
-u <vimrc> Use <vimrc> instead of any .vimrc
--noplugin Don't load plugin scripts
-p[N] Open N tab pages (default: one for each file)
-o[N] Open N windows (default: one for each file)
-O[N] Like -o but split vertically
+ Start at end of file
+<lnum> Start at line <lnum>
--cmd <command> Execute <command> before loading any vimrc file
-c <command> Execute <command> after loading the first file
-S <session> Source file <session> after loading the first file
-s <scriptin> Read Normal mode commands from file <scriptin>
-w <scriptout> Append all typed commands to file <scriptout>
-W <scriptout> Write all typed commands to file <scriptout>
-x Edit encrypted files
--startuptime <file> Write startup timing messages to <file>
-i <viminfo> Use <viminfo> instead of .viminfo
-h or --help Print Help (this message) and exit
--version Print version information and exit
Bobs-Retina:~ bobng$ -v -/.bash_profile
-bash: -v: command not found
Bobs-Retina:~ bobng$ export PATH=$PATH:/Users/bobng/Downloads/adt-bundle-mac-x86_64-20131030/sdk/platform-tools
Bobs-Retina:~ bobng$ source $HOME/.bash_profile
-bash: /Users/bobng/.bash_profile: No such file or directory
Bobs-Retina:~ bobng$
I just upgraded to Mavericks, not sure if that makes a difference?
bobng said:
I tried your suggestion and as you can see Step 1 wasn't successful but I tried the rest the result is as follows:
Last login: Mon Nov 18 21:56:38 on ttys000
Bobs-Retina:~ bobng$ vi -/.bash_profile
VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Aug 24 2013 18:58:47)
Unknown option argument: "-/.bash_profile"
More info with: "vim -h"
Bobs-Retina:~ bobng$ vi-/.bash_profile
-bash: vi-/.bash_profile: No such file or directory
Bobs-Retina:~ bobng$ vim -h
I just upgraded to Mavericks, not sure if that makes a difference?
Click to expand...
Click to collapse
You're using a hyphen where you need a tilda.
You typed: vi -/.bash_profile
It should be: vi ~/.bash_profile
vi space tilda forward slash period bash underscore profile
It might help to copy and paste the code from my post directly into terminal.
Thanks again, I see that it is a tilda now. I appreciate you sticking with me.
---------- Post added at 01:15 AM ---------- Previous post was at 01:00 AM ----------
OK, I got in trouble again. When I did Step 2 I got a message abowut not being found. I tried to copy and somehow moved it and couldn't get a prompt. So I tried to shut down and start over, not a good idea. Here is where I am now:
Bobs-Retina:~ bobng$ vi ~/.bash_profile
E325: ATTENTION
Found a swap file by the name "~/.bash_profile.swp"
owned by: bobng dated: Tue Nov 19 19:04:46 2013
file name: ~bobng/.bash_profile
modified: YES
user name: bobng host name: Bobs-Retina.local
process ID: 20981
While opening file "/Users/bobng/.bash_profile"
(1) Another program may be editing the same file.
If this is the case, be careful not to end up with two
different instances of the same file when making changes.
Quit, or continue with caution.
(2) An edit session for this file crashed.
If this is the case, use ":recover" or "vim -r /Users/bobng/.bash_profile"
to recover the changes (see ":help recovery").
If you did this already, delete the swap file "/Users/bobng/.bash_profile.sw
p"
to avoid this message.
Swap file "~/.bash_profile.swp" already exists!
[O]pen Read-Only, (E)dit anyway, (R)ecover, (D)elete it, (Q)uit, (A)bort:
bobng said:
Thanks again, I see that it is a tilda now. I appreciate you sticking with me.
---------- Post added at 01:15 AM ---------- Previous post was at 01:00 AM ----------
OK, I got in trouble again. When I did Step 2 I got a message abowut not being found. I tried to copy and somehow moved it and couldn't get a prompt. So I tried to shut down and start over, not a good idea. Here is where I am now:
Bobs-Retina:~ bobng$ vi ~/.bash_profile
E325: ATTENTION
Found a swap file by the name "~/.bash_profile.swp"
owned by: bobng dated: Tue Nov 19 19:04:46 2013
file name: ~bobng/.bash_profile
modified: YES
user name: bobng host name: Bobs-Retina.local
process ID: 20981
While opening file "/Users/bobng/.bash_profile"
(1) Another program may be editing the same file.
If this is the case, be careful not to end up with two
different instances of the same file when making changes.
Quit, or continue with caution.
(2) An edit session for this file crashed.
If this is the case, use ":recover" or "vim -r /Users/bobng/.bash_profile"
to recover the changes (see ":help recovery").
If you did this already, delete the swap file "/Users/bobng/.bash_profile.sw
p"
to avoid this message.
Swap file "~/.bash_profile.swp" already exists!
[O]pen Read-Only, (E)dit anyway, (R)ecover, (D)elete it, (Q)uit, (A)bort:
Click to expand...
Click to collapse
Delete the swap file by executing the following:
Code:
rm -r ~/.bash_profile.swp
Don't forget the ".swp" at the end
Then start again
Here's what I did, I downloaded the the full image, some 400mb to
File i found in the forums here, I then rebooted into twrp, and installed from zip.
Boom.
All my apps were ok apart from the browser. I'm on 4.4, have new kit Kat features etc. Other than that, how do I know if I did it right?
Sent from my Nexus 7 using xda app-developers app

Categories

Resources