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.
Friday, 25 March 2011
Tuesday, 22 March 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 developer.htc.com/google-io-device.html.
update: broken link fixed.
update: broken link fixed.
Sunday, 20 March 2011
Some useful OSX Command Line tips
Monitor how and when a process accesses files with opensnoop
October 6th, 2010 - Command Line, Mac OS X
You can watch what a process is doing with your filesystem by using the opensnoop command.
There’s two ways to specify which application to watch, you can use either the process name which is obviously easier, or use the processes numerical id:
sudo opensnoop -n applicationName
To track Safari, we’d use:
sudo opensnoop -n Safari
Or you can use the process ID:
sudo opensnoop -p PID
The PID is the process ID, you can get this by using the ps command with grep to grab a processes id:
ps aux|grep iTunes
Then use the resulting PID with opensnoop:
sudo opensnoop -p 4621
Likewise, you can monitor what processes are accessing a specific file with the same command:
sudo opensnoop -f filename
For example, watch what is accessing /etc/hosts
sudo opensnoop -f /etc/hosts
Compress all files in a directory, maintain original files
You can also use the above command to compress all of the files within a directory, but still maintain the original files or folders as uncompressed. The command is practically identical, just leave out the -m flag:
for item in *; do zip "${item}.zip" "${item}"; done
seeing your path:
echo $PATH
http://osxdaily.com/2010/08/22/install-watch-command-on-os-x/
We are using “curl” a command line “broswer”
curl -O http://ktwit.net/code/watch-0.2-macosx/watch
Make “watch” executable
By doing this we tell Mac OS that this is a program that can run
chmod +x watch
Test the program
Let’s make sure everything is in working order.
./watch
Install “watch”
Optional: By following this next step we are placing watch into a system location that will allow you to run it from any location in the Terminal (You will be prompted for your password)
sudo mv watch /usr/local/bin/
You can quickly merge any two directories within Mac OS X by using the command line tool ditto. Launch the Terminal and use the following syntax:
ditto directory1 directory2
http://cdto.googlecode.com/files/cdto_2.3.zip
MBA: Mostly bloody awful
October 6th, 2010 - Command Line, Mac OS X
You can watch what a process is doing with your filesystem by using the opensnoop command.
There’s two ways to specify which application to watch, you can use either the process name which is obviously easier, or use the processes numerical id:
sudo opensnoop -n applicationName
To track Safari, we’d use:
sudo opensnoop -n Safari
Or you can use the process ID:
sudo opensnoop -p PID
The PID is the process ID, you can get this by using the ps command with grep to grab a processes id:
ps aux|grep iTunes
Then use the resulting PID with opensnoop:
sudo opensnoop -p 4621
Likewise, you can monitor what processes are accessing a specific file with the same command:
sudo opensnoop -f filename
For example, watch what is accessing /etc/hosts
sudo opensnoop -f /etc/hosts
Compress all files in a directory, maintain original files
You can also use the above command to compress all of the files within a directory, but still maintain the original files or folders as uncompressed. The command is practically identical, just leave out the -m flag:
for item in *; do zip "${item}.zip" "${item}"; done
seeing your path:
echo $PATH
http://osxdaily.com/2010/08/22/install-watch-command-on-os-x/
We are using “curl” a command line “broswer”
curl -O http://ktwit.net/code/watch-0.2-macosx/watch
Make “watch” executable
By doing this we tell Mac OS that this is a program that can run
chmod +x watch
Test the program
Let’s make sure everything is in working order.
./watch
Install “watch”
Optional: By following this next step we are placing watch into a system location that will allow you to run it from any location in the Terminal (You will be prompted for your password)
sudo mv watch /usr/local/bin/
You can quickly merge any two directories within Mac OS X by using the command line tool ditto. Launch the Terminal and use the following syntax:
ditto directory1 directory2
http://cdto.googlecode.com/files/cdto_2.3.zip
MBA: Mostly bloody awful
Friday, 18 March 2011
Updating HTC Magic to Froyo 2.2
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyxDvVHQQ7jluINj_z7LmBVecIRFiziDB3IEE7SdohxntU5c7UfJ1Ga_sPQKwHWtrEHZ0DQCPnUePqWskfGbuQy3k_vSL0WJcGsuB1pzpqKWJKqG6TnDaw0sAOF5fmzagfXs5QDgWBoOU/s400/2011-03-18+09.45.42.jpg)
I was trying to update my HTC Magic / Sapphire 34B from 1.6 to Froyo 2.2 but got
"E: Error in /sdcard/update.zip (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.
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_m77QIy29ECB3L22No_xoIlkZapDZWtDOXjDEnA73rnZk_FkZqnm-s751AVxVszCPAdpYZym_-BQLugHNGbgsp7eu6mT72dFnVz_IN4bWpbzb3caYfv12tqfTA0aBARqEd3-z5yAAwbg/s400/2011-03-19+10.43.34.jpg)
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 android.clients.google.com/packages/ota/vodafone_vfpioneer/126221163a9c.hboot-1.33.0013.vfpioneer.12622116.zip
Copy this to the phone's SD card, and rename it to 'update.zip'.
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 sdcard:update.zip', 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 android.clients.google.com/packages/ota/vodafone_vfpioneer/735b0bf4f2e4.signed-vfpioneer-FRG83D-from-DRC92.735b0bf4.zip
and once again copy to the phone's SD card and rename to update.zip. Once again boot to the recovery console (home + power for about 15 seconds), select 'apply sdcard:update.zip', 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
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEguUCD1P4XKZ5kepv4IYNT1eiR0EkQTw7kHgXXhgZMwQCZlFQf-imsqV-OEAflJ68gKGcguXVGAJY4DJspUSNJcDKqgFAqFov3PNLtqRCb6jyraf2zHE1otCGg0V6DlbyLHTTik8272T60/s400/froyo+FRG83D.png)
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.
Monday, 7 March 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.
=== 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.
- Turn on Bluetooth on the Galaxy Tab
- Go into Settings > Wireless and Network > Bluetooth Settings
- Make the Stowaway Discoverable:
Press theCtrl and Fn keys together until the green LED (above the key) flashes once per second. - Press 'scan devices'
and it should find your keyboard. - 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.
- And then you're paired
- 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. - 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.
- 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.
Thursday, 3 March 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.
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'.
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQqNtlT-APRKgneEcCLwUgrRw4UAjMY4C9ntOvVI_G_cH483l1A4HzzR4jMhCvfWeb4aU4uk9mhxp1SffZTZTuGkkexTp3c2Ukchwlp9D7bhkJ8jMdhYuGg_v7v0ST1SHRCym5d6TFuhQ/s400/Screen+shot+2011-03-04+at+17.32.04.png)
which will get sync'd over to your Mac after syncing your iPhone.
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4cZ69T6-CusJYqQAuijH65813clX_qqVIEP5UnYgoeVDA9JzmSU8qPEZE-HE9cwlIrn1QYoL7ULMB8dJ-1LxBSvdkKql3X-7B_HnCvPM3FQZGsJspCtR_r9AKIjNzoV9hcL2w0TAqcJw/s400/Screen+shot+2011-03-04+at+17.35.34.png)
Tuesday, 1 March 2011
Squid on OSX: inverting images with redirect by content modification
Squid: inverting images with redirect by content modification.
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVu0Baks6r3t_15dTQtjIMxN8GK1F8uBzhXlTFXGueU2sPIRN1kCwQ28b7aIFFr5-4VTFKkN2zOtaeDlgpIxgyIPBYc-PehHo0lFH8BDiQbmcliu0LxkY_NI2iOI5hG_wh9qdklRM9EgI/s400/Screen+shot+2011-02-26+at+23.17.12.png)
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. 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.
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgTtab5cyqCUbgDI1x2jNL4RTiLf2rT0Yr77KYQRU0Jpy4AZwQlZvAJAIMzOJQeYqc4s1crfZaYxyqvNV8A0ZucvzZfziqzdkGVMYwnG_LBcuA5zpwSagsmkPtjKXYPyotxw9zsmSWMNQY/s400/Screen+shot+2011-02-26+at+23.00.52.png)
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.
When the script is done, save it as, say, redir.pl, and give it permissions:
changing the path to suit where your redirect script is.
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVu0Baks6r3t_15dTQtjIMxN8GK1F8uBzhXlTFXGueU2sPIRN1kCwQ28b7aIFFr5-4VTFKkN2zOtaeDlgpIxgyIPBYc-PehHo0lFH8BDiQbmcliu0LxkY_NI2iOI5hG_wh9qdklRM9EgI/s400/Screen+shot+2011-02-26+at+23.17.12.png)
One thing to note is that not all images you get on the internet are .jpg etc. Google often serve in different formats.
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmIQPhyphenhyphenFa9B3dtYNFdtwYGZdXRL1CwvtOYL50e48cOsgM5KL8DbErNCY9OQv7da7x2GnzN2Z9xKj0JvF9TeYLgDuNaePG_gVvn6LBMQVe8ai-pQ6dXg4AECBxAKj87KiE6u0jSpjPFW3Q/s400/Screen+shot+2011-02-26+at+23.18.40.png)
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:
and then make a CRON job to run it regularly. I use CronniX.
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVu0Baks6r3t_15dTQtjIMxN8GK1F8uBzhXlTFXGueU2sPIRN1kCwQ28b7aIFFr5-4VTFKkN2zOtaeDlgpIxgyIPBYc-PehHo0lFH8BDiQbmcliu0LxkY_NI2iOI5hG_wh9qdklRM9EgI/s400/Screen+shot+2011-02-26+at+23.17.12.png)
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!
- Install or compile ImageMagick to do the manipulation of the images.
- Enable web serving to serve the inverted images from the Mac running Squid
- 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
- Modify squid.conf to use the redirector
- 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.
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgTtab5cyqCUbgDI1x2jNL4RTiLf2rT0Yr77KYQRU0Jpy4AZwQlZvAJAIMzOJQeYqc4s1crfZaYxyqvNV8A0ZucvzZfziqzdkGVMYwnG_LBcuA5zpwSagsmkPtjKXYPyotxw9zsmSWMNQY/s400/Screen+shot+2011-02-26+at+23.00.52.png)
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
- http://server.domain.com/~user/UpsideDown/image.jpg
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.
- #!/usr/bin/perl
$|=1;
$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 "http://server.domain.com/~user/UpsideDown/$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 "http://server.domain.com/~user/UpsideDown/$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 "http://server.domain.com/~user/UpsideDown/$pid-$count.png\n";
}
else {
print "$_\n";;
}
$count++;
}
When the script is done, save it as, say, redir.pl, and give it permissions:
- chmod o+x redir.pl
- url_rewrite_program /usr/local/squid/etc/redir.pl
changing the path to suit where your redirect script is.
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVu0Baks6r3t_15dTQtjIMxN8GK1F8uBzhXlTFXGueU2sPIRN1kCwQ28b7aIFFr5-4VTFKkN2zOtaeDlgpIxgyIPBYc-PehHo0lFH8BDiQbmcliu0LxkY_NI2iOI5hG_wh9qdklRM9EgI/s400/Screen+shot+2011-02-26+at+23.17.12.png)
One thing to note is that not all images you get on the internet are .jpg etc. Google often serve in different formats.
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmIQPhyphenhyphenFa9B3dtYNFdtwYGZdXRL1CwvtOYL50e48cOsgM5KL8DbErNCY9OQv7da7x2GnzN2Z9xKj0JvF9TeYLgDuNaePG_gVvn6LBMQVe8ai-pQ6dXg4AECBxAKj87KiE6u0jSpjPFW3Q/s400/Screen+shot+2011-02-26+at+23.18.40.png)
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.
Subscribe to:
Posts (Atom)