Showing posts with label Linux. Show all posts
Showing posts with label Linux. Show all posts

Sunday, December 19, 2010

Setting up Ubuntu 10.10 for Android device debugging

I'm flabbergasted that Skype does not work on the Samsung Vibrant phone. The phone is running Android 2.1 Update 1 (whatever that is). Skype works on a number of other Android 2.1 phones, but not the Vibrant.

So then I got to thinking, maybe I can attach an Android debugger to Skype and get more info that I can send to Skype support?

Okay, sounds like a fun project with the little time I can squeeze in between work and family duties.

Kudos to this link that pretty much had all the steps to setup my Linux laptop to be able to debug my Android phone: http://coffeecokeandcode.blogspot.com/2009/12/android-debug-bridge-on-ubuntu-910.html

 So here are the steps I took:

  1. Make sure that the Android SDK is installed
  2. Make sure that the OS does recognize the phone when it's tethered to the laptop. To do this:
    1.  From a terminal, run the command "lsusb" and note the list of USB devices
    2. Connect the phone using the USB cable for the phone, and run "lsusb" again. This time you should see one more entry for the phone, in the list of USB devices
  3. Install the rule for the device, as follows:
    1. Create the file /etc/udev/rules.d/51.android.rules:
      1. sudo gedit /etc/udev/rules.d/51.android.rules
    2. Add this entry into the file: SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666"
    3. Replace idVendor with the correct vendor id as per: http://developer.android.com/guide/developin/g/device.html#VendorIds
    4. Save the file
    5. Set the correct file permissions: 
      1. sudo chmod a+r /etc/udev/rules.d/51.android.rules
    6. Restart the udev service
      1. sudo udev service reload
  4. Finally, make sure that the adb service is running as super-user:
    1. cd to wherever you've installed the Android sdk
    2. cd to the tools directory
    3. Kill the service if it is already running:
      1. sudo adb kill-server
    4. Start the adb server as super-user
      1. sudo adb start-server
  5. Now, if everything has been setup correctly, run "adb devices" and you should see your Android device listed

Thursday, September 30, 2010

Linux: Free has a cost

I'm running Ubuntu Linux 10.04 LTS (Long Term Support) on my HP DV6-3010US laptop. Works pretty good for the most part.

EXCEPT, every once in a while, the entire desktop freezes.
No response from mouse/keyboard.
Requiring the infamous 3 finger salute, ie a reboot.

This seems to be a known problem with the 10.04.
Here's a bug report: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/647993

Still digging into this issue.

Sunday, September 26, 2010

Linux: Updates myth busted

There's one Linux myth that I'd like to knock down for good. Updates.

One of the rants of the anti-Windows crowd is on updates. Long story short, its a bogus argument that Linux is any more stable/bug free/secure than Windows.

Having been running Ubuntu Linux for about 2 months now, I am prompted with updates almost every day or every other day. And many of these updates are security related, dealing with buffer overflows, denial-of-service attacks (yes I have Apache running on my Linux box) etc. Here are some examples of recent updates:

Version 0.6.25-1ubuntu6.1:

  * SECURITY UPDATE: denial of service via invalid DNS packet
    - debian/patches/CVE-2010-2244.patch: fail gracefully on corrupt
      packets in avahi-core/socket.c.
    - CVE-2010-2244

  * SECURITY UPDATE: denial of service via invalid DNS packet
    - debian/patches/CVE-2010-2244.patch: fail gracefully on corrupt
      packets in avahi-core/socket.c.
    - CVE-2010-2244

Yes, there was a time till atleast Windows XP days when updates were painfully apparent. But with the auto-update feature in Vista and Windows 7, all that is transparent now. With the occassional polite bubble telling me that my system was rebooted as a result of updates.

Bottom line, Linux (atleast the Ubuntu distribution) is no more update free that Windows. And I would go so far as to say that the updates are much more and much more frequent.

Sunday, September 12, 2010

Getting autocompletion to work in a bash terminal on Ubuntu Linux

Been playing around with Ubuntu/Linux for a while now, and my memory of working on HP-UX is slowly awakening.

One thing that has happened lately is that I'm using the terminal (command window in Windows parlance) more and more. And one of the things I've come to use without thinking on Windows is the autocompletion feature in the command window.

By default, autocompletion is switched off on Ubuntu (not sure on other Linux environments). The way to switch it back on is to uncomment the following lines in the bash.bashrc config file:

# enable bash completion in interactive shells
#if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
#    . /etc/bash_completion
#fi

Restart the terminal window, and voila, autocompletion now works.