These instructions were written using a 10.04.2 build of Ubuntu and it should be fine for both 32 and 64 bit versions of the operating system. We'll walk through how to prepare your PC from start to finish, so this should be the only instruction you need.
Remove Java alternatives
In terminal:
sudo apt-get remove -y --purge openjdk-6-jre openjdk-6-jre-lib openjdk-6-jdk gcj
'For Ubuntu 10.04 LTS, the sun-java6 packages have been dropped from the Multiverse section of the Ubuntu archive.'
So we need to add the Repo prior to installation.
In terminal:
1. Google searchsudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
sudo apt-get update
sudo apt-get install sun-java6-jre sun-java6-jdk sun-java6-fonts sun-java6-plugin
sudo update-alternatives --config javaShould return:
There is only one alternative in link group java: /usr/lib/jvm/java-6-sun/jre/bin/java
Nothing to configure.Get the android SDK, choose one of the following three ways:
2. Android Developer Page
3. SDK direct link
Installation is as simple as extracting the SDK to your /home directory using File Roller (just execute the downloaded archive)...
/home/USERNAME/android-sdk-linux_x86You'll need to update the SDK.
In terminal:
android-sdk-linux_x86/tools/android update sdkAllow it to refresh sources, select 'Accept All' and 'Install'. It will take a while.
Get FASTBOOT, choose one of the following two ways:
1. Google search
2. HTC Developer page
Installation is as simple as extracting FASTBOOT into the platform-tools directory using File Roller... but the platform-tools directory won't exist until the SDK and AVD Manager has finished updating. Once it has, extract FASTBOOT to the platform-tools directory...
/home/USERNAME/android-sdk-linux_x86/platform-tools/fastbootUsing Nautilus (your file browser), navigate to the platform-tools directory, right click on adb and fastboot in turn, and confirm on the permissions tab you have 'Allow executing file as program' selected.
From here, you could use ADB shell and FASTBOOT from within the SDK's platform-tools directory, but to make life easier and save keystrokes, we'll edit your .profile $PATH to allow execution of the commands from outside the platform-tools directory.
In terminal:
gedit .profile
We're looking for the following text:
PATH="$HOME/bin:$PATH"Which we're going to replace with the following:
PATH="$HOME/bin:$PATH:/home/'USERNAME'/android-sdk-linux_x86/platform-tools"Save and close gedit.
Add a BIN directory.
In terminal:
mkdir binCreate a udev rule to allow access to the Android device
Confirm your vendor ID, without the Android device plugged in...
In terminal:
lsusbWith it plugged in...
In terminal:
lsusbShould result in an extra entry, something like this:
Bus 002 Device 002: ID 0bb4:0c87 High Tech Computer Corp.In this case, the vendor ID is 0bb4.
Create a fresh udev rule.
In terminal:
sudo gedit /etc/udev/rules.d/51-android.rulesAdd the following lines (for the HTC Desire):
SUSBYSTEMS=="usb", ATTRS{idVendor}=="18d1", MODE="0666"
SUSBYSTEMS=="usb", ATTRS{idVendor}=="0bb4", MODE="0666"NOTE: Other devices will need different vendor IDs. You can find your vendor ID using google.
Save and close gedit.
Give the new rule file some permissions.
In terminal:
sudo chmod a+rx /etc/udev/rules.d/51-android.rulesNow restart the PC. After your reboot, confirm everything worked as follows:
Time for testing
With the Android device running normally, plugged in and debugging turned on.
In terminal:
adb devicesShoud return something like this:
Reboot the Android device into the bootloader (fastboot). Confirm 'fastboot USB' appears on the Android device.* daemon not running. starting it now on port 5037 *
* daemon started successfully *
List of devices attached HT08ZRx0x6xx device
In terminal:
fastboot devices
Should return something like this:
HT08ZRx0x6xx fastbootTroubleshooting:
If you get errors relating to no such command, try the same commands manually using the path.
In terminal:
./android-sdk-linux_x86/platform-tools/adb devicesand
./android-sdk-linux_x86/platform-tools/fastboot devicesIf these don't work, or one works and the other doesn't, you probably have a problem with your udev rules, the install, or permissions.
If these work, your .profile $PATH needs work. Checking your $PATH is easy.
In terminal:
echo $PATH
Should return something like:
/home/USERNAME/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/'USERNAME'/android-sdk-linux_x86/platform-tools
Great post!,
ReplyDeletefor those who looking for windows utilities see Root nexus s on windows