Arabic and Persian RTL Fix - 30-10-2011 HUGE UPDATE!!


What is your favourite patching method?


  • Total voters
    50

roenano

Members
7 Nov 2010
722
65
I put a lot of effort on this patch, so if you enjoy it please consider donating!!

I'm happy to say that thanks to some great devs work (see credits at the bottom), the RTL patch for Arabic users have been improved a lot.

Great news!!!!!!
Thanks to the great work of "BrightIdea" at XDA, from now it's possible to patch every libwebcore.so file automatically.
The patch is included in the tool now so the generated zip will include a full Persian/Arabic RTLFix.
(Thanks to Madmack too, I stole some of his code for implementing it to my tool...)

Link to BrightIdea's thread:
[MOD] libwebcore.so (browser) universal arabic shaping patch

--------------------------------------------------------------------------------------------------------

Do it yourself!
Just finished editing the tool I use for compiling the RTL patch for MIUI use only.

Changelog:
MIUI-Arabic-RTL-T9-Script:
- Initial release

MIUI-Arabic-RTL-T9-Script-V2:
- Added Device prompt for correct "/system" mounting with the flashable ZIP. (Mounting "/system" manually for DHD, Desire Z and Nexus S no longer needed).

MIUI-Arabic-RTL-T9-Script-V2.1:
- Cleaned the patch a little bit by removing unnecessary stuff.
- Added new libwebcore.so that fixes Gmail, Browser, Google Maps, etc... (MANY thanks to NMH14 for finding it)

MIUI-Arabic-RTL-T9-Script-V3:
- Added Brightidea's libwebcore.so auto-patch, it will perfectly fix browser and gmail without any side effect!
- small changes to the code, if the tool is not able to patch the framework.jar properly it will close.
- Added support for Optimus 2x flashable zip

MIUI-RTL-T9-Script-V4:
*Important update!!
- After long time of reverse engineering, I have successfully merged MIUI with the most updated available patch. This should improve and fix some problems (like KB showing on long texts) and Arabic/Persian text mixed with English including signs reversing the English words, etc.
- Updated Brightidea's tool to most updated (0.7b).
- Added support for O2x. (this time for real :p ) Many thanks again to Brightidea, he's the one who found the solution!!!
- Small improvements to the code, and removed some unnecessary files from the script.
- Removed T9 question prompt, it will be installed by default. If you have Arabic/Persian contacts it will search for them, if not, it won't make any difference... Don't see any reason not to include it.
- You will be prompt to insert the rom version (ie. 1.9.2 or Galnet or whatever you like) before creating the zip, so no need to edit the zip name before moving it to the phone)
*Instructions have changed a little bit so please re-read them!! (pay attention to bold text)

MIUI-RTL-T9-Script-V4.1:
*Important update!!
* This update doesn't include new features I've been talking about, the code is not finished.
- Fixed Contacts FC by updating to latest T9 dialer, it includes now more than 15 languages!!
- Fixed dancing letters in whatsapp (thanks to madmack)
- Updated to latest webkit (browser) patch to support more devices (thanks to brightidea)


MIUI-RTL-T9-Script-V4.2:
- Fixed issue with message app not showing emojis.

MIUI-RTL-T9-Script-V5: (latest)
* This is a huge update and probably the last one I'll do (except for bug fixes)
- Merged Hebrew and Arabic-Persian into one patch.
- Added 2 new patching options: "On device" and "rom zip" (see instructions for details)
- Using new merged libs patcher by brightidea
- Added SGS2 to flashable RTL zip options.

Instructions:
0- Extract all the contents of MIUI-RTL-T9-Script-V5.zip to to your computer.
1- Run "Commands.exe"
2- Choose between Hebrew Or Arabic-Persian patch.
3- Choose Patching method (see details below).
4- Wait for the tool to finish working (do NOT close the CMD windows during the process)

Patching methods:

- On device:
- Will patch the installed MIUI rom on your device through ADB, pulling the files to be patched and pushing them back after patching them. Your device must be in recovery, connected to your computer through USB and you must have your device's ADB drivers installed.
Once finished just reboot and enjoy RTL.

-Manual:
- Place the "framework.jar" file from "/system/framework" within the rom's ZIP into "input" folder in the tool main folder.
- Place the "libandroid_runtime.so" and "libwebcore.so" files from "/system/lib" within the rom's ZIP into "input" folder in the tool main folder.
- Select you device for proper "/system" mounting with the flashable ZIP and then enter the MIUI version the patch is built for (if the version you are creating the patch for is "1.9.2" just type 1.9.2 and hit enter)
- Once done just take "miui-#.#.#_RTLFix.zip" from "generated" folder, put it in your SD card, flash it from recovery and enjoy your RTL!!!

-Rom zip:
* this method intends to patch the rom zip before flashing it from recovery so you'll flash it already RTL patched.
- Place your MIUI rom zip inside "input" folder and make sure is the only zip file in there.
- Once the script finished you will find the new MIUI rom zip RTL patched in generated folder, just copy it to your SD card, flash it normally from recovery and enjoy RTL.


*Arabic and Persian T9 Dialer!!!!
It will add the function of searching for Arabic or Persian characters (in addition to english) on dialer.
In order to activate it (after flashing it and booting the phone) change your locale to any other else, wait 1-2 mins, go to dilaer and it should work, then go back to your favorite locale.

For Arabic/Persian Dialpad themes please scroll down this post. Many thanks to "Nexus S" user for making them!!!
For custom fonts themes please scroll down this post. Many thanks to "Nexus S" user for bringing them to me!!!

