Set up/run adb on a MAC - Droid Eris Android Development

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!!

Related

Need some adb help...

Hey, I'm trying to push some stuff onto my mytouch using the included bridge tool, adb, and can't quite get it to work. AKA, I have no effing clue what I'm doing. I'm good with everything else, but when you sit me in front of Terminal I'm useless. Anyway, running Mac OS X, 10.5, I've got the SDK installed, exported, all that, but the internet has been no help with telling me what to do next. Please, someone help? D:
not sure on mac
but on pc i mostly put the files i want to push in to the sdk tools folder which gives you less to type
if you want to push stuff you need to know where to push on phone like
adb remount (makes drive read/write)
adb push xxxx.ogg /system/media/audio/ringtones/
if you want to install something
adb install twitter.apk
so my terminal looks like this (ignore errors phone not in usb)
Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\SI>cd s\tools
C:\Users\SI\s\tools>adb remount
* daemon not running. starting it now *
* daemon started successfully *
error: device not found
C:\Users\SI\s\tools>adb push xxxx.ogg /system/media/audio/ringtones/
error: device not found
C:\Users\SI\s\tools>
sitimber has given some good tips. On a Mac, you have to put "./" in front of adb to get it to execute.
For example, I have the Android SDK installed in /Developer/Android. In order for me to use adb, I open terminal and do the following:
cd /
cd /Developer/Android/Tools
./adb (insert whatever adb command here)
jsnyng said:
cd /
cd /Developer/Android/Tools
./adb (insert whatever adb command here)
Click to expand...
Click to collapse
worked perfectly! all the info i was getting was either for windows or linux and i was getting wicked confused. i have like nooo training with terminal so i was lost. that worked perfectly, thank you :]
do i still have to type "adb (command)" when i'm in the shell? i know that far, that im in the adb shell when there's a # next to my open commandline.
This will make it a step easier. If you want to be able to "adb command" every time you open the shell without changing directories,
Open terminal.
Run:
defaults write com.apple.finder AppleShowAllFiles TRUE
killall Finder
Click to expand...
Click to collapse
How you will be able to see hidden files.
Download the OSX SDK http://developer.android.com/sdk/download.html?v=android-sdk_r3-mac.zip
Unzip it. Move the entire folder into your root directory "/"
rename it to "android".
Launch TextEdit.app
Hit "Format>Make Plain Text"
Now type (in the document)
export PATH=${PATH}:/android/tools
Click to expand...
Click to collapse
Save is as
.bash_profile
in YOUR HOME DIRECTORY.
Make sure you uncheck "If no extension, use .txt"
Say yes when it asks if you want to make this a system file.
now close terminal (all the way) and relaunch. Type "adb" and whatever you'd like and you're set!
jewishjawsh said:
do i still have to type "adb (command)" when i'm in the shell? i know that far, that im in the adb shell when there's a # next to my open commandline.
Click to expand...
Click to collapse
No, you don't.
chordmasta's directions for creating a .bash_profile are correct, but I'll point out that you don't need to move it to root. I personally prefer not to clutter up root with my personal stuff. You also don't need to rename it if you don't want to.
For example, if you have it in "Documents", you would use this path (replacing my username "softbanksucks" with the name of your home directory.)
Code:
export PATH=${PATH}:/Users/softbanksucks/Documents/android-sdk-mac_x86-1.6_r1/tools
softbanksucks said:
No, you don't.
chordmasta's directions for creating a .bash_profile are correct, but I'll point out that you don't need to move it to root. I personally prefer not to clutter up root with my personal stuff. You also don't need to rename it if you don't want to.
For example, if you have it in "Documents", you would use this path (replacing my username "softbanksucks" with the name of your home directory.)
Code:
export PATH=${PATH}:/Users/softbanksucks/Documents/android-sdk-mac_x86-1.6_r1/tools
Click to expand...
Click to collapse
Thanks for pointing that out. I should have mentioned it. I knew this walkthrough would work without having to change values.
chordmasta said:
Thanks for pointing that out. I should have mentioned it. I knew this walkthrough would work without having to change values.
Click to expand...
Click to collapse
No prob - knew that you knew, just figured I'd point it out for those who don't

Can someone help me with booting debian ?

I am following this guide here, http://ubuntuforums.org/showthread.php?t=1413313 but when i type the command
"sh android-sdk-linux_86/tools/ddms"
it says it can't open the file. Any help would be great. Thanks
btw i am already unlocked and rooted so i just need to do steps 2 and 5
does the file exist?
ddms is part of the android sdk. i'm assuming you have installed the linux version of the sdk and know where the tools directory for the installation is?
i don't think you are even required to run this step anyway:
Code:
Now, for example, if you plug in the phone and run
$ sh android-sdk-linux_86/tools/ddms
[b]you will see the phone listed. (Note: this is not a step in the howto) [/b]
-verify the file exists at the location specified
-make sure it is executable to the current user (chmod +x)
or post the exact error message here
Yep the file is there and in the right place but when i type it it tells me "Can't open android-sdk-linux_86/tools/ddms"
Anyone...all i need is to get ubuntu to recognize my phone when i plug it in...
Hmm, seems a little odd. If you type the same command but replace the "sh" with "ls -l" what comes back? Plus, what user are you logged in as?
Sent from my Nexus One using the XDA mobile application powered by Tapatalk
I got it working yesterday, not sure what i did but ubuntu recognizes my phone now.

