Tuesday, March 31, 2009

Install flashplayer 10 with SvOlli's patch for EeePC 4G

After installing "firefox-upgrade" from Asus update the day before, I have been trying to re-install vlc, but in vain. Even trying to compile from source, there are so many unmet dependencies that I finally decided it does not worth the effort.

And besides vlc, we already know that this libc upgrade with "firefox-upgrade" is also causing problem with installation of build-essential (although a solution has already been found), and perhaps problem with even more other programs. So I came to the conclusion that it's not worth the hassle running into so many problem for this flashplayer 10.

Then I began to investigate on the other possible solution: SvOlli's flash10patcher which patches the libflashplayer10.so plugin to cheat that it only requires GLIBC 2.3. But does this patch cripples any functionality of flashplayer 10? After digging in Google for a while, I've found the answer in this adobe forum:

The Flash Player 10 Linux version is now compiled using -fstack-protector for security reasons. This feature requires glibc-2.4 or newer. You have no choice but to upgrade your system or stick with Flash Player 9 on that system.

More information on this feature: http://en.wikipedia.org/wiki/Stack-smashing_protection


We all know that buffer overflow is often used by hackers to hack servers. But for a netbook like EeePC, I don't think this is of any importance (unless you want to run a server with your EeePC!). So apparently we are not sacrificing any functional feature with this dependent library downgrade. Thus, to my opinion, this is the best solution for people having difficulty in watching youtube.com videos.

Patching flashplayer 10 with SvOlli's flash10patcher

Installation is very easy.

1) Download install_flash_player_10_linux.tar.gz
and flash10patcher-0.2.tar.bz2, and save them to /home/user.

2) Unpack the 2 packages and copy libflashplayer.so to the recently unpacked flash10patcher-0.2/ folder. You can do this either in File Manager or in a terminal:
tar zxvf install_flash_player_10_linux.tar.gz
tar jxvf flash10patcher-0.2.tar.bz2
cp install_flash_player_10_linux/libflashplayer.so flash10patcher-0.2/
To extract files in File Manager, just right click on the file and select "Extract All".

3) Open a terminal, change directory into flash10patcher-0.2/ and run the flash10patcher by entering the command "sudo ./flash10patcher" as below.
[NB. "sudo" is required as this has to be done with "root" privilege, i.e. with Administrator rights.]
/home/user>cd flash10patcher-0.2/
/home/user/flash10patcher-0.2> sudo ./flash10patcher
flash10patcher 0.2
reading libflashplayer.so
libflashplayer.so size: 10131640
replacing magic code 0x0d696914 with 0x0d696913
replaced at 0x00004e1c
replacing id string "GLIBC_2.4" with "GLIBC_2.3"
replaced at 0x000048b5
writing patched.libflashplayer.so
/home/user/flash10patcher-0.2>
A patched library flashplayer 10 with the name "patched.libflashplayer.so" is generated.

EDIT 2009/9/12: Above is the screenshot I captured while doing this. To work in terminals, it is important to avoid typos, so the easiest way is to copy and paste the command to the terminal. Some people have sent me screenshots and I saw that they made typos while typing the commands, so I have added the commands only below. You just need to copy them with [Ctrl]-[C], then paste to the terminal of your EeePC with [Shift]-[Insert], then press [Enter].
cd /home/user/flash10patcher-0.2
sudo ./flash10patcher
Then do the same for the command in step 4 below.

4) Copy this new library flashplayer 10 to your firefox plugin folder (and rename it).
sudo cp patched.libflashplayer.so /usr/lib/mozilla/plugins/libflashplayer.so
You can copy and paste this command into the terminal - [Shift]+[Insert] to paste. Or you can use the [Tab] key to help auto-complete file/folder names. This will help to avoid typos. Also this command has to be run from the folder "/home/user/flash10patcher-0.2".

You can also copy this patched library to the destination with a root File Manager by entering this command in a terminal:
sudo XandrosFileManager
This is how I did it. Very simple!