Saturday, August 21, 2010

A couple of useful Mac OS commands

open .

This opens the current directory in a new Finder window.

open -a Preview *.jpg

This opens a new Preview window with all files in current directory ending in 'jpg'.



Thursday, August 5, 2010

Experimenting with google command line utilties

It is really quite nice to be able to perform google services actions from the command line. I've often, in the past, wanted to control one GUI based app or another via a command line. It never was a high enough priority to implement that sort of thing though. I can see this being useful when I want to quickly blog about some new bugget of information I run into. Now I need to find this sort of thing for twitter.

I first posted this message using the google command line tool. I've gone back and fixed a typo plus added a link back to the Google Blog entry which introduces these tools.

Sunday, July 18, 2010

Mac OS X Network Utilities

I ran the "Network Utilities" tool found in my Mac's "Utilities" folder. The "Sent Packets" and "Rcvd" packets are counted since the last system boot.

The way to see the time since last boot is to enter "uptime" in a terminal window.

My uptime as of writing this post is 10 days.

Thursday, June 10, 2010

How to deal with an Android emulator not seen by DDMS or ADB

Sometimes DDMS will not detect that I have the android emulator running. I have found that to solve this problem, I need to restart the emulator with "-wipe-data" parameter. This launches the emulated device with default settings.

"adb -devices" was also failing to show the emulated device.

When you do not specify '-wipe-data', the state of the emulated device is the same as it was last time the emulator was running.

Tuesday, June 8, 2010

Android Instrumentation Testing - A Permission Denial Issue

On a project I am working with, I ran into an issue where the android instrumentation test runner (android.test.InstrumentationTestRunner) was complaining that my test package's signature did not match the signature for the target package. I pulled my hair out for a while trying to figure out what was going on.

Here is the error I got:

INSTRUMENTATION_STATUS: id=ActivityManagerService
INSTRUMENTATION_STATUS: Error=Permission Denial: starting instrumentation ComponentInfo{com.myapp.tests/android.test.InstrumentationTestRunner} from pid=2036, uid=2036 not allowed because package com.myapp.tests does not have a signature matching the target com.myapp
INSTRUMENTATION_STATUS_CODE: -1
java.lang.SecurityException: Permission Denial: starting instrumentation ComponentInfo{com.myapp.tests/android.test.InstrumentationTestRunner} from pid=2036, uid=2036 not allowed because package com.myapp.tests does not have a signature matching the target com.myapp


Solution:

It turned out that the test package's make file had referenced "LOCAL_CERTIFICATE := shared" whereas the target package's makefile was missing this line. I just needed to comment out the LOCAL_CERTIFICATE line so that it matched the target package's makefile.

Apparently, if no certificate directives are given in the makefiles, the android build system defaults to a debug certificate. I have not needed to drill down into the whole signatures topic so far, but this information clears up how to get around the permissions denial issue i was seeing. A google search brought up some information, but not for this specific case. One set of links that got me started though is at a mailing list archive post on osdir.com.

Android's Build Cookbook has some good information mentioning the LOCAL_CERTIFICATE value.

Tuesday, April 20, 2010

Android Package Manager Info

Just spent a dozen minutes or so trying to track down this command line.

adb shell pm

When you type this it will give help information about how to deal with application packages on your Android device. I find the following command line particularly helpful in setting myself up to use the instrumentation test runner tool in the Android SDK.

adb shell pm list instrumentation

Tuesday, February 9, 2010

You Are an Explorer

Saw this on reddit this morning. Like it!

Thursday, January 28, 2010

The Cadware Group and Localization

...or War Stories on the Localization Front

I once worked for a now defunct start up, The Cadware Group, Ltd., that suffered from having software that could not easily be ported into the Japanese market. I know that it at least required a lot of manual labor and added time to find hard coded strings and replace them with variables that could be read from resource files. I wasn't directly involved in the coding for that project, but I recall that it did require some re factoring to work in the Japanese market.

This was back in the days of MS-DOS and OS/2. I recall that Windows 3.0 was alive then.

Wednesday, January 27, 2010

Hammering Home the Value of Global Built Software

Android Apps Are Priced Higher in Europe Than In The U.S.

Although Europe just represents 20% market share for the Android market, it would benefit software authors to price their products in local currency to reap higher profits. This hammers home the value proposition for writing Android apps which are global aware and which can be easily localized into different locales.

In many of my projects both as tester and as developer, I spent a fair bit of time making sure that my product could be taken into markets outside of the U.S. I know that Microsoft earns a great deal of its profits from international markets.

Tuesday, January 26, 2010

A Closer Look at Dropbox


I have been using a neat web service for over a year now named Dropbox. It is a place on the web where I can keep my files in sync between several computers plus copies on their servers. I find myself mainly using it to transfer files from my Windows PC to my MacBook Pro. During the setup process I setup a login ID for Dropbox, so that it knows how to sync up more than one computer for me. The PC or Mac based software I use gets signed in with my Dropbox ID.

My Dropbox files can be accessed from a secure web site for times when I am not using one of my own computers.

I find that using Dropbox to share files is easier for me that using a USB stick. Partly this is due to not always having a USB stick handy. Another factor is that by using Dropbox, I can stay organized. For the networks I use, I find that getting my files all synced up between two computers takes more time than using a USB key. However, I am usually not in a rush and find Dropbox' convenience more valuable.

I did some reading on the their site covering tips and tricks. Among them is a feature where the last 30 days of changes are tracked, so that it is possible to get back a copy of file which I have either erased or made changes to. That is cool. The way the Dropbox share works is that if I delete a file in the Windows Dropbox folder, then the Mac's Dropbox folder dumps the same file. Knowing that I can get back to the just erased file would come in handy if I ever goof.

Dropbox has client software for Windows, Max and Linux in addition to the web interface and some additional devices including smart phones.

If you're interested in learning more and getting yourself a free Dropbox account, I would appreciate it if you would use this link, dropbox, so that I earn 250MB of bonus storage. The site gives out bonus free space for referrals. Also, don't miss the 'Getting Started' tab on their web site. Once you have completed 5 of the 6 steps you get an instant bonus of 250MB of space.

Saturday, January 9, 2010

First Robotics League Kickoff day

I was fortunate to attend the Seattle area's kickoff event for 2010 FIRST Robotics Competition. I arrived by 6:30 AM local time to join about 1,000 other people in the Mount Lake Terrace High School north of Seattle. At 7:00 we participated in the worldwide simulcast on NASA TV for the main kickoff location in Manchester, New Hampshire.

A couple of days ago, my son and I went to a pot luck event celebrating the Fall's FIRST Lego League season. During the presentation we were invited to go to the Saturday kick-off event if we're interested in mentoring this year. I've never really been involved in Robotics, but I figure I'll give this a try. I had a blast today learning about this year's challenge and starting to learn how the competition is set up and whats possible as far as robot design and implementation.