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.
Archive for the ‘Andoid’ Category
First Version of Mastermind on GitHub
Sonntag, August 29th, 2010Debugging on an Android Mobile Phone
Donnerstag, August 19th, 2010My OS on the PC is Ubuntu Lucid Lynx. My phone is a Samsung Galaxy S, it runs Android 2.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.
- Now the usb service must be restarted: sudo service udev restart
- Go to the tools subdirectory in your android–sdk folder and restart the adb server: ./adb kill-server, ./adb start-server
- Switch on the usb-debugging on the mobile phone and connect the phone to the pc.
- If you now enter ./adb devices you should see your phone in the listing like the following:
List of devices attached
9000b9d40c16 device - 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.
- 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.