Samsung Galaxy Nexus, Sony Xperia, Android

Few weeks ago we decided to change our phones a get something new, nice, proper, expensive and exciting. I went to get my Samsung Galaxy Nexus while Yana decided to choose Sony Xperia S, so we can change our Samsung Galaxy Apollo and Nokia E71 accordingly. As this post is more about Nexus, I will refer to old phones in order to give better feedback from time to time.

First of all, both Nexus and Xperia are of the same high-end grade and approximately same price. Both have big screens, high resolution, lots of storage, dual core CPUs, and so on and so forth, but Nexus comes with Android 4.0!!! That is something really cool. As my Galaxy Apollo was supplied with Android 2.1 and then it was flushed to 2.2 (took a lot of manipulations to do that), I found a lot of new stuff and had to get used to new design of Android 4.0. After few days of playing around I realized that 4.0 is way better and more comfortable to use in many ways. On 2.2 I had to install a lot of different software to replace native ones, like Go Contacts, Go SMS, Go Keyboard and so on, while on 4.0 I like native applications much more.

What I really liked in my new phone is that it is getting system updates directly and updates seamlessly, without any needs to install some software on some Windows PC and do a lot of operations to make it work. It is already 4.0.4 version and runs well. I can’t tell the same about Xperia. Currently it runs Android 2.3.7, while Android 4.0 should come shortly (really waiting for this update, even more that Yana). I had to install System Update utility on a Windows (that I have dual boot on my laptop for games) to run few updates. That pisses me off. Software is getting stuck here and there, no proper logging or feedback and during update I was not sure what is going on and how it will be at the end.

Another good thing in Android 4.0 is how GMail, GTalk, Contacts and other things work. Whenever I am online – I receive updates instantly. For instance I normally notice my new emails faster on the phone than on my laptop. When I alter contact in GMail and check it on the phone strait away – it is already there (matter of 5 seconds). GTalk works perfectly (including voice/video calls). GMap now has cache for offline use and it caches 10miles around a given point, multiple points can be given, so in Cyprus (which is a small island) this is very handy.

One thing that I was confused is MTP for USB connections. This is something new and I don’t really know how to deal with it yet. Android 4.0 allowed be to put USB connections back to old PTP (Camera) mode, so I can mount my phone via USB as a storage device. On Xperia with Android 2.3.7 that was not an option. That caused problems getting photos/videos out of Yana’s phone on to hew laptop. I could see the files, but I couldn’t copy most of them, while I was receiving some unknown error. At the end, being familiar with Android development, I managed to download files by means of ADB (Android Debugger tool). Just use the following command to get the DCIM directory copied over to your laptop (assuming you have android-sdk installed, which contains adb binary):

adb pull /sdcard/DCIM ./

Hopefully, when Android 4.0 update will be rolled out for Xperia, we will have the option to put back PTP mode, otherwise I will have to find a better and easier way to copy over files without installing Windows based PC Companion software or anything of that kind.

Another thing that surprised me is that both of new phones do not have slots of memory cards. Nexus has 16GB and Xperia has 32GB flash cards built-in. This is on top of 1GB RAM and some more internal storage.

Xperia, being a bit newer model and more multimedia kind of phone has much better camera, better display (I was amazed with quality while watching demo movie on it), but on the other size, it has a lot of Sony software with unknown functionality and purpose. I had similar on my Apollo phone and I don’t appreciate the custom software and update logic on such phones. Sometimes vendors want to make things easier for users and they just over do it.

One more reason I am waiting Xperia’s update to Android 4.0 is that I want to see how NFC works. For those unfamiliar with the technology – it allows one to transfer content from mobile to mobile by putting both phones together and touching their back sides one another. Hardware wise – both Nexus and Xperia support the feature, but Android 2.x doesn’t, so I need to wait for 4.0 to test.

So overall I am pretty happy with the upgrade of our phones. Think that things will be even better as Xperia receives new version of Android.

Just few things that still use on Android 4, as I was on 2.x versions are:

– JuiceDefender: optimizes the battery, still applicable
– Go Launcher EX: replacement of standard Android launcher. More flexible. Put it on Xperia for Yana as well and she likes it more as well
– Go Calendar Widget and Go Switch Widget: also nice things to have on your mobile desktop
– Wifi Manger: handy thing, especially when used with it’s 4×1 widget to manage wifi connectivity
– Evernote: this is something I like to use on new phone more due to bigger size of the screen. Very handy
– All kinds of DropBox, Foursquare, GReader, FBReader and so on and so forth.
ImpreStyle Color: obviously run it on our devices as we are developing this lovely piece of software.

