[G1 Android Development] wddglr:
When I first attempted to install the SDK, I found tutorials that only had bits and pieces about the whole procedure. A lot of Google searches and hours of eye strain. I wanted to write a solid tutorial, but instead of publishing it in a personal blog, I chose to publish it here on xda-developers. This is the definite forum to come to if you are interested in Android/G1/HTC Dream development or costumization. I wrote this to make the enlarge the knowledge of this community.

!! THIS TUTORIAL IS FOR THE LATEST UBUNTU RELEASE: JAUNTY JACKALOPE 9.04 !!

!!START -------------------------------------- Optional Preparation --------------------------------------

This applies if you -

Are interested in installing Ubuntu for the first time.

Are/will be reinstalling Ubuntu from scratch.

Want to keep your SDK installation easy to reach.

Want to keep things nice and clean.

And your machine -

Has a second hard drive.

Has free space for another small partition.

This procedure will make things easier during installation of the SDK and in the long run. Hopefully you've read about partitions. If you are dualbooting, please read this first to get an idea of what you're doing.

While installing Ubuntu and on the Prepare Disk Space screen (partition editor), select "Specify partitions manually (Advanced)"

On the Create Partition dialog, select the following options:

Type for the new partition: Primary

or Logical if you're dualbooting and know what you are doing.​

New partition size in megabytes: 5120MB (5GB) might work. BUT:

Location for the new partition: Beginning

Use as: Ext4 or Ext3

Filesystem doesn't matter. (?)​

Mount point: /AndroidSDK

Enter this manually​

Complete Ubuntu installation as usual.

-------------------------------------- Optional Preparation -------------------------------------- END!!
​

You will now install the SDK.​

!!START -------------------------------------- Installing Android SDK --------------------------------------

Installing the SDK is the easiest of all.

Download the SDK.

169.9 MB [http://developer.android.com/sdk/download.html?v=android-sdk-linux_x86-1.5_r3.zip]​

Right-click and select Extract Here.

Move the contents of the android-sdk-linux_x86-1.5_r3 directory to your desired location.

If you followed Optional Installation, move the contents to your /AndroidSDK directory in the root of your filesystem.​

Close directory window.

-------------------------------------- Installing Android SDK -------------------------------------- END!!
​

You will now set up your bashrc file and UDEV to recognize your HTC Device.​

!!START -------------------------------------- ADB + FASTBOOT --------------------------------------

The Android Debug Bridge (adb) is one of the tools that will help you the most when you run into flashing problems or running shell commands directly from your machine. UDEV will not recognize your G1 out of the box, but we will configure it with some rules so it can connect.

We will work with /AndroidSDK as the location of your sdk. If this is not your setup, I think you're smart enough to figure it out.

Editing .bashrc file to use tools from /AndroidSDK/tools/ directory -

Go to your home folder.

Example: /home/wddglr/​

Press Control + H to view hidden files.

Look for your .bashrc file and double click to open it with gedit.

Add the following lines to the top of the file:

#AndroidDev PATH
export PATH=${PATH}:/AndroidSDK/tools

IMPORTANT NOTE

Setting up UDEV to recognize HTC Device -

Type the following into a terminal (Applications > Accessories > Terminal):

gksudo gedit /etc/udev/rules.d/51-android.rules

Now add the following line to the blank file:

SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666"

Click save and close.

To restart udev, open up a terminal and enter:

sudo /etc/init.d/udev restart

Setting up fastboot -

Download this fastboot binary from http://android-dls.com.

130.4 KB [http://android-dls.com/files/linux/fastboot]​

Once downloaded to your desktop, right click and select Properties.

Navigate to the Permissions tab and configure the following option:

Execute: [√] Allow executing file as program​

Click Close.

Move the fastboot bianary to your /AndroidSDK/tools/ directory.

Reboot.

-------------------------------------- ADB + FASTBOOT -------------------------------------- END!!
​

Now you can use adb and fastboot directly from any terminal. If you chose to do the Optional Preparation, you can now save your Eclipse Workspace and your downloaded/custom ROMs/Themes in this new /AndroidSDK directory keeping things easier to reach and safe from evil disk errors or other mishaps!!! :O​

If you are having problems, send me a PM. I will be happy to help.