Friday, March 25, 2011

Chrome OS Cr48 3G Verizon and outside USA

You can get you Cr48 to work on 3G outside USA.

Firstly it will only work with some carriers, and some APNs - check them here.

Then, put it into Developer Mode, and then follow these instructions.

I located a SIM that used a supported APN, and successfully connected.

Wednesday, March 23, 2011

Download Android Fastboot Tool

While updating my HTC Magic from Donut (1.6) to Froyo (2.2x) I needed to try the fastboot flash method. For some reason its not installed with the SDK, so I got it from here

update: broken link fixed.

Saturday, March 19, 2011

Updating HTC Magic to Froyo 2.2

I was trying to update my HTC Magic / Sapphire 34B from 1.6 to Froyo 2.2 but got

"E: Error in /sdcard/ (Status 7) Installation aborted."

It turns out that my bootloader was too old at 1.33.0004. To confirm if this is the case, shutdown your phone, then restart by holding down the back button and on button together. It takes about 3 seconds and then you get the fastboot screen.

check bootloader version: if its 1.33.0004 then need to update. The picture above shows mine after updating.

It also tells you if you have 34A or 34B phones. Then press 'menu' to shut the phone down.

Next you need to get a later bootloader from

Copy this to the phone's SD card, and rename it to ''.

Then boot into recovery mode by holding down home and power until you get the warning triangle, which takes about 13 to 15 seconds on my phone. Then, press home and power again, and you should get the recovery console. Using the trackball move down to select 'apply', and then press the rollball to start things off.

It won't take long but there will be a couple of reboots. Eventually though you are returned to the phone and it'll be running the new boot loader.

Next get Froyo for the Magic from

and once again copy to the phone's SD card and rename to Once again boot to the recovery console (home + power for about 15 seconds), select 'apply', and then press the rollball to start things off.

Sit back and wait because it'll take a while, and possibly a few reboots. Eventually though you are returned to the phone and it'll be running Froyo

I have to say, its pretty nippy, and because the available memory is so small, you don't all the crapplications that some later phones are lumbered with. It does have a music player

Install MyTracks, Google Authenticator and Google Device Policy Management and you are good to go.

Tuesday, March 8, 2011

Samsung Galaxy Tab - pairing Bluetooth Keyboard and Mouse

Samsung have been kind enough to include a Bluetooth HID profile in the Galaxy Tab.

=== update === with the Galaxy S phone as well. Same instructions.

I've got 2 Bluetooth keyboards: an Apple and an iGo Stowaway. I used the Stowaway.

  1. Turn on Bluetooth on the Galaxy Tab

  2. Go into Settings > Wireless and Network > Bluetooth Settings

  3. Make the Stowaway Discoverable:

    Press the Ctrl and Fn keys together until the green LED (above the key) flashes once per second.

  4. Press 'scan devices'

    and it should find your keyboard.

  5. Enter the numbers shown, by holding down the Blue (Left) Fn key and the appropriate keys. When you've done the 8 digits, with the Blue FN key held down press the Enter key. You MUST hold down the Blue FN key for the keycode to be accepted.

  6. And then you're paired

  7. So we'll start a App and do some typing!

    A really cool thing is that once you've got started, you can press the back button on the Galaxy Tab, and this removes the on-screen keyboard - more real estate.

  8. Next for a mouse. Go through the same stages to get to scanning for devices, make your mouse discoverable, on the Logitech bluetooth mouse I have you press the button on the bottom, and follow the on-screen instructions.

  9. This gives you a cursor, which you can move around, selecting and clicking just like a regular laptop.

    Left click selects or launches and App, and right click is like pressing the back button.

Friday, March 4, 2011

Resolving Orphaned Calendars on iPhone

Had a problem orphaned calendars on my iPhone which kept buzzing at weird hours, but I wasn't syncing anything from iTunes. So I created a new calendar in iCal, and then sync'd just it from iTunes. This got ride of the orphaned calendar.

But it seems iPhone doesn't like not having a calendar. If you try to have no calendars on your iPhone, it will create a new empty one called 'Calendar'.
which will get sync'd over to your Mac after syncing your iPhone.

Tuesday, March 1, 2011

Squid on OSX: inverting images with redirect by content modification

Squid: inverting images with redirect by content modification.

I came across this script to invert images using Squid proxy, and I thought it would be a fun April fool joke for my family.

To get it working had a few dependencies:

0. Install XCode!
  1. Install or compile ImageMagick to do the manipulation of the images.
  2. Enable web serving to serve the inverted images from the Mac running Squid
  3. Modify the script to fetch the images and invert them because we need to also do this for png files, also the example is for linux and this is for OSX
  4. Modify squid.conf to use the redirector
  5. Bonus points for a CRON script that deletes the image files regularly

1. Follow the link above to install ImageMagick

2. To enable web sharing, go to System Preferences > Sharing and click the box next to Web Sharing.

The, I went into my home folder and found the Sites folder. This is where personal web sites are hosted. I created a folder call UpsideDown, which is where I download the images to, invert them, and the serve them back to the client.

I discovered that Squid, if it uses upstream proxy, which I do, likes to fetch from FQDN. Since I already run local DNS, I added an entry to the proxy, and made sure that the server was on the 'direct' list.

At this point, images in UpsideDown are being served by the URL

3. Next the script. First I added a section to handle png images such as the Google logo. Then I fixed up the paths.

Big thing! Squid runs as 'nobody' which means the images are downloaded and inverted as nobody. But the web server serves as the user. So thats why you need the 'chmod' to add everyone to be able to read the images.

    $count = 0;
    $pid = $$;
    while (<>) {
    chomp $_;
    if ($_ =~ /(.*\.jpg)/i) {
    $url = $1;
    system("/usr/local/bin/wget", "-q", "-O","/Users/user/Sites/UpsideDown/$pid-$count.jpg", "$url");
    system("/usr/local/bin/mogrify", "-flip","/Users/user/Sites/UpsideDown/$pid-$count.jpg");
    system("/bin/chmod", "774", "/Users/user/Sites/UpsideDown/$pid-$count.jpg");
    print "$pid-$count.jpg\n";

    elsif ($_ =~ /(.*\.gif)/i) {
    $url = $1;
    system("/usr/local/bin/wget", "-q", "-O","/Users/user/Sites/UpsideDown/$pid-$count.gif", "$url");
    system("/usr/local/bin/mogrify", "-flip","/Users/user/Sites/UpsideDown/$pid-$count.gif");
    system("/bin/chmod", "774", "/Users/user/Sites/UpsideDown/$pid-$count.gif");
    print "$pid-$count.gif\n";


    elsif ($_ =~ /(.*\.png)/i) {
    $url = $1;
    system("/usr/local/bin/wget", "-q", "-O","/Users/user/Sites/UpsideDown/$pid-$count.png", "$url");
    system("/usr/local/bin/mogrify", "-flip","/Users/user/Sites/UpsideDown/$pid-$count.png");
    system("/bin/chmod", "774", "/Users/user/Sites/UpsideDown/$pid-$count.png");
    print "$pid-$count.png\n";


    else {
    print "$_\n";;

When the script is done, save it as, say,, and give it permissions:

    chmod o+x

4. Modify squid. Quite straight forward, you need to add the line

    url_rewrite_program /usr/local/squid/etc/

changing the path to suit where your redirect script is.

One thing to note is that not all images you get on the internet are .jpg etc. Google often serve in different formats.

5. You'll need to control the disk space used if this runs for any length of time. So create a script to delete the files in the UpsideDown directory:

    rm ~/Sites/UpsideDown/*

and then make a CRON job to run it regularly. I use CronniX.