[MOD] Arabic + RTL reading/writing for the SGS2

Search This thread

madmack

Senior Member
attachment.php

RTL - Right to left support.


I have recompiled the webkit files for our SGS2 to support arabic shaping. This thread will serve to help you folks arabize (shaping arabic texts) any deodexed rom out there (well, except MIUI based ones).

Framework.jar (and libwebcore.so):
patching framework.jar will give you arabic shaping + RTL support everywhere except the browser and gmail, while patching libwebcore.so will give you RTL + arabic shaping support in the Browser + Gmail apps.

Please go to my website for instructions and detailed howto: (Scroll down for English)
http://blog.devasque.com/?page_id=11

note1: V0.810 will attempt to give you RTL + Arabic shaping in the Browser as well. Please follow the new guidelines at the blog. (using brightidea's work)

note2: On our Samsung Galaxy S2 device, arabic letters might come garbled at some locations. For that, you need to replace a font which is listed below.

libwebcore.so
Note: if you used v0.810 for my universal patcher, replacing libwebcore.so from this section manually may be unnecessary as the universal patcher attempts to arabize this file as well. (make sure you follow the new guidelines in the blog)

This file is responsible for shaping arabic texts in the Browser and Gmail apps. Just replace the file in /system/lib with this one and you should get arabic shaping out of the box. You'll need root to change this file.

Gingerbread 2.3.3 (CWM Flashable):
http://www.multiupload.com/E2URI45F1I

Gingerbread 2.3.4 (CWM Flashable): Files created by brightidea. Thank you :)
This does NOT work on KG1 ROMs
http://www.multiupload.com/FEMKZ90OYS

I highly recommend trying the solution by brightidea in this sister thread for all other devices and ROM versions.

Font
This file is required for our phone. Not using it will give you spacing issues when displaying arabic text.
Note that you can't use any arabic font on the galaxy s2. This will most definitely crash your browser+gmail app. Use only stock samsung fonts or this one (my own :D):
Place the file in /system/fonts/ and reboot.
http://www.multiupload.com/3XRONTS8BM



update: some screenies ;)

screenshot1yv.png

b2645de1-8945-8ea1.jpg
 

Attachments

  • RTL.jpg
    RTL.jpg
    33.8 KB · Views: 14,690
Last edited:

medo159

Senior Member
Dec 17, 2006
149
35
OnePlus 8 Pro
well, I tried to replace the file but I couldn't (using Astro and Rootexplorer) they all says "the phone is not rooted".

How am I supposed to replace that "System File" !?
 

madmack

Senior Member
well, I tried to replace the file but I couldn't (using Astro and Rootexplorer) they all says "the phone is not rooted".

How am I supposed to replace that "System File" !?

root is most definitely required to do any of that stuff. (i also mentioned it in the first post :rolleyes:)

there is a thread by ChainFire that tells you how to root your SGS2
 
  • Like
Reactions: MoFsaD

medo159

Senior Member
Dec 17, 2006
149
35
OnePlus 8 Pro
Ok I feel a bit nooby right now :$

Just rooted my phone, Do I need to change the file's permissions?

UPDATE: YES!! I Confirm this method works for me with no problems, the stock browser reads Arabic very well,

It's very important to change the permissions like this

5519782670_ccd409481b.jpg


5519782748_9132b6db10.jpg


Thanks man, I'm working on that deodex thingy, pls provide any helpful links cause I don't have a clue about it :$
 
Last edited:
  • Like
Reactions: madmack and salamt

madmack

Senior Member
Ok I feel a bit nooby right now :$

Just rooted my phone, Do I need to change the file's permissions?

UPDATE: YES!! I Confirm this method works for me with no problems, the stock browser reads Arabic very well,

It's very important to change the permissions like this

5519782670_ccd409481b.jpg


5519782748_9132b6db10.jpg


Thanks man, I'm working on that deodex thingy, pls provide any helpful links cause I don't have a clue about it :$

This is awesome !! screenshots ?

I'm glad I got it going without the phone being here with me :cool:

For deodexing (its a bit of an advanced topic now, and it seems Camera.apk is force closing, so do it at your own risk).
this is the link :

http://xdaforums.com/showthread.php?t=990238

You already have the deodexed files. just follow the last section in green.
 
  • Like
Reactions: MoFsaD

medo159

Senior Member
Dec 17, 2006
149
35
OnePlus 8 Pro
MADMAAAAAAAAAAAACK !!!!!!!!!!!!!!!!!!!

MY PHONE IS FULLY ARABIC SUPPORTED!!!

I Just deodexed my phone as you told, and did your method of framework.jar !!!!!!!!!!!!

The result is :-
screenshot3im.png


screenshot2oy.png


Here is the logcat after the camera FC attached :cool:
 

Attachments

  • alogcat.2011-05-04-21-16-50+0100.txt
    39.1 KB · Views: 66
Last edited:

madmack

Senior Member
MADMAAAAAAAAAAAACK !!!!!!!!!!!!!!!!!!!

MY PHONE IS FULLY ARABIC SUPPORTED!!!

I Just deodexed my phone as you told, and did your method of framework.jar !!!!!!!!!!!!

The result is :-
screenshot3im.png


screenshot2oy.png


Here is the logcat attached :cool:

medo !! this is awesome.

you've got full arabic support from the beginning.

you don't mind if I take a couple of these pics and put them on the OP ?