---------------------------------------------------------------------------------------------------------

Arabic font themes:
*Install it from Theme manager app as "Font".
MIUI_Arabic-GB-font-new.mtz
MIUI_AlJazeera-font-new.mtz
MIUI_AlMohamad-font-new.mtz
MIUI_Arabic-Froyo-font-new.mtz

Arabic Dialpad themes:
*Install it from Theme manager app as "Dialer Style".
MIUI-Arabic-Dialer.mtz
MIUI-Arabic-Dialer2.mtz
MIUI-Arabic-Dialer3.mtz


---------------------------------------------------------------------------------------------------------
Credits:
- All the original devs of the patch.
- Mena and calssicaldude for creating the script.
- Madmack for improving the script for Arabic users.
- Eyad Aboulouz and erasmux for taking tha patch to a next level.
- iravid for merging MIUI code with the RTL patch.
- Brightidea for creating a universal browser patch.
 
  • Like
Reactions: Android Fan
Thank you for this great effort ... if you don't mind there are some issues that need your attention
* the browser still lacks support... from my modest experience libwebcore needs to be modified.
* numbers are rendered from right to left which is inaccurate ... for example four hundred (400.0) is rendered (0.004).

Again thank you and I hope MIUI all the best
 
Thank you for this great effort ... if you don't mind there are some issues that need your attention
* the browser still lacks support... from my modest experience libwebcore needs to be modified.
* numbers are rendered from right to left which is inaccurate ... for example four hundred (400.0) is rendered (0.004).

Again thank you and I hope MIUI all the best
Thats strange.... It shouldn't be happening. It fixes those problems flawlessly when the text is in Hebrew (RTL too).
As i'm not the developer of this fix (I just ran the script and compiled it for you) there is not much i can do, but if i see more feedback from people and have some more information about the problems it DOES fix and the ones it DOESN'T, i'm willing to look into the code or contact the developer of the fix.
So please, give me some more feedback so i have something to work with. I.e:The web page you are browsing, an example of the message with the upside down numbers, etc.

Hope to hear from you soon.

any updates on this?
I have updated the first post with the last version.
Normally i have the fix every Saturday after a new release, but because I saw no interest in the thread I just discontinued it. If I will see more people showing interest in this thread I will keep updating it.

BR
 
is there a patch to get arabic text viewable for this rom? I wanna view arabic say on guidedways.com
 
reonano your RTL fix works in messaging, how it doesn't work in the default browser or the MIUI browser.
Great effort though!
 
guys i am using miui for my hd2 and i don't see anything called Recovery so how am i gonna integrate this file into rom? i tried replacing the system files via copy paste but the miui never booted again after this?

plz if anyone can illustrate in details how to integrate the rtl files i would be grateful
 
you can boot in recovery by : Quick boot app if you have

or restart your phone + volume down button > it will boot you in bootloader then go to recovery
 
thank you very much man
its working perfect in HTC Desire HD with the last MIUI V3 1.1.22.

Any chance to get libwebcore.so by Arabic also??? or are there any guidelines to do ??

cheers
 
its working perfect with 1.1.22 V5 also DHD

still waiting roenano to get libwebcore.so also

thanks again
 
i found a nice way to fix this issue.
first install oen of the new versions on your Desire -- i installed MIUI_Au_1.1.22_D2W_D3_Signed.zip but all 1.1.22 version will work. This version had arabic fonts already on it its just the letters werent joined. so all i did was install the join letters from the link above and thats it. all messages appear correctly now.

there is no full arabic translation for the whole unit. if i can figure out how to do it then i shall try.
 
i found a nice way to fix this issue.
first install oen of the new versions on your Desire -- i installed MIUI_Au_1.1.22_D2W_D3_Signed.zip but all 1.1.22 version will work. This version had arabic fonts already on it its just the letters werent joined. so all i did was install the join letters from the link above and thats it. all messages appear correctly now.

there is no full arabic translation for the whole unit. if i can figure out how to do it then i shall try.

Man all android froyo builds have arabic fonts within!
The problem is the right to left alignment and connecting the letters: the first one would be done by a modified framework which doesn't exist yet! The second one by changing libskia.so file which exists!

To have arabic support in web browser, libwebcore.so modified file doesn't exist yet however Firefox browser has built in arabic support! Try it!
 
Man all android froyo builds have arabic fonts within!
The problem is the right to left alignment and connecting the letters: the first one would be done by a modified framework which doesn't exist yet! The second one by changing libskia.so file which exists!

To have arabic support in web browser, libwebcore.so modified file doesn't exist yet however Firefox browser has built in arabic support! Try it!
you can download right to left fix from Hebrew translation page
 
Ok guys, good news.
Just spoke with some great Israeli devs that are working on a full RTL fix on CM level.
It will include libandroid_runtime.lib and libwebcore.lib fix.
Hopefully it will be included on the next release of the RTLFix.
Will keep you informed.
 
Ok guys, good news.
Just spoke with some great Israeli devs that are working on a full RTL fix on CM level.
It will include libandroid_runtime.lib and libwebcore.lib fix.
Hopefully it will be included on the next release of the RTLFix.
Will keep you informed.

Ok man thanks! But just be noticed that if RTL is fixed for hebrew it doesn't mean that it's fixed for arabic! There's one good israeli developer working also on this @ xda-developers! Will keep you informed too!
 

Similar threads