Finally I want to say Google and all other guys involved in the process of building Android platform, software and hardware great thanks for their job! It was a dream to have these things and now we have them.

Cutting Image Background with ImageMagick

Here is a small sequence of commands to cut the image of background (given that background is a solid color):

ORIG_IMAGE_NAME=green.jpg;
NEW_IMAGE_NAME=green-trans.png;
TMP_COLOR=`convert $ORIG_IMAGE_NAME -crop 1x1+0+0 txt:- | sed -n 's/.*\(#\S\+\).*/\1/p'`;
convert $ORIG_IMAGE_NAME -bordercolor $TMP_COLOR -border 1x1 -alpha set -channel RGBA -fuzz 30% -fill none -floodfill +0+0 $TMP_COLOR -shave 1x1 $NEW_IMAGE_NAME

Just change the first to vars. You can also adjust the fuzz percentage if needed.

pfSense 1.0b2 to 2.0 upgrade

Being a big fan of pfSense firewall I have it deployed wherever I had chance to put it. Recently I was updating an installation of 1.2.3 to 2.0 in one of the offices so that I can get proper NAT reflection and many other nice things added in 2.0, I also remembered that I have another installation in one of the places I maintain, so I thought to check if I can update that place as well.

While the update from 1.2.3 to 2.0 is pretty easy: just uninstall all plugins, do automatic update through web interface and then reinstall all the plugins back (all configuration remains and all works well, at least for me), the version of pfSense in old office I had was 1.0b2 (dated 2006 or somewhere there). The 1.0b2 does not support automatic updates against current pfSense auto update servers, so I had to do it through manual upload of firmware files.

Getting around pfSense mirrors I found few firmware files that I can try to do incremental update, since I didn’t want to go strait from 1.0b2 to 2.0 (too big step).

Finally I decided on the following path: 1.0b2 – 1.0.1 – 1.2 – 1.2.3 – 2.0. Until 1.2.3 I had to upload firmware files as autoupdate was not in place. Each reboot after upgrade I was waiting for my firewall to come up, I had some doubts that all when fine, but each time everything went fine. After putting 1.2.3 I could do automatic update, which also went pretty fine. Finally I reinstalled all the plugins (only few like squid, squidguard, lightsquid reporting and ntop).

The thing that surprised me during the upgrade is that I did a step from 1.0b2 (year 2006) to 2.0 (2011) through web interface, while seating at home on my WiFi with SSH tunnel to one of the servers in the office and port forwarding to access firewall’s web interface. In most of the cases, the SSH connection was running across reboots of firewall and I didn’t need to reconnect at all, nor I had to relogin to web GUI. The whole upgrade took me around 2 hours (since I had to download firmware files on my laptop and then upload them to firewall using my browser)

Impressive! Very good job by all who are involved in pfSense! Now I am even more convinced that pfSense is a number one solution for all my firewall needs!

DNS wildcard observations

Had an interesting case with DNS wildcard records: if you have a wildcard (*) A record – it works pretty fine, but if you specify a CNAME record to point to non-existing A record (which would normally be satisfied by wildcard A record) it won’t work, at least in the case I had. So as an example if you have:

Zone file for domain1
* IN A 111.111.111.111

Zone file for domain2:
host1 IN CNAME host1.domain1.

Then any query for host1.domain1 will resolve with no problems, but when you will try to resolve the host1.domain2 – it will fail. For this case you need to explicitly specify the host1.domain1. as follows:

Zone file for domain1
host1 IN A 111.111.111.111
* IN A 111.111.111.111

Interesting case, just to remember for the next time…

GNOME3 Delete button in Nautilus

Just noticed that Delete button in Nautilus of GNOME3 does not delete a file. Either Shift+Delete should be used to delete file completely or Ctrl+Delete for normal removal to Trash.

If you use Nautilus a lot and would like to get normal (old-style) behaviour, check out these post: http://www.khattam.info/howto-enable-delete-key-in-nautilus-3-fedora-15-2011-06-01.html

Basically you need to enable accels key editing in Gnome with gsettings (or gconf-editor), then reassign a button you wish and then disable change of accels key back (unless you want to have it permanently on, which I don’t advice, otherwise you might mess a bit by accident),