External Links

HowTo's

Use Eclipse and ADB with wireless adb on Linux

posted Jan 14, 2012 1:50 PM by Carlos Silva

Hi, here's the thing, I have a Nexus One, a Samsung Galaxy Tab 7" and a Motorola Xoom. And as you may know, I happend to be an Android programmer and I like to test my applications on every fisical device I have. My problem is that I have  a laptop that I use for developing and that laptop only has 3 USB ports (sucks ). Anyway, I decided I wanted to have all the 3 devices connected all the time so I can decide when I test an application from Eclipse, I'm able to choose which one to install the application to. So here's what I got:

1st: Install Wireless ADB from the Market on every device you want to test your applications.

2nd: When you activate Wireless ADB on a device, it will toast the address you should connect to. Take a note of it.

3rd: Fire up your favorite editor and edit your $HOME/.bash_profile or $HOME/.bashrc (This depends on the Linux distribution)

4th: Add this piece of code and adapt accordingly:

XOOM_ADB_ADDR="192.168.1.77:5555"

function fadbxoom() {

    adb devices | grep -q $XOOM_ADB_ADDR || adb connect $XOOM_ADB_ADDR

    adb -s $XOOM_ADB_ADDR $@

}

alias adbxoom="fadbxoom $@"

What this code does is create a function on your environment that checks if the device is connect wirelessly and if not connects to it. After that, it just executes the command you asked for (eg. logcat). It also creates an alias to that function so that the command is similar to the normal one. So, to use adb with my Xoom I just have to type "adbxoom logcat" pe.

You can duplicate this piece of code as many times as you want for all the devices you have, in my case, I have 3 of these: adbxoom, adbn1 and adbtab .

To this code take effect on the current shell, just type ". ~/.bashrc" or ". ~/.bash_profile" depending on the file you edited.

5th: If you have more then one device, Eclipse will always ask to each one you want to deploy the application, but if you have only one and still want to choose between a fisical device and an AVD, the task gets a little complicated. Heres how you do it:

On the Run button on Eclipse (the green play button), press the dropdown button and choose "Run Configurations". Next select the "Target" tab on the right and choose the "Manual" Deployment Target selection mode. You're Done 

 

Now you don't have to mess with cables, connecting a bunch of them to your PC and being switching them all the time because you don't have a USB Hub.

VMware Server to Citrix XenServer

posted Jan 14, 2012 1:49 PM by Carlos Silva

I had a private server running VMware Server 2.0.2 but the lack of updates to this product made me try to switch to another platform. First thing I tried was to get VMware ESXi running on the same server. The problem with this is that ESXi has very limit support to "White Boxes", as in, personal computers. So I couldn't get to install ESXi.

So I searched for alternatives. One thing that was always comming up was Citrix XenServer, so I decided to give it a try. All I can say is, this thing *rocks* !!!! :D

I just had one little problem with my network card (Realtek 8168 PCIExpress), but it was easily solved by adding this to /etc/modprobe.conf:

options r8169 use_dac=1

With this simple line, I had my network working and the Citrix XenServer was operational! Now let's migrate my old VM to this new box. The old VM was a Windows XP x86.

Googleing a bit, led me to find XenConvert, an utility made by Citrix to convert several types of VMs to XenServer. It had support to VMDK (VMware Disk format) so I dicided to use it.

It was a complete fail. All my tries to import the disk to XenServer worked but the disk was never readable and the VM wouldn't boot no matter what.

The solution I found was to convert the VMDK file to a VHD file (Virtual Hard Disk used by Microsoft Virtualization server) using XenConvert, move this file to the server, and import it directly on the server. But now you say: "But XenServer can't import a VHD file". That's where the news is :)

Looks like Acronis has a free tool that makes this happen and it's called vhd2xen. The link is here.

I downloaded vhd2xen and installed it on the server. Next I just imported the vhd using this simple command:

/usr/lib/Acronis/VHD2XEN/vhd2xen.sh <path_to_vhd_file>

All it was asked was what Local Storage on the XenServer I wanted the disk in and the Disk magically appeared in there :)

All was needed was to create a new VM in XenCenter and assign the imported disk to it and BUM, it boots and the disk is fine! :)

 

Hope this can help somebody in the same situation as I was.

1-2 of 2