also, did you use my deodexed files ? any problem in camera ?
 

medo159

Senior Member
Dec 17, 2006
149
35
OnePlus 8 Pro
Come on man use everything u want :D I'm really happy to help u in any thing I can do :)


Yes i used your deodexed files everything OK except the Camera FC, I have downloaded (FxCamera) and it works perfect !!!!!!!!!!

it can be used till you fix the Camera.apk :)

Man, you really made my day, I'm really grateful Madmack, Thank you very much!
 

madmack

Senior Member
Come on man use everything u want :D I'm really happy to help u in any thing I can do :)


Yes i used your deodexed files everything OK except the Camera FC, I have downloaded (FxCamera) and it works perfect !!!!!!!!!!

it can be used till you fix the Camera.apk :)

Man, you really made my day, I'm really grateful Madmack, Thank you very much!

try this,
http://www.multiupload.com/2SXUQKIJBL
set the permissions correctly like you did before and reboot :) see if it fixes the cam app.
this doesn't work

I should be receiving my phone anytime from tomorrow up to beginning of next week depending on dhl's mood. haha
 
Last edited:

HishamN

Senior Member
Feb 10, 2009
184
3
Abu Naif congratulation to you for SGSII and for Al3almi winning yesterday, what a match :D

BR
 

Top Liked Posts

  • There are no posts matching your filters.
  • 70
    attachment.php

    RTL - Right to left support.


    I have recompiled the webkit files for our SGS2 to support arabic shaping. This thread will serve to help you folks arabize (shaping arabic texts) any deodexed rom out there (well, except MIUI based ones).

    Framework.jar (and libwebcore.so):
    patching framework.jar will give you arabic shaping + RTL support everywhere except the browser and gmail, while patching libwebcore.so will give you RTL + arabic shaping support in the Browser + Gmail apps.

    Please go to my website for instructions and detailed howto: (Scroll down for English)
    http://blog.devasque.com/?page_id=11

    note1: V0.810 will attempt to give you RTL + Arabic shaping in the Browser as well. Please follow the new guidelines at the blog. (using brightidea's work)

    note2: On our Samsung Galaxy S2 device, arabic letters might come garbled at some locations. For that, you need to replace a font which is listed below.

    libwebcore.so
    Note: if you used v0.810 for my universal patcher, replacing libwebcore.so from this section manually may be unnecessary as the universal patcher attempts to arabize this file as well. (make sure you follow the new guidelines in the blog)

    This file is responsible for shaping arabic texts in the Browser and Gmail apps. Just replace the file in /system/lib with this one and you should get arabic shaping out of the box. You'll need root to change this file.

    Gingerbread 2.3.3 (CWM Flashable):
    http://www.multiupload.com/E2URI45F1I

    Gingerbread 2.3.4 (CWM Flashable): Files created by brightidea. Thank you :)
    This does NOT work on KG1 ROMs
    http://www.multiupload.com/FEMKZ90OYS

    I highly recommend trying the solution by brightidea in this sister thread for all other devices and ROM versions.

    Font
    This file is required for our phone. Not using it will give you spacing issues when displaying arabic text.
    Note that you can't use any arabic font on the galaxy s2. This will most definitely crash your browser+gmail app. Use only stock samsung fonts or this one (my own :D):
    Place the file in /system/fonts/ and reboot.
    http://www.multiupload.com/3XRONTS8BM



    update: some screenies ;)

    screenshot1yv.png

    b2645de1-8945-8ea1.jpg
    4
    promising !

    does the new way fix ( text numbers order ) how can i explain it ...
    يعني لما توصلك رسالة فيها رقم
    يالرقم يجي معكوس او يتغير ترتيب الجملة مثلاً الرقم يصير بالبداية والجملة تتلخبط

    yea, this is a problem with my framework patch and can be fixed. I'm a little too lazy to fix it but the CM sources (that i'm porting from) did fix it so its a matter of updating my code and releasing a new set of tools/patcher. Frankly I was waiting for CM to fix more problems but I guess they're stopping their upgrades for now so I might as well just go ahead and update my sources as well.

    to you guys that don't get what he said, he's asking if we can fix the reversal of numbers when they're in the beginning of a new line and contain RTL text.
    4
    Browser files fixed for good

    Update:
    Browser arabized perfectly now and is FIXED


    Thanks to AlWakra, he uploaded a beta arabic ROM and I extracted the libwebcore.so file and its dependency. Tried it on VillainROM and it works superbly so far. Shaped and all.. Yep ! Here are the two files zipped up for your convenience:
    http://www.multiupload.com/7PHQ4RO0ME

    Just put these two files in /system/lib and reboot.

    Thank you AlWakra. I was growing old and tired with my own efforts.
    3
    downloading and testing, will post back the result :)

    Thanks a lot mate, that was quick :)

    sure thing. lemme know how it goes.

    if you're getting camera FCs with my deodexed files, can you post a logcat here ?
    3
    Here is a rom that i've built and tested.


    http://www.multiupload.com/0SBR1FCMSM
    Made a new thread with a new rom version:
    http://xdaforums.com/showthread.php?t=1083187

    Download and flash with Odin 1.85. Place it in PDA and don't check anything else ! then flash away


    1. deodexed from VillainROM.
    2. Stock KE2 kernel (no yellow triangle)
    3. Arabized
    4. Browser has problems. (but mostly fixed)
    5. battery % mod


    this should facilitate arabizing this phone considerably.