Archive for August, 2010

First Version of Mastermind on GitHub

Sonntag, August 29th, 2010

mastermind_screen

Today I created a first version of a mastermind game for android and loaded it up to GitHub. The program gave me the opportunity to experiment with views, events, handlers, menus and file resources on android. I tested it on a Samsung Galaxy S with Android 2.1.

Debugging on an Android Mobile Phone

Donnerstag, August 19th, 2010

My OS on the PC is Ubuntu Lucid Lynx. My phone is a Samsung Galaxy S, it runs Android 2.1.

  1. Define an appropriate udev-rule. In my case I created a file  /etc/udev/rules.d/51-android.rules with the following content: SUBSYSTEM==“usb“, SYSFS{idVendor}==“04e8 „, SYSFS{idProduct}==“681c“, MODE=“0666″, OWNER=“myuser“. The vendor and the product id can be found by calling lsub.
  2. Now the usb service must be restarted: sudo service udev restart
  3. Go to the tools subdirectory in your androidsdk folder and restart the adb server: ./adb kill-server, ./adb start-server
  4. Switch on the usb-debugging on the mobile phone and connect the phone to the pc.
  5. If you now enter ./adb devices you should see your phone in the listing like the following:
    List of devices attached
    9000b9d40c16    device
  6. In your eclipse debug-configuration set the target selection to manual. This let you select your online device when you start your program for debugging.
  7. Don’t forget to set android:debuggable=“true“ in your application’s manifest!

That’s it. Now you can set breakpoints and watch the state of your application.