Friday, September 17, 2010

Flash Player Square: Native 64 bit support

On 15 September, Adobe announced in a blog the availability of Flash Player Square: A preliminary release of a future version of Flash player offering full native 64 bit support.

You can find additional information about its features, as well as links to download this version on the Adobe website.

Since the installation instructions for Linux are rather terse, I wrote the following instructions for those wishing to install the player on computers with Ubuntu.

Install Flash Player "Square" on Ubuntu 10.04 x86_64




If we have a look to the filesystem of our computer running Ubuntu looking for the location of the Flash player related files, you will see references to it in multiple sites. We can also note that the installation has been done using the alternatives way, which we will benefit from in the installation of Square. Using alternatives we are going to install the prerelease version without removing the stable one. This is precisely the purpose of alternatives: To allow several pieces of software offering the same service to coexist without interfering to each other.

In the filesystem we can observe the following entries related to Flash Player (Remember that we are talking about a 64-bit distribution):

First, the library containing 32-bit version of the player:
/usr/lib/flashplugin-installer/libflashplayer.so


Furthermore, something to run the player through a wrapper. This wrapper allows the execution of 32-bit code on 64-bit environments:
/var/lib/flashplugin-installer/npwrapper.libflashplayer.so

And finally, the references used by various applications that may require the flash player:
/usr/lib/iceape/plugins/flashplugin-alternative.so
/usr/lib/iceweasel/plugins/flashplugin-alternative.so
/usr/lib/firefox/plugins/flashplugin-alternative.so
/usr/lib/midbrowser/plugins/flashplugin-alternative.so
/usr/lib/mozilla/plugins/flashplugin-alternative.so
/usr/lib/xulrunner-addons/plugins/flashplugin-alternative.so
/usr/lib/xulrunner/plugins/flashplugin-alternative.so


Note that the previous references are just symlinks to files in the directory that stores the configuration of the alternatives tool:
/etc/alternatives/iceape-flashplugin
/etc/alternatives/iceweasel-flashplugin
/etc/alternatives/firefox-flashplugin
/etc/alternatives/midbrowser-flashplugin
/etc/alternatives/mozilla-flashplugin
/etc/alternatives/xulrunner-addons-flashplugin
/etc/alternatives/xulrunner-flashplugin


All these entries are also symbolic links. This time pointing to a single target: The 32-bit version of the player ready to be executed through the wrapper:
/var/lib/flashplugin-installer/npwrapper.libflashplayer.so


In the next steps, we are going to install the Square version of Flash player using alternatives. Doing thing in this way, we do not need to uninnstall the current version. Additionally, if something goes wrong we can easily go back to the stable version.

Installation steps:

Go to the download page from Adobe and get the 64-bit version for Linux.

Then, create an installation directory (with a name and location consistent with the stable version) in order to uncompress the new player there.
sudo mkdir /usr/lib/flashplugin-square
cd /usr/lib/flashplugin-square
sudo tar -xzf ~/Descargas/flashplayer_square_p1_64bit_linux_091510.tar.gz


Install the alternatives for those programs that are going to use the new player. Note that Firefox does not use the entry called firefox, but the mozilla one. If you want to do some testing with Firefox, just execute the following command:
sudo update-alternatives --install /usr/lib/mozilla/plugins/flashplugin-alternative.so mozilla-flashplugin /usr/lib/flashplugin-square/libflashplayer.so 60


Restart the browser and you will have the 64-bit flash player (version 10.2.161.22) ready to be used with no wrapper.

At any time we can switch between the two versions with the following command:
sudo update-alternatives --config mozilla-flashplugin


And finally, if we to use the Square version of Flash player in any other product, just repeat these operations for the product in question
sudo update-alternatives --install /usr/lib/iceape/plugins/flashplugin-alternative.so iceape-flashplugin /usr/lib/flashplugin-square/libflashplayer.so 60
sudo update-alternatives --install /usr/lib/iceweasel/plugins/flashplugin-alternative.so iceweasel-flashplugin /usr/lib/flashplugin-square/libflashplayer.so 60
sudo update-alternatives --install /usr/lib/firefox/plugins/flashplugin-alternative.so firefox-flashplugin /usr/lib/flashplugin-square/libflashplayer.so 60
sudo update-alternatives --install /usr/lib/midbrowser/plugins/flashplugin-alternative.so midbrowser-flashplugin /usr/lib/flashplugin-square/libflashplayer.so 60
sudo update-alternatives --install /usr/lib/xulrunner-addons/plugins/flashplugin-alternative.so xulrunner-addons-flashplugin /usr/lib/flashplugin-square/libflashplayer.so 60
sudo update-alternatives --install /usr/lib/xulrunner/plugins/flashplugin-alternative.so xulrunner-flashplugin /usr/lib/flashplugin-square/libflashplayer.so 60


After several tests we obtain excellent results: The player is very stable (no crashes) and everything seems to work properly.

If you want to do some kind of benchmark test or comparison, we recommend you to have a look to this site.

(You can find a Spanish version of this entry here)

Update (20110117): Updated the download link pointing to the new download location.

Sunday, August 22, 2010

Android: Tilt meter for vehicles

Just a few hours ago, the first version of my Tilt meter application for Android has been published.

This is an application that shows the device orientation based on the readings from the acceleration sensor. Based on such data, the application can determine the inclination (frontal and lateral) of the device. Development turned out to be just a bit more complicated when the zero adjustment (calibration) option was added. Some already forgotten topics related to algebra and geometry had to be recalled by the developer.



Although the main goal of the application is to use the phone as an indicator device in off-road vehicles, it can be used in any situation requiring angle measurement.



The application is available on the Android Market. If you want to find it, go to the market and just search for "Tilt meter".

If you have a barcode scanner installed into your mobile phone, you can get the application just reading this QR code:




Update (18-sep-2010)
:
Links to some webs showing Android Market applications, refering to this one: AppBrain, AndroLib, AndroidPIT, AndroidZoom and even PCWorld.


Update (08-oct-2010)
:
The clinometer application has just been updated to version 1.0.1. The new version includes translations to several languages, as well as support for Android 1.5 (previous version required at least Android 1.6). In fact, you can see this image, with the inclinometer being executed on a GeneralMobile DSTL1 terminal, running Android 1.5.