Update 2011-09-02
For the Xperia X10, when upgrading the software using Sony's PC Companion, you will get full Arabic support on the phone, with a beautiful font, and no glitches. The only drawback is the phone is unrooted, and therefore you lose functionality of apps that require root (e.g. Titanium Backup, ShootMe), and have the bloated apps that autostart (Timescape, Moxier Mail, ...etc.)
Both the Motorola Milestone and the Sony Ericsson Xperia X10 are great phones. I have used them both recently as my main phone. Since both use Android as their operating system, they offer unlimited possibilities.
The Motorola Milestone has been my main phone since September 2010, and was only replaced several days ago with the Sony Ericsson Xperia X10. I like them both, even though they are not quirk free.
One drawback: No Arabic
The Milestone was originally a Canadian Telus phone, unlocked to work with Rogers, it has no Arabic support whatsoever. Not even Unicode or UTF-8 for Arabic displays properly. This means that I cannot read any email received in Arabic, nor SMS messages in Arabic, let alone web pages, and Facebook status updates. They same goes for the X10, which is a Rogers phone: no Arabic.
Possible solution: Custom ROM
To overcome this, I searched a lot on Google, but could not find an acceptable solution. One problem is that Motorola has the firmware cryptographically signed, which makes replacing the ROM by a custom ROM more convoluted than other phones. Another problem is that there are several versions of the Motorola Milestone around. First there is the Droid, which is a North American only CDMA (non-GSM) phone. Then, there is the European frequencies and North American frequencies for the GSM Milestone.
One of the most common custom ROMs in use is CyanogenMOD. It does not have official support for the Milestone, but there is a separate project for it at CyanogenMOD for Milestone. Still, this has no Arabic, so another person provides an Arabic version at Cyanogen 4 Arab.
For the X10, the problem is harder, since the bootloader has only been broken recently, and there is only one or two custom ROMs that I know of (Free X10), and they lack a camera driver so far.
Least pain: Root and Replace
Therefore, I opted for a less painful and risky solution of just rooting the phone, replacing the fallback font, and three shared libraries. This allows me to view Arabic content in any application.
This way, I am still running everything with the same version of official firmware that the manufacturer (or carrier) provides, and all features of the phone work as intended.
The rest of this post explains how I rooted the phone and got the libraries and font on the phone. It is detailed and technical.
Overview
The process is two steps: first, gain root access, then replace one font file (/system/fonts/DroidSansFallback.ttf), and three libraries (/system/lib/libwebcore.so, /system/lib/libskia.so, and /system/lib/libskiagl.so).
Pre-Requisites
This procedure applies to either:
- Motorola Milestone running Android 2.1 (Eclair).
- Sony Ericsson Xperia X10 running Android 2.1 (Eclair).
If your phone is running an older or newer version, you will need a different version of the shared libraries. You may brick your phone if you do use the wrong version.
Check under Menu -> Settings -> About Phone
For the Milestone, the phone shows the following values:
Firmware version: 2.1-update1
Firmware Configuration Version: GAS_NA_SHOUTELUS_P012
Build Number: SHOLS_U2_03.11.0
For the X10, the phone shows the following values:
Firmware version: 2.1-update1
Build Number: 2.0A.0.504
If you have a newer, or older, version of Android on your phone, do not use the attached files!
Install ConnectBot
In order to replace files, I used the ConnectBot application. You can install it from the Android Market.
If you do not have the market, then find the .apk for it somewhere, and install it.
Rooting the phone
The method I used to root the phone is an application called z4root. It allows for a 1-click rooting. This used to be an application in the Market, but it was removed.
Another way of rooting a phone (not necessarily the Milestone or X10 only), is the Unrevoked application.
Before you are able to install z4root, you need to do the following.
Allow applications from unknown sources
Press Menu -> Settings -> Applications, and check Unknown Sources
Enable USB debugging
Press Menu -> Settings -> Applications -> Development and check USB Debugging
Now click on this link to download z4root 1.3.0, and install it.
Start z4root, and choose the "Permanent" option. It will take some time, so be patient.
Restart the phone. You now have root access.
Replacing the font and shared libraries
In order to replace the shared libraries and font, you need to use ConnectBot, and run a few shell commands. There are other ways to do this, such as the Root Explorer app from the Market, but I am documenting here what I used.
First, download the Android 2.1 Arabic archive.
This is a .zip file. To use its contents, you have to extract them to your phone's SD Card, so they end up in /sdcard/arabic. You can connect your phone via USB, then extract the archive directly to the SD Card, or extract the archive on your PC, then copy the entire "arabic" directory to the SD Card.
After you have successfully copied the directory and its contents, you should end up with the following files:
arabic/ arabic/arabic-milestone.sh arabic/arabic-x10.sh arabic/DroidSansFallback.ttf arabic/libskia.so arabic/libskiagl.so arabic/libwebcore.so
Now start ConnectBot, and get a local command line prompt, which is the phone itself.
One you get the $ prompt, type this:
$ su
And hit the Enter key on the physical keyboard.
You will get a dialog about "Superuser Request" on whether to allow root access for ConnectBot. You should choose "Allow".
Now change directory to the /sdcard/arabic directory. If you have not extracted the .zip file properly, this directory would not exist. Go back and extract the archive as explained above.
cd /sdcard/arabic
Now, run the replacement script, as follows:
For the Motorola Milestone
sh arabic-milestone.sh
For the Sony Ericsson Xperia X10
sh arabic-x10.sh
If you are successful, the phone will restart by itself.
After it reboots, start the browser, and type in the URL http://bbcarabic.com to verify that it works!
Arabic input
To enable Arabic input so you can type Arabic, will need the Ibrahim Arabic keyboard from the Market.
Install it, click on Menu -> Language and Keyboard and check Ibrahim keyboard.
To type something in Arabic, you just long press, then select Input method to be Ibrahim keyboard.
Issues
There are some potential issues that I see so far. They are as follows:
First, there is no diacritics (tashkeel) support in the font. They show as rectangles. If you happen to know of a better font that has diacritics support, then send it to me, and I will test it and possibly include it.
Second, I will have to do it all over again when/if the Android Froyo 2.2 update arrives for this phone.
I am hoping some searching for Froyo 2.2 libraries will be easier than my quest for Eclair 2.1 ones. If you know of any, let me know by commenting below.
Enjoy ...
Comments
Karim (not verified)
Arabic support for Milestone 2.2?
Fri, 2011/04/01 - 02:19Hi,
First of all, thank you for this great help. I used your instructions for adding Arabic to my Milestone when it was with Android 2.1 and it worked great. Now, I did the mistake to update to Android 2.2, but the Arabic doesn't work anymore. Do you know have any new magic solution to enable Arabic font for a Milestone 2.2?
thanks and keep the great work for the Egyptian revolution. I am Egyptian too :)
Karim
Khalid
No 2.2 device yet
Fri, 2011/04/01 - 09:42I don't use the Motorola Milestone anymore. Just the Sony Xperia X10, and that will remain on 2.1 for the foreseeable future.
The steps should be the same, but you need a different set of libraries that are compiled against 2.2.
If you ever find them, let know where they are in a comment so others would find out too.
Samah (not verified)
THANX
Fri, 2011/09/02 - 18:48Wow it worked like magic!! I was suffering trying to find any solution just to read Arabic msgs in my motorola milestone till got into your web page & followed instructions to end up with full support of Arabic language. Now I can read type view Arabic all over my mobile....
THANK YOU SOOO MUCH GOD BLESSES