Android Dev Phone, Ubuntu and VMWare Server
Compiling the source code for creating your own Android build is not supported within a Windows operating system (I don’t know if it is possible by the use of Cygwin). Because my notebook is running Windows XP, I use VMWare Server 2.0 which runs a Ubuntu 8.10 (Desktop) as virtual machine.
VMWare makes it possible to connect USB devices inside your virtual machine. Because I want to connect my Android Dev Phone to Ubuntu, I performed the following steps to make that possible.
VMWare hardware configuration
When creating a virtual machine (or before starting the virtual machine) make sure that the USB controller is added to the hardware list.

If this is not the fact. Add the USB Controller by choosing Add hardware and select the USB Controller from the Hardware type list.
Sharing the USB device
Connect your Android Dev Phone to your computer and start the Ubuntu Virtual Machine by pressing the Play button inside the VMWare Server web interface. When booting the Virtual Machine you will notice that a new icon (with an USB sign) is placed on the toolbar inside the VMWare Web Interface next to the Restart button. When you click on this icon a context menu will be shown with a list of devices that are plugged inside the host OS (in my case connected to Windows XP).

Mark the checkbox in front of the High Android Phone to make it available inside Ubuntu.
Udev configuration
You can perform a check, to see that the Android Dev Phone is shared with Ubuntu, by opening a Terminal (inside Ubuntu. Open a VMWare Remote Console to make use of the Ubuntu) and type the following command
lsusb
A list of USB devices will be shown. For example:
Bus 002 Device 001: ID ld6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 004: ID 0bb4:0c02 High Tech Computer Corp.
Bus 001 Device 001: ID ld6b:0002 Linux Foundation 2.0 root hub
The Android Dev Phone is the device with the name High Tech Computer Corp (HTC). Make a note of the first part of the device ID (in this case 0bb4) because this is needed for the udev rule.
Create a new file (as root)
sudo gedit /etc/udev/rules.d/50-android.rules
with the following content
SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666"
Make sure that the text after {idVendor} is the same as the device id found when using the lsusb command. Save and exit the editor
To make execution of the rule possible, perform a chmod
sudo chmod a+rx /etc/udev/rules.d/50-android.rules
To make the rule active, restart udev
sudo /etc/init.d/udev restart
Final check
To check if the device is available use the adb tool (which is part of the Android SDK. Download and installation instructions at http://code.google.com/android)
adb devices
This will return a list of attached devices.
List of devices attached
HT845GZ51782 device
You should now be able to use the different tools of the Android SDK (and application deployment with the use of Eclipse) within Ubuntu running inside VMWare Server.
Read more from the Uncategorized category. If you would like to leave a comment, click here: 9 Comments. or stay up to date with this post via RSS, or you can
Trackback from your site.
Social Bookmark :
Technorati,
Digg,
de.licio.us,
Yahoo,
Blinkbits,
Blogmarks,
Google,
Magnolia.
Leave a Comment
9 Comments so far
Thank you so much for this post!!!! I tried installing my app on the device in Windows but was never successful. Googled for days but every suggestion failed. I used vista (64 bit) and it never picked up the drivers (i guess) so the phone was never recognized by adb even though I could access the sd card from My Computer. Anyways, I run Ubuntu on a different partition so I switched to that, did the udev thing and it worked like a charm after I did udev restart. Most sites with similar posts don’t tell you to restart udev. So thank you!!!
I just wanted to add that I was having a problem where lsusb showed the device, but “adb devices” was blank. I fixed it by running “adb kill-server”, then running “adb devices” again, this time making sure I was running it as root. now it shows up!
[...] [...]
Hi there
I am using vmware 6.5 and I running ubuntu as a virtual machine.
I have followed the instructions, but it is not working for me.
root@ubuntu:/home/blackpantera# lsusb
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 003: ID 0bb4:0c02 High Tech Computer Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
root@ubuntu:/home/blackpantera# sudo gedit /etc/udev/rules.d/50-android.rules
(gedit:6249): Gtk-WARNING **: /usr/lib/gtk-2.0/2.10.0/engines/libaurora.so: wrong ELF class: ELFCLASS64
root@ubuntu:/home/blackpantera# sudo chmod a+rx /etc/udev/rules.d/50-android.rules
root@ubuntu:/home/blackpantera# sudo /etc/init.d/udev restart
* Loading additional hardware drivers… [ OK ]
root@ubuntu:/home/blackpantera# adb devices
bash: adb: command not found
root@ubuntu:/home/blackpantera# adb kill-server
bash: adb: command not found
Any help would be greatly appreciated
Looks like the adb utiltity is not inside the $PATH variable. Make sure the directory is inside your $PATH.
Thank you I will try that.
Hi Johan
I am new in linux, I am been searching how to fix the adb utility “PATH” without luck.
Any help would be greatly appreciated
Don’t understand what the exact problem is with setting the PATH variable. But maybe this can help.
There are two ways to get a binary version of the adb utility. One way is by compiling the source, the binary version will be found at (in my case) ~/mydroid/out/host/linux-86/bin.
The other option is to download the Android SDK (from developer.android.com) I extract the contents of the archive file to my home folder so that the adb utility will be inside the ~/android-sdk-linux-x86-1.5_r2/tools
To make one of this location part of the $PATH variable, so that the adb utility can be found system wide you need to export the $PATH variable. You can do that temporary inside a terminal. The new $PATH variable value will exists inside the terminal (and not in other ones) and will be there until you close this terminal. This can be done by executing the following command inside the terminal
Own builded version
export PATH = $PATH:~/mydroid/out/host/linux-86/binor the Android SDK version
export PATH = $PATH:~/android-sdk-linux-x86-1.5_r2/toolsIf you don’t want to set the PATH everytime you open a new terminal, you can also place this export command inside the .bashrc file which is inside your home directory. Open the file inside your editor and add the export line (which are given above) at the end of the file. Save the file and exit the texteditor. Every new terminal you will open now will use the new $PATH variable.
To check the contents of the $PATH variable just execute the
echo $PATHcommand to show the directories which are part of the PATH.
Hope this will give you a solution / some tips for your adb problem
Thanks ! I re-used part of your wordings in providing an ADB setup guide for the new Archos 5 Internet Tablet device. See my post here:
http://forum.archosfans.com/viewtopic.php?f=47&t=26483