[Droid Eris Android Development] bftb0:
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):

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:

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

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

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)

* 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)

* 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

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)

* 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.