DX noob here. Anybody wanna help me out?

I ordered my DX earlier today and should have it tomorrow afternoon. (yay!)
I'm coming from the LG Ally, which I played around with quite a bit as far as root/roms go. I ended up bricking it when the Froyo update came out trying to get from 2.1 to one of the new 2.2.1 roms.
I've seen a lot of stuff about the DX and it looks like a lot of progress has been made (yay, again!). I love the look of Gingerbread, so I'd probably look into flashing one of the roms that supports a GB theme (Liberty looks cool!), but I don't want to run into trouble when the official GB release comes out.
So, how hard is this on the DX? What are the general steps? What in the world is a SBF?
Any sort of basic noob-friendly introduction would be greatly appreciated!
Thanks!
Here is a bunch of stuff I have put together for various people that should get you started:
Ok, here are the steps for setting up the sdk, getting rooted, and all that good stuff... have a feeling I will be making this into a new thread...perhaps....
SDK:
First off... you will want to go to the following site to download the sdk:
http://developer.android.com/sdk/index.html
Grab the following download: android-sdk_r08-windows.zip
I saved it to C:\sdk (i created a folder called SDK right at the root of C: drive). When it finishes, unzip this using 7zip (or any other unzip program you like) to the sdk folder. When it is finished unzipping, you should have a folder called "android-sdk_r08-windows". If you open up that folder, you will find a folder called "android-sdk-windows". Open this folder up and double click on the "SDK Manager.exe". This will open up a window, and bring up additional windows, one of which will ask you to "choose packages to install". You can download any or all of them. I recommend downloading the following:
• Android SDK Platform-tools, revision 1 (the top-most download)
• SDK Platform Android 2.3, API 9, revision 1
• SDK Platform Android 2.2, API 8, revision 2
• USB drivers (I don't think this shows up in the latest version of the sdk's first download window. I believe it is found if you go to the available packages section the "Android SDK and AVD Manager and expand the 3rd party section....but if you happen to see it in there...grab it)
This should be sufficient for now. All packages are accepted by default. If you do not wish to download all of them, simply highlight each one (one at a time) and then click the reject button towards the bottom middle of the window. When you have selected the packages you wish to download, click the install button.
After this has installed, you now have the Android SDK installed on your machine. You can close all windows related to the SDK, as we don't actually need to do anything with it, it simply has tools within it that we will need later. (This is where the adb command originates from. There is an adb.exe tool in the "tools" folder of the sdk install, but we will get to this later).
Now you will want to go to your desktop (or anywhere you have a shortcut or icon for My Computer), right click on My Computer, and select properties. Under the "advanced" tab of the window that opens, you should see a button at the bottom that says "environment variables". Click on this, and then find the "Path" variable under System Variables NOT user variables. Click Edit and go to the end of the "Variable Value" field. You will want to make sure there is a semicolon ( at the end of this before typing any additional info. You will want to add the full path of your android SDK install. For example, if you followed my example for download/saving/extracting/installing above, you would type the following information into the end of the "Variable Value" section:
C:\sdk\android-sdk_r08-windows\android-sdk-windows\tools
If you installed to another location, be sure to type the correct path to the "tools" folder within your installation of the Android SDK. Then click the OK button, and close any windows that were opened from adding to the "path variable".
Droid X Drivers
This section is a little more difficult to explain, as there are so many variables depending on what operating system you are running (windows XP, Windows Vista, Windows 7, etc). and whether or not you are running a 32-bit or 64-bit instance of your chosen Operating system.
Here is one link for Droid X drivers:
http://www.verizon-phones.org/verizon-motorola-droid-x-usb-drivers-pc-charging-drivers-download.html
I simply googled Droid X drivers, I'm sure this isn't the best link, but just for example I'm throwing it out there. If you google Droid X USB drivers <your operating system> you should be able to find the drivers you need, as well as help and instructions on how to get everything working.
Once you get the usb drivers installed, you will want to connect your Droid X to your computer. If it is recognized, you will get a notification in your drop down bar on your phone. On your phone, press on the USB connection in the drop down menu, and select "charge only". Next, open up a command prompt on your computer. Type the following in and hit enter:
adb devices
You should see something simiilar to the following come up if everything is configured correctly:
C:\>adb devices
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
List of devices attached
015A882315005010 device
If you see something similar to what I have above... then ADB is working correctly, and we can continue! Now we will move on to getting your device rooted! You will want to grab the z4root.apk that I have attached earlier in this thread and download it onto your computer. We will now test out if adb is indeed working! Save the z4root.1.3.0.apk and put it in the "tools" folder of the sdk we downloaded earlier. Now open up a new command prompt (or use the one we opened earlier if you haven't already closed it!) Change directories to the "tools" folder of the sdk:
If you installed the SDK where I used in my example.... type the following:
cd C:\sdk\android-sdk_r08-windows\android-sdk-windows\tools (press enter)
type the following: adb install z4root.1.3.0.apk (press enter)
You should now see the following:
C:\android-sdk-windows\tools>adb install z4root.1.3.0.apk
1833 KB/s (978414 bytes in 0.521s)
pkg: /data/local/tmp/z4root.1.3.0.apk
Success
z4root and ROOTING
If you get all of this, you have now installed a package using adb and we know the interface works. If you don't want to have to mess with this method of installing, you could also download "Astro File Manager" from the android market. You would then need to save z4root.apk to your sdcard of your Droid X. Then open the Astro program and browse to your SDcard and file the z4root.1.3.0.apk. Press on the .apk file and it should come up with a box that says something similar to "open with app installer" or "app manager"... don't recall exactly what it says, but should be something similar to package management or install of some sort. After pressing on that, you should see an install button. Press on that to install z4root.
Now that z4root is installed, you will want to go to your application list on your phone and press on the z4root to open the application. Press on the permanent root button and wait! This process may take a while, and your phone will reboot, but when it does, you are now rooted.
Removing BOOTSTRAP COMPLETELY
If you would like to completely remove Droid X bootstrap from your phone, here is what you need to do:
1) connect your phone to ur pc in charge only mode. Make sure it is recognized by adb
A) open command prompt and type "adb devices" (hit enter, your phone should show up)
2) in the command prompt, type "adb shell" (press enter)
3) type "su" (press enter)
4) type "mount -o rw, remount /dev/block/mtdblock4 /system" (press enter)
5) type "cp /system/bin/logwrapper.bin /system/bin/logwrapper"(press enter)
6) type "adb reboot" (press enter)
Your phone will reboot after typing adb reboot, and may take a little bit longer to boot the first time after bootstrap is removed (it may not, I just haven't gone through this process in a while).
Bootstrap should now be completely removed.
Note: all text in quotes is just what you should type...do not include the quotation marks when entering commands.
Disclaimer: I take no responsibility if you mess up your phone. Typing these commands incorrectly CAN mess up your phone. By following these directions, you do so at your own risk.
Installing Droid X Bootstrap
You can grab this .apk file from this thread as well, as I have it posted in one of my previous posts. You will then install this .apk file the same way that you installed z4root. Obviously if you are using the adb command prompt method, you will want to replace z4root.apk with the full name of the droid X bootstrap apk; if you are using a file manager or installer, just follow the same instructions as before as well.
With the bootstrap installed, you are now able to take backups and restore them as well in the event your phone has problems.
Thanks for the reply, but it's actually pretty confusing...
To install z4root, do I NEED to do any of those adb steps or can I just sideload it? I'm not sure if you're telling me to do both of those steps or just either/or. Sideloading is much easier, if it's an option.
And as far as the bootstrap goes - am I removing the original bootstrap and then installing the apk you attached to replace it with a custom bootstrap? Is this different than a custom recovery?
Also, what are SBFs and how do they fit into all of this?
Thanks!
lextex said:
Thanks for the reply, but it's actually pretty confusing...
To install z4root, do I NEED to do any of those adb steps or can I just sideload it? I'm not sure if you're telling me to do both of those steps or just either/or. Sideloading is much easier, if it's an option.
And as far as the bootstrap goes - am I removing the original bootstrap and then installing the apk you attached to replace it with a custom bootstrap? Is this different than a custom recovery?
Also, what are SBFs and how do they fit into all of this?
Thanks!
Click to expand...
Click to collapse
No, you do not have to do it this way. I just used this as an example for something I was doing for someone else, especially since they needed the sdk anyways... Just was practice.
(PS, not sure what you mean by sideloading... sorry just not familiar with the term...) Nonetheless...
You can just download the file, and then use file manager to install the file or any app installer you may normally use. Just make sure that under Settings-->Applications-->Unknown sources, that the check box is marked. Then you should be good to go.
As for bootstrap... You are basically replacing a logwrapper file that tells the phone to boot to Motorola's built in recovery. Koush's bootstrap hijacks this and writes its own logwrapper and allows for the recovery process to be interrupted so backing up/restorying, etc. You can load that apk the same way you do Z4root.
As for SBF files, I'm can't recall what it actually stands for, but it is basically a file from Motorola that allowed their employees to flash a phone back to "out of the box" state in the event that a customer ruined their phone or had issues with it... this goes way back to even the Motorola Razor days I believe... In any event, it is used alongside a program called RSDlite. This program allows you to connect your phone to your computer and flash the sbf files that have been released, and as a result allows you to restore your phone back to a "clean" state in the event that you mess up the /system partition and for other uses as well.
I will be adding more to a basic guide for all things Droid X later this weekend. If you have more questions, feel free to post back. And check out my other post here:
http://forum.xda-developers.com/showthread.php?t=940986
This includes the same info as I posted here already, but should have some more updates this weekend.
Good luck!
new here also.
i thought droid x could not be rooted.
i bought mine in october 2010; it's running 2.2.1
thanks in advance

Trying to root but can't get ADB working

I've finally decided to try to root my G2 but can't get past the ADB setup. I downloaded the SDK, but when I open the manager and try to install platform tools it goes through the motions and then tells me nothing was installed. When I open a command prompt and type "ADB devices" it doesn't recognize anything. What am I doing wrong??
EDIT: specifically, when I try to install platform-tools it tells me it couldn't create a directory and nothing was installed.
66 people have read this and nobody has any suggestions to help?
i think you miss the 1st procedure....
you must have the unknown resources and the usb debbuging enabled.....
then you can proceed to your super one click rooting.....
I have a problem after rebooting my PC: <Java not found...> Reinstalling doesn't help, adding environment variables too. Any idea?
Just root using the rage/visionary method. No adb needed and very easy to do. Here is the linkhttp://forum.xda-developers.com/showthread.php?t=834228
Sent from my SilverBullet 'HTCDesireZ running CM7'
juvanni said:
i think you miss the 1st procedure....
you must have the unknown resources and the usb debbuging enabled.....
then you can proceed to your super one click rooting.....
Click to expand...
Click to collapse
I don't understand? I'm trying to root following the recommended wiki instructions, and I haven't been able to get adb to work so I haven't gotten past that step.
Are you running windows x64? Cause the android installer has issues detecting java on x64 systems.
When it says 'Can't find java' or whatever the error is, click back, then next again, it should find it the second time around. Well thats what happened for me anyway.
-Nipqer
If you're on froyo just use the app z4 root or universal androot
You can also use superoneclick root 2.11
Its very easy and it only take about 3 minutes
Stewie just said that!
I appreciate the help so far, but my problem is I have gingerbread and everything I've read requires froyo for root, and the only way I've read to downgrade uses ADB, so any non-ADB rooting method still won't work for me. I've followed the "ADB for dummies" thread and the other instruction thread and everything seems fine, but when I type in the first command for the downgrading it says adb isn't a recognized command. Am I in the wrong command prompt? I feel like its probably something really dumb I'm doing or not doing but for the life of me I can't figure it out.
Navigate to the folder adb is in.
Hold shift, right click in the folder (make sure nothing is selected)
select 'Open command window here' (or something along those lines)
Adb should work.
-Nipqer
OK, so I'm definitely in the right folder, I read and followed ADB for Dummies thread. Trying to follow this direction:
"Run the following command to verify the exploit has access to what it needs. (Only the first line is the command. The second line should be the result returned if all goes well.)
Code:
$ adb shell cat /dev/msm_rotator
/dev/msm_rotator: invalid length"
When I type that in, should there be spaces between the "adb" and "shell"? Should there be a space after the command prompt and before "adb"? I've tried several variations of it and it keeps telling me "adb is not recognized as an internal or external operable program or batch file."
ok you need to run the command from the folder with adb.exe in it, type it as adb<space>shell<space>cat<space>/dev/msm_rotator
If you are getting an error search for adb.exe and once found try the command again from this folder,if as you say you are in the right folder then I think you will have to reinstall adb as I just ran the command in the form above and it works so if you still get an error then something has gone wrong with the install
P.S Another way to make sure that adb is working and recognises your phone is to type adb devices, if your phone is attached and recognised then it will return a number
Thank you! I had to uninstall and reinstall the package, I don't know what was wrong but it seems to be working now. Also, I knew I was probably doing something stupid, and I was. I wasn't in the platform-tools directory for my command prompt, I was in the TOOLs directory. Just so I'm clear, every command I type into the terminal should be in the Platform-tools directory, correct?
Now, assuming I can follow all the other directions with no problems, once I get to the downgrade pushing steps, I will lose all my current settings, right? It will be a fresh froyo 2.2 like it came to me originally? Other than using Appbrain to back up my current apps, how else should I make a backup?
Final question, do I need to follow the temp root directions and push the downgrade all at one time? Or can I do the temp root and come back at a later time to push the downgrade?
First problem solved then!
Yes but follow this Step 4
Now we need to update your Path variable. This lets you run adb on your PC from a command window no matter which directory you are in (which makes things a lot easier). If you don't setup your Path, then every time you want to run adb, you will either have to type the whole long pathname where you put adb, or cd to where you've put adb and run it from there (which could be inconvenient if you are transferring files to/from your phone).
On your PC, right-click on "My Computer" and select "Properties". (on Vista, click on "Change Settings"). Go to the "Advanced" tab, then select "Environment Variables". Find the "Path" variable in the list of variables that it shows (you might need to scroll), and then double-click on that entry to edit it. Add the full path of the "tools" and "platform-tools" folders of the SDK to your path. e.g. if the SDK has been installed in "c:\Program Files\android-sdk-windows", then add to your Path "c:\Program Files\android-sdk-windows\tools;c:\Program Files\android-sdk-windows\platform-tools" (Please Note - don't put any spaces between the semi-colon and pathname, otherwise it won't work !)if you want to.
Once done you can use ADB from the command prompt in ANY folder,very handy IMO.
If I was you I would set aside enough time and see it through,no point to temp rooting alone.
Get Titanium backup from the market an absolute essential app with this you can backup,upload to dropbox(Another essential app) uninstall apps and a host of other useful tools.
Read the guide first as well,good luck.

[noob-read] adb and fastboot. What is it? How can it help you?

Please note, I can only speak with any degree of certainty about devices bought from Play / Moto. I cannot attest to the accuracy of this information for US carrier versions etc. Anything you do is at your own risk
Contents / Thread overview
Introduction
What is Fastboot?
What is adb?
How to install adb and fastboot
How to test adb and fastboot work
OK Gimme some useful fastboot commands please!
OK Gimme some useful adb commands please!
A little more about using Windows command prompt
Myth Busters
Introduction
adb and fastboot are very useful command line tools. They can be used from Windows, Linux or Mac to carry out tasks on your android device, such as moving and backing up files, rooting and restoring your phone to it's factory state. Understanding how to use these tools could save your phone when you get yourself in trouble. This is especially true of rooted users. Particularly those of you who are "new to the scene". You definitely should read and understand this thread before you do ANYTHING root related.
This thread is not intended to be a non-exhausted reference. It is merely here to give an overview of the most basic of basics
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
What is fastboot?
Fastboot comprises of 2 components.
1) Fastboot mode on the phone (The Bootloader)
2) Fastboot tool on your computer
Fastboot is a small command line tool that you can use from your computer whilst the phone is connected via USB and you are booted into the bootloader. The most common uses for fastboot are:
Unlocking the bootloader - needed as part of the rooting process
Flashing a custom recovery to the device - needed as part of the rooting process
Flashing factory images - used for saving / trestoring your device back to stock
Being able to do these 3 things are essential before rooting. Many new users skip learning these and use a toolkit to root. As a result, when they mess up and we try to explain what they need to do to fix their issues, it becomes very difficult for us to help as fastboot is not understood. It is YOUR responsibility to understand these things BEFORE you mess up.
What is adb?
adb is another small command line tool that stands for "Android Debugging Bridge". Again, it can be used from a computer connected via USB to your android device. It can be used whilst the device is booted into Android or (if you have a custom recovery), it can be used in recovery too, unlike fastboot (yes, adb and fastboot are NOT the same thing) which can only be used in the bootloader.
adb can be used to push files to (or pull files from) your phone. It can also be used to execute many of the commands available in Linux terminals (Or Android terminal emulators) on the device itself. We're not here to cover all these commands however. We just want to cover the basics.
How to install adb and fastboot
adb and fastboot are very easy to install and can be installed on Windows, Linux and MAC computers. The Windows install can be a little bit more complicated than the other 2 and may need additional drivers installing too.
Windows.
There is a very handy tool that can install adb and fastboot in 15 seconds. It is recommended that you use this to install adb and fastboot. Please see the link immediately below for that tool:
ADB, Fastboot and Drivers - 15 seconds ADB Installer - Really quick and easy way to install adb and fastboot (by @Snoop05). Download links are at the bottom of post 1.
This tool asks if you want to install adb and fastboot (to which you should answer Y) and then creates c:\adb\adb.exe and c:\adb\fastboot.exe
It then asks if you want to install it system wide .. This is asking to install for all windows users. < 15 second installer needs updating to SDK 23, which is required for latest Android versions.
Download the latest SDK (adb and fastboot) versions here: https://developer.android.com/sdk/index.html (Scroll down to SDK tools only) then download the Windows *Installer*.
Open the installer and select "Platform-tools" and install the packages. This should create "C:\Program Files (x86)\Android\android-sdk\platform-tools"
Now we want to set this path as a Windows Environment variable PATH to make the executables work system wide:
right-click computer > properties > advanced > environment variables.
under system variables click "path" and click "edit"
at the end of the line, add the below:
Code:
;C:\Program Files (x86)\Android\android-sdk\platform-tools
Please note, the semi-colon ; is VERY important.
You may also need to install drivers.
Here is a link to the Google USB Driver: DOWNLOAD THIS
Code:
To install on Windows 7:
- Ensure existing drivers are uninstalled first*
- Extract the zip to c:\adb (created earlier by the installer)
- Right-click "Computer" > Manage in windows and choose "Device Manager"
- Boot the Nexus 6 to the bootloader (Volume down + Power) and connect the USB Cable
- Watch for any new devices with exclamation marks appearing
- Right-Click the new device > Update driver software
- Choose the "browse" method and browse to c:\adb, find teh folder you extracted then follow the wizard to the end - using amd6 64 if you're on a 64 bit system and i386 if you're on a 32 bit system.
*To uninstall existing drivers, boot into Android and connect the USB cable. Monitor device manager for the device showing up. To uninstall the device, right-click it to uninstall it. At the prompt, ensure you also choose to delete the driver. Repeat this for bootloader and recovery.
Code:
To Install on Windows 8, you may need to additionally disable driver enforcement
- From the Metro Start Screen, open Settings (move your mouse to the bottom-right-corner of the screen and wait for the - -- pop-out bar to appear, then click the Gear icon).
- Click ‘More PC Settings’.
- Click ‘General’.
- Scroll down, and click ‘Restart now’ under ‘Advanced startup’.
- Wait a bit.
- Click ‘Troubleshoot’.
- Click ‘Advanced Options’
- Click ‘Windows Startup Settings’
- Click Restart.
Once that is done, your Windows computer is configured for adb and fastboot.
In device manager, the device should show up as below, depending whether you are booted into recovery or bootloader...
Recovery - Android Device > Google Nexus 4 ADB Interface
Bootloader - Android Device > Google Nexus 4 Bootloader Interface
If it shows as something different, either you have existing drivers in the way or something went wrong.
Linux and Mac
Here is a really simple tool to install adb and fastboot on the above OS. The only expectation is you know how to open and run a terminal command. Please see the link immediately below:
Nexus Tools 2.2 (Featured by XDA) - adb and fastboot installer for Linux and Mac (by @corbin052198)
Once you have installed adb and fastboot from the above link, you're ready to go.
How to test adb and fastboot work
As previously mentioned, adb and fastboot are both command line tools. That means you must run these tools from command prompt (cmd in Windows) or Terminal (Linux and Mac).
Remember earlier, I mentioned that fastboot can only be used in bootloader? and adb can only be used in Android (or custom recovery - lets cover that later)? We can use the command "fastboot devices" and "adb devices to see if we have adb and fastboot working correctly.
Lets try it.
Boot your phone into android
Connect it to your computer via USB
Open cmd (start > type "cmd" on Windows) or Terminal (Mac/ Linux
Type in the windows "adb devices" and press enter
Here is what we don't want to see:
Notice how there is nothing underneath where it says "List of attached devices" That means it cannot see any device
Here is what we DO want to see:
We can see that there is now a device listed.
OK lets test fastboot. Unplug the USB and turn off the phone. When it is off, hold down Volume down + power until you feel the vibrate. You will now be in the bootloader. Reconnect the USB cable.
In the same window (cmd or terminal) we're going to now type "fastboot devices".
Again, here is an example of what we don't and do want to see:
If in both modes, you can see your devices "Serial Number", then you know they are both working.
Please note that if you cannot get adb and fastboot to work "system wide", you can open the command prompt to the location of the adb and fastboot executables exist and try from there.
OK Gimme some useful fastboot commands please!
Here are some of the most useful fastboot commands you will come across. Fastboot is used mostly for flashing images to the devices partitions on the internal memory.
Code:
fastboot oem unlock
This unlocks your bootloader and allows you to flash a recovery to root. WARNING, this will wipe your device. Rooting the N6 is essentially unlocking the bootloader, flashing a recovery and then putting the SuperSU zip on your sdcard and flashing it via the recovery. This thread covers rooting: [HOW-TO] The Nexus 6 All-In-One Beginner's Guide by @xBeerdroiDx
Code:
fastboot flash recovery recovery.img
This will flash a recovery.img to the recovery partition. The command is broken down into "fastboot flash" (what to do) "recovery" (where to flash to) "recovery.img" what to flash there. In the terminal or command prompt, you cannot just type "recovery.img" though. It has to be the path to where the recovery image is. For example, if my recovery image is on my desktop, I would have to type:
Code:
fastboot flash recovery c:\users\rootsu\desktop\recovery.img
It is worth noting, that it IS case sensitive, meaning if your file is called Recovery.img, you must type the capital R...
Other things you would flash:
Code:
fastboot flash system system.img
fastboot flash boot boot.img
These will flash the system image (ROM) and boot image (kernel) as you would if you were returning to stock.
A full guide to returning to stock can be found here: [TUTORIAL][GUIDE][HOW TO] Flash Factory Images || Unroot || Relock bootloader by @Mr hOaX
You can also boot into a recovery.img without flashing it...
Code:
fastboot boot c:\users\rootsu\desktop\recovery.img
which is "fastboot boot" (what to do) "c:\users\rootsu\desktop\recovery.img" what to do it with. As you may have noticed, we did not define the recovery partition in this command, that's because we're not flashing it....
OK Gimme some useful adb commands please!
At the moment, we are going to assume you have a custom recovery and you have booted into recovery. The reason for this is using adb in recovery can be much simpler.
Here are some useful scenarios for using adb.
Backup your sdcard to your PC
Code:
adb shell
mount data
exit
adb pull data/media/0 c:\MyBackup
**Please note, some recoveries may "mount data" automatically on boot, so don't be disheartened if you get an error stating device or resource busy. This probably just means you can't mount what is already mounted**
/data/media/0 is the real location of /sdcard for your information. Also referred to as "The mount point". What we have done here is "adb pull" (what to do) "data/media/0" (what to move) "c:\MyBackup" (where to move it to)
Push a zip file from your PC to your sdcard (useful if you wiped your sdcard and rom)
Code:
adb shell
mount data
exit
adb push c:\rom.zip data/media/0
What we have done here is "adb push" (what to do) "c:\rom.zip" (what to move) "data/media/0" (where to move it to)
You can of course also use adb to push and pull files to and from /system too. You just need to:
Code:
adb shell
mount system
exit
I mentioned earlier that using custom recovery is much easier for adb than whilst booted into Android. You need to ensure you have a kernel that allows insecure adb before you do anything with system and data partitions. You also need to ensure that USB debugging has been enabled in developer options.
For example, to mount system to pull files whilst android is running you have to:
Code:
adb root
adb shell
mount -o rw,remount /dev/block/platform/msm_sdcc.1/by-name/system /system
...which is clearly a little bit more involved, so I recommend you use recovery for adb push and pull. You can find more detailed information on adb here: http://developer.android.com/tools/help/adb.html
A little more about using Windows command prompt
One thing to understand is that like Windows, command prompt (cmd.exe) works with directories (or folders if you like). The Linux and Mac terminals are the same, but most linux users, we expect you would already know this.
Here you will see I have downloaded a recovery image that I want to flash using fastboot.
As you can see, the recovery.img is located in C:\users\rootSU\Desktop
Usually when you open the command prompt from the start menu, or run command, the command prompt will default to your user location as seen below:
So lets try and fastboot flash recovery recovery.img...
It fails with a not-too-accurate error message. It has failed because you have not told it where the recovery image is. It assumes it is in the directory as listed in the prompt
So, how do we deal with this? Well, there are 3 ways.
1) We tell the command prompt where the recovery.img actully is in the command itself
Success! As you can see, we have told the command that the location for the file is Desktop\recovery.img
2) We can change the directory in command prompt to the directory where the file is. In this example, we change directory to "Desktop". The change directory command is "cd " or in this case "cd Desktop"
3) ...and possibly the simplest method. We hold shift whilst we right-click on the folder we want to change directory to, and directly open a command prompt there:
Another point to make with command prompt or terminals, is if you do a particular command, it is "pre-programmed" to "expect" a particular format of that command.
For example, we know that adb push as a command expects after it . This means the command is actually
Code:
adb push
BUT if you put something AFTER , for example -
Code:
adb push somethingelse
, it will assume that the "somethingelse" is a bad parameter, and the command will fail. It will probably display (or "print" which is the technical term in a terminal) a helpful guide of how the command should be used instead of trying to run the command which it does not understand.
You're probably wondering why I am telling you this. Well quite simply, it is a warning about folder names. Imagine you have c:\users\rootSU\My Documents as a folder. You assume the command is then
Code:
adb pull /data/media/0 c:\users\rootSU\My Documents
but it is not... There is a space in between My and Documents. What you have actually done is
Code:
adb pull Documents
because it uses a space to signify the end of a command or parameter. It is best to avoid using folders with spaces in them. Avoid as much as you can. In the event it is unavoidable (Although when is it ever>) then please surround the path with quotation marks,
Code:
adb pull /data/media/0 "c:\users\rootSU\My Documents"
so that way, it sees everything between the " " as a single parameter.
Myth Busters
Myth 1: You need USB debugging on to use adb and fastboot
If you cannot boot into Android, it doesn't matter. You DO NOT need USB Debugging turned on to use adb outside of android. USB Debugging is an Android ONLY setting. Fastboot obviously also does not need debugging either as this too is outside of Android
Myth 2: to adb push or fastboot flash files, they must be in the same folder as adb or fastboot executables. Sorry but this is rubbish. You can pass the full path of the image you're flashing or file you're pushing in the command and fastboot / adb can be called system wide if you've set them as an environment variable or used the 15 second installer
thanks(im out of thanks). but ill be back to leave one here!!!!!
simms22 said:
thanks(im out of thanks). but ill be back to leave one here!!!!!
Click to expand...
Click to collapse
No worries. Just putting it here for info. It's not a new work, just a slightly amended version of my N5 thread. No need for thanks
rootSU said:
No worries. Just putting it here for info. It's not a new work, just a slightly amended version of my N5 thread. No need for thanks
Click to expand...
Click to collapse
it was up in the n5 threads before, and was needed here. but its here now as well, so thank you
Good guide. Needs to be a sticky. In fact, I think every device general forum should have a sticky like this. Would have saved me a lot of grief back when....
Excellent update.
Very good to see. I'm sure lots of people will be sending noobs here for the basics.
Up to your usual helpful, good work I see.
rootSU said:
This tool asks if you want to install adb and fastboot (to which you should answer Y) and then creates c:\adb\adb.exe and c:\adb\fastboot.exe
It then asks if you want to install it system wide (to which again, you should answer Y)... This then allows you to type adb commands in the command prompt without having to open a particular directory first. You may or may not understand what I mean when I say that, but take it from me, its much more convenient and easier to use this way.
Click to expand...
Click to collapse
Y option = System-wide = install to "C:\adb" and add path for system variable - This mean you can use it by any account on your pc.
N option = Current user only = install to "C:\Users\[YOUR USERNAME]\adb" and add path for user only - Only user account used for installation can actually use it.
So if you say Y or N you will be still able to use it from any directory with cmd.
rootSU said:
It will also ask if you want to install device drivers. Actually, say N to this as we're going to cover that next, using the google USB drivers
Here is a link to the Google USB Driver: DOWNLOAD THIS
Click to expand...
Click to collapse
Drivers in my installer are the one from the link you posted here. I'm not using any modified drivers, just the one that come with SDK. And they are also digitally signed.
I hope you will fix these But still nice work, beginners should understand it :good:
Snoop05 said:
Y option = System-wide = install to "C:\adb" and add path for system variable - This mean you can use it by any account on your pc.
N option = Current user only = install to "C:\Users\[YOUR USERNAME]\adb" and add path for user only - Only user account used for installation can actually use it.
So if you say Y or N you will be still able to use it from any directory with cmd.
Drivers in my installer are the one from the link you posted here. I'm not using any modified drivers, just the one that come with SDK. And they are also digitally signed.
I hope you will fix these But still nice work, beginners should understand it :good:
Click to expand...
Click to collapse
Thanks for the info. I thought system wide meant it was putting it as a path environment variable. Reason I didmt use the drivers from your tool originally is (well I wrote this thread for N5 originally) they didnt work so had to install the universal naked driver. But if yours are the same as the ones linked, I can update that.
rootSU said:
Thanks for the info. I thought system wide meant it was putting it as a path environment variable. Reason I didmt use the drivers from your tool originally is (well I wrote this thread for N5 originally) they didnt work so had to install the universal naked driver. But if yours are the same as the ones linked, I can update that.
Click to expand...
Click to collapse
Path is added in both cases.
Sooo I need a little help here. I followed the directions to unlock the bootloader and everything went good. I did the CF auto-root, and the phone booted back up as normal. Now, I was trying to flash the M preview, and all of a suddon now my phone isn't recognized in adb. You posted a pic of what we don't want to see when testing for adb, but you don't say how to fix it if we run into the problem. Any way to get it to recognize my phone again so I can get this build on?
papeshfoo said:
Sooo I need a little help here. I followed the directions to unlock the bootloader and everything went good. I did the CF auto-root, and the phone booted back up as normal. Now, I was trying to flash the M preview, and all of a suddon now my phone isn't recognized in adb. You posted a pic of what we don't want to see when testing for adb, but you don't say how to fix it if we run into the problem. Any way to get it to recognize my phone again so I can get this build on?
Click to expand...
Click to collapse
Can you be very specific with your issue please?
papeshfoo said:
Sooo I need a little help here. I followed the directions to unlock the bootloader and everything went good. I did the CF auto-root, and the phone booted back up as normal. Now, I was trying to flash the M preview, and all of a suddon now my phone isn't recognized in adb. You posted a pic of what we don't want to see when testing for adb, but you don't say how to fix it if we run into the problem. Any way to get it to recognize my phone again so I can get this build on?
Click to expand...
Click to collapse
Android M no like root, you'll either have to live with stock or wait for chainfire to do his thing.
This all worked well until I had to find my device in the cmd prompt. It listed no devices when I typed in "ADB Devices". The issue I found was with the ADB Interface Driver. I uninstalled it and reinstalled it thinking it might've been a driver issue, but it still wouldn't work. I tried the "Uninstall driver" then "scan for hardware changes" but that didn't work. Finally I found the universal ADB driver and tried using that. STILL nothing. I figured that, because I don't have my device's driver installed, it might've been that, so I tried to DL it and yet again, nothing. I have a Kyocera Hydro Life, if that helps. Also, I tried looking through the "update driver manually" in order to update the driver software by looking through the different ADB interfaces that it had but my Kyocera driver wasn't there. Is it supposed to be there or do I just use one of the ones provided?
I checked my programs and apps and it says that the Kyocera usb driver was installed. Did I do something wrong?
ScottyChaos said:
This all worked well until I had to find my device in the cmd prompt. It listed no devices when I typed in "ADB Devices". The issue I found was with the ADB Interface Driver. I uninstalled it and reinstalled it thinking it might've been a driver issue, but it still wouldn't work. I tried the "Uninstall driver" then "scan for hardware changes" but that didn't work. Finally I found the universal ADB driver and tried using that. STILL nothing. I figured that, because I don't have my device's driver installed, it might've been that, so I tried to DL it and yet again, nothing. I have a Kyocera Hydro Life, if that helps. Also, I tried looking through the "update driver manually" in order to update the driver software by looking through the different ADB interfaces that it had but my Kyocera driver wasn't there. Is it supposed to be there or do I just use one of the ones provided?
I checked my programs and apps and it says that the Kyocera usb driver was installed. Did I do something wrong?
Click to expand...
Click to collapse
Try a different USB port. If that doesn't work try a different USB cable. If that also doesn't work, you could try disabling driver signature checking for Windows.
If those don't work, try this thread > http://forum.xda-developers.com/showthread.php?t=1583801
cam30era said:
Try a different USB port. If that doesn't work try a different USB cable. If that also doesn't work, you could try disabling driver signature checking for Windows.
If those don't work, try this thread > http://forum.xda-developers.com/showthread.php?t=1583801
Click to expand...
Click to collapse
EDIT: I also forgot to mention that the error code that came up while I was in the dev manager was compatibility error code (28) when I clicked on "Device ADB interface".
ScottyChaos said:
EDIT: I also forgot to mention that the error code that came up while I was in the dev manager was compatibility error code (28) when I clicked on "Device ADB interface".
Click to expand...
Click to collapse
Error 28 means drivers not installed. Try the driver help thread that I linked above.
---------- Post added at 12:33 PM ---------- Previous post was at 12:04 PM ----------
cam30era said:
Error 28 means drivers not installed. Try the driver help thread that I linked above.
Click to expand...
Click to collapse
@ScottyChaos,
Just a fundamental question: I assume you have enabled "Developer Options" in Settings, and then checked "enable USB debugging"?
---------- Post added at 12:39 PM ---------- Previous post was at 12:33 PM ----------
[/COLOR @ScottyChaos,
Here is a thread that you might find interesting > http://forum.xda-developers.com/android/help/metro-pcs-kyocera-hydro-life-rooted-t2870678
Windows 10 device driver management is even more locked down then windows 8. I got two of the three drivers loaded but when going into adb mode on the phone through recovery it just disappeared out of the device manager. I had to unplug and plug in while in that mode to trigger a unloaded driver in the device manager. Once there I had to force the adb driver manually with the nasty windows driver warning and all. Once I did that I could see the device in adb mode and sideload my marshmallow OTA. woot!
I decided to drop a thanks bomb...
ADB is good.
But that fastboot.
Seriously, its ONE command. OK, a few different arguments to use.... But it is so easy, and so powerful. People are afraid to mess up on command line, but its actually way harder to type the wrong thing out then to click the wrong thing.
LEARN IT. Forget your toolkit.
You can fix almost anything, Its not too hard for you. It may be new... YOU CAN DO IT.
Also, I have to say it... Its not going to help anyone, but it will keep me from punching something. ADB and Fastboot... Not the same. You don't ADB a new system image....

Categories

Resources