yashsingh1/xdaforums huggingface dataset:
[Galaxy S I9000 Android Development] hdaackda:
Any RTL shaping for ICS users?
[Galaxy S I9000 Android Development] madmack:
http://blog.devasque.com/2011/10/19/android-ice-cream-sandwich-supports-arabic-from-google/
[Galaxy S I9000 Android Development] hdaackda:
But the ROM i am using (slim) doesnt show the letters correctly, maybe cause ita slinmed down and missing some necessary files.. :(
[Galaxy S I9000 Android Development] madmack:
slim ? the RTL in ICS is part of the main framework of android. it can't be easily deleted or slimmed down.

make sure your rom is not a themed gingerbread version but actually is an ICS rom at its core.
[Galaxy S I9000 Android Development] sawari:
DroidNaskh-Regular.ttf in ICS

If you change/override the default Arabic font in ICS DroidNaskh-Regular.ttf font in /system/fonts, then Arabic font in some apps will be disconnected and have problem. May be the rom developer change/override the font. This happen to me.

Anyway is there anybody managed to change the font and have no problem with the Arabic in ICS? because DroidNaskh-Regular.ttf is not that beautiful for me.
[Galaxy S I9000 Android Development] hdaackda:
That might be it. He might have deleted the fonts.. Can you please share the font file.. Thanks :h

It its pure ics..

Edit: Copies the font file and it works!! THANKS A LOT
[Galaxy S I9000 Android Development] jaikat:
hey madmack

sorry about this.. i thought this was the i9100 thread.. my bad
[Galaxy S I9000 Android Development] AbuYahya:
I tried copying font droidsansarabic.ttf to font folder with slimICS current version but did not work. Any pointers?

Sent from my GT-I9000
[Galaxy S I9000 Android Development] madmack:
AbuYahya,

I think ICS uses different font schemes and names for RTL fonts than the prior android versions.

I don't have any experience with manipulating the fonts personally, but I'd replace each font in /system/fonts/ with the DroidSansArabic.ttf file and reboot until I know which one is responsible for rendering arabic texts. Then you can just replace that single file.

If you did figure it out, let me know. I'm interested to know as well :)
[Galaxy S I9000 Android Development] marwan91:
there was a fix on slimICs thread and it was to replace the font file but not droidsansarabic.ttf cuz its from the old android i geuss for ics u need this attached font file... just put it on the font folder and all will be ok!
[Galaxy S I9000 Android Development] madmack:
thanks for the info. they indeed renamed the files.

Yahya, i guess you can try renaming droidsansarabic.ttf into DroidNaskh-Regular.ttf and put it in /system/fonts

after doing this, you should be able to see my font in ICS' RTL text.
[Galaxy S I9000 Android Development] AbuYahya:
Thanks for reply.

I figured it out a few minutes after my last post. I took the font from DK3 rom.
[Galaxy S I9000 Android Development] s-android:
can u update ur patch according to brightidea new works?

http://xdaforums.com/showthread.php?t=1218960
[Galaxy S I9000 Android Development] madmack:
has anyone tried applying my patch on Sense UI (must be 2.2 or 2.2.1)? if you guys know how to put up a logcat, please do so I can have a look at whats going on as I'm interested in this as well.
[Galaxy S I9000 Android Development] jaikat:
i'v applied the patch on two framwork.jar files for two 2.1 Sense roms built for the HTC Hero... i'll be more than glad to provide you with a logcat.. just give me till tomorrow (its late here in Amman/jordan)

would it be possible to merge y6b's patch into yours?! maybe you could add it as another option to the menu... just like you did for cm7 roms!!

ps: do you want the logcat to show the device boot up after replacing framework.jar or what exactly?
[Galaxy S I9000 Android Development] madmack:
I meant sense UI in Froyo. Eclair is a whole different story :rolleyes:

if you can get that, I can have a look at it.
[Galaxy S I9000 Android Development] jaikat:
ok, no problem...

would it be possible to merge y6b's patch into yours?! maybe you could add it as another option to the menu... just like you did for cm7 roms!!
[Galaxy S I9000 Android Development] madmack:
Sense UI 2.2/2.2.1 is supposed to work out of the box, thats why I'm wondering why it doesn't. Most likely HTC changed the files that I'm modifying, in which case, we can't do much to fix it. Looking at logcat can help, and yea, if I do fix the problem, then we can surely update the patch to support new Sense UI roms.
[Galaxy S I9000 Android Development] jaikat:
What i meant was adding the existing patch by y6b as another option in your patch menu so that cyanogenmod based roms would get supported...
[Galaxy S I9000 Android Development] wanam:
"Libwebcore.so" is working, but I have some FCs (gmail/tweetdeck..) after replacing "framework.jar" with generated one, i generated it using the new "libwebcore.so" not the one included in the generator, it's correct?
[Galaxy S I9000 Android Development] l_npl:
persian support

hi

thank you for great work.

im trying to use persian in my galaxy s. now i have darky 9.3 rom and your arabic patch.

but some letters (گ چ پ ژ) dont place correctly. and in persian sites all (ي) replaced with # .
[Galaxy S I9000 Android Development] madmack:
you generated framework.jar using the new libwebcore ? I don't get it

for CM7, I think you should just use the CWM file that I posted in the OP. it'll work. if you get problems, just clear dalvik cache and cache from recovery. If you still have problems, factory reset. These FC problems are most likely related to the new APIs/permissions/xml data that my patch applies and sometimes doesn't get rebuilt correctly when you reboot.

the problem is with the ICU4J library that is used. I'm afraid that's something I cannot edit easily at this time. Either a brave programmer needs to implement ArShaper.java manually to include these 4 chars or ICU needs to release a new java library for us. :(
[Galaxy S I9000 Android Development] AhmadAlmousa:
Great

I've been looking for this all over !

u made the Galaxy S variates more beautiful :P

that one of the most silly missing feature

BTW, for those who would like writing in arabic .. there's an app called "Multilanguage keyboard" .. it's great !!

I really don't know how hard it is for Google to implement this script versions ago !

again .. thank you so much for ur effort !
[Galaxy S I9000 Android Development] j_h3000:
hey hadmack thx alot for this great work. however, when i tried to patch my framework.jar from Doc's JS8 the patching process was very fast <1 min and the result was the same framework.jar (same size) so i guess it didn't work or something ... i'm running windows 7 64bit

do u have any hint?

looking forward to hear from you and thx again for your efforts
[Galaxy S I9000 Android Development] madmack:
if it worked earlier for you, then simply run it again until you get a big framework.jar file.

this could happen sometimes because the baskmali/smali process is a bit buggy.
[Galaxy S I9000 Android Development] goodwill4u1:
after many trials and flashing roms i finally went to a solution and have everything working like charm here.

first do not flash the CWM to patch it!!! you will always have bugs somewhere.

i'm on Darkys 9.3, so i retreived the framework.jar and generated a new file and MANUALLY replaced it in place inside the system as described by madmack.

then i also replaced libwebcore.co manually. i replaced the folder fonts as given by madmack.

THANK YOU MADMACK.

ARABIC everywhere here

and for the keyboard, just search for any arabic in the market and use one.
[Galaxy S I9000 Android Development] nedaljo:
And the lamalif "لا" still getting space after it?
[Galaxy S I9000 Android Development] digitaldust:
evo 4g with MYN RLS5

Hi,

will this mod work woth my EVO 4G, I am using MYN RLS5 rom which is based on HTC 3.70 for EVO. I have not yet to run in to any MOD that been confirmed to work with this release for the EVO.

thanks
[Galaxy S I9000 Android Development] madmack:
no one confirmed it working with sense ui so far. I'm still waiting on logcats from users to try to debug the problem. so use it at your own risk for now
[Galaxy S I9000 Android Development] jaikat:
It worked for me on two eclair(2.1) Sense roms made for HTC Hero. I'm waiting till o get to work on sunday to try the patch on Froyo Sense, cause i have only Ubuntu linux at home. Will post a logcat once i get my hands on it..

Hey madmack, you didn't say if you're going to try adding y6b's patch (which works for cm roms) in your patch menu or not, would you at least consider it??
[Galaxy S I9000 Android Development] zking:
Not working.

I followed everything from OP, except copy all the Al jazeera fonts I only copied 2 fonts DroidSansArabic And GS4_Arab_AndroidOs but my phone's arabic is as it is as before.

I dont get any errors, no FCs, just arabic is as it is a before

My fon is Samsung Vibrant and rom is sweet honey 2.5 rom

When I was on Atriarc LG V2 then I flashed your arabic.zip (flashable) on that rom arabic was working fine but on some menu in english i was getting scrambled chracaters.

Is there a way to get it work on my current rom.
[Galaxy S I9000 Android Development] madmack:
sorry for not getting back to you on that one. I'm definitely considering it, but I have different priorities at the moment. I also cannot patch all libwebcore.so files for these devices, so if it gets done, CM6.x users will have to make-do with framework.jar only.

you said it worked for 2.1 Eclair sense UI ? which patch did you use exactly, the 2.2/2.2.1 ? I'm a little surprised.

you probably didn't replace the files correctly. something is wrong on your end

for the scrambled characters, please let me know which exactly are so I can try to replicate it on my device. Everything seems to be working perfectly fine here.
[Galaxy S I9000 Android Development] jaikat:
libwebcore.so is not needed, cause like i said earlier, the one(libwebcore.so) offered at cyanogen4arab.com works for later versions, so framework.jar will be enough... and i hope you can find the time to include y6b's patch in your patch menu...

as for trying this on Sense, i used your patch version 0.784 and it worked perfectly on 2.1 Sense for my HTC Hero..

i'll provide you with logcats for 2.1 and 2.2 Sense tomorrow inshaallah..

again, i hope you find the time to include y6b's patch, because libwebcore.so is not an issue, we only need framework.jar...
[Galaxy S I9000 Android Development] madmack:
good to know. I'll see if it can be done in my spare time
[Galaxy S I9000 Android Development] P Y T H O N:
thank you Madmack for your great work .I try it on my nexus one with CM7 and its looks great

just wondering if this work on the official release of 2.3.3 for N1 ?

thanks again
[Galaxy S I9000 Android Development] madmack:
it might.

try to patch framework with the 2.2/2.2.1 patcher first. If it bootloops, try the CM7 patcher and reboot again.

let us know here if you had any luck
[Galaxy S I9000 Android Development] madmack:
jaikat,

have you actually tried applying my 2.2/2.2.1 patch on CM6.x ? I couldn't find whether you mentioned that or not.

If you did, what happens ? does it get stuck at bootup ? please do give me a logcat if so.
[Galaxy S I9000 Android Development] jaikat:
i did try applying 2.2/2.2.1 on 6.1 final for HTC Hero, it gets stuck at boot, i'll post a logcat for it today, along with the other two logcats, the one for 2.1 Sense(which works) and another with 2.2 Sense(which i'm going to try today)..
[Galaxy S I9000 Android Development] jaikat:
@madmack

logcats coming up :)

i'm posting two for now:

1- one for 2.1 Sense(which boots fine). the log starts from boot, i opened a message, wrote a word in arabic, then shut down...

2- one for cm6.1 final for the Hero(which won't boot). the log is for the boot process(obviously). i replaced framework.jar, wiped dalvik cache, rebooted, i left it for a few minutes, and then pulled the plug..

i'll post a logcat for 2.2 Sense tomorrow, things got messed up at work and i couldn't get the job done..so, tomorrow..sorry.
[Galaxy S I9000 Android Development] madmack:
the solution seems a lot easier than i initially thought. Its just the way CM6 renames some native JNI calls thats causing this mess. The solution would be to replace only one smali file. I wish I had a CM6 device to test this on.. hmmm
[Galaxy S I9000 Android Development] D69K:
Assalmu Alaikom

i tried your patch (chose Patch 2.2/2.2.1) with the new Desire S and Desire HD leaks (gingerbread 2.3.3/2.3.2 sense)

and i got bootloop on both :(

i'll try to upload my log (i don't know how to use logcat yet but i will try to figure it out :))

i just used framework.jar and didn't try libwebcore.so

i really hope that you can fix this .. so we can finally have the joy of using gingerbread on our devices :)

currently it's useless for us Arabs with no Arabic support :(

may God be with you.
[Galaxy S I9000 Android Development] madmack:
If you managed to pull up the logcat, please also do mention which patch did you choose with the prompt: 2.2.1/2.2 or the CM7 patch. That'll help me narrow down the problem.
[Galaxy S I9000 Android Development] j_h3000:
hello again madmack... remember when i said that patching process didnt work with docs js8 ?

well i kept trying to patch it along with other framework.jar from many themes here and same thing happend ... the generated framework.jar is the same as the original one "well at least the size is the same" so qould I be missing something here ? would you plz help ?
[Galaxy S I9000 Android Development] D69K:
finally :)

HERE is my logcat file

i used 2.2/2.2.1 method.

i haven't tried CM method

my device is HTC Desire HD

I'm using CoreDroid 4.5 DHD build which is 2.3.3 gingerbread with sense.
[Galaxy S I9000 Android Development] jaikat:
If you provide me with the patch i'll be more than glad to test it..
[Galaxy S I9000 Android Development] madmack:
I don't know what the problem is because I can't replicate it here. If the generated file is the same size, you're definitely doing something wrong or something is broken.

I ran CM6.2 on my emulator and got the arabic patch working ;) I'll need to try one more thing before I give you a patch to try.. hold tight !
[Galaxy S I9000 Android Development] madmack:
omg, so many problems !! it seems we'll have to reapply my patch for gingerbread before we can do anything meaningful really.. you'll have to wait until we get this gingerbread thing sorted out.
[Galaxy S I9000 Android Development] madmack:
@jaikat

apply the CM7 patch on your CM6.x system and report back.
[Galaxy S I9000 Android Development] D69K:
ahh too bad :(

but just to be sure, let me tell you what i did exactly.

at first I powered up my phone and then immediately started logcat.

i was getting bootloop while logcat was recording.

and about 3 minutes after, my screen turned all black and i could no more see the boot animation, then i stopped logcat.

after that it stuck at the black screen for about 15 minutes after. until I restarted and flashed my backup.

i really appreciate all the hard work you put on this project.

you might be the first one to do this for gingerbread with scene :eek:

if you want a beta tester i'm all yours, just PM me, and my device is under your command :)

Regards.
[Galaxy S I9000 Android Development] madmack:
The logcat and your method is fine, the content, however, is not ! lol

thanks though. I'll keep you in mind if I got something ready for GB.
[Galaxy S I9000 Android Development] jaikat:
@madmack

i want to start by saying that i'm a real fool, i don't know where i got things messed up with the patching and roms and all that, but your cm7 patch does work on cm6.1 for the HTC Hero...

alright, i got good news, and bad news..

first i got you 4 logcats, each for a different froyo (2.2) rom, two of them are Sense roms, and the other two are cm6..

1- for the froyo sense rom:

a) i tried the cm7 patch first, it didn't boot... the logcat is available

b) i tried the 2.2/2.1 patch, and it worked, the phone boots, i can read and write arabic perfectly, but the lam-alef problem exists..

2- the cm6 roms:

a) i tried the cm7 patch on a rom based on cm6.1 final, this rom is made developed by a guy who included an RTL fix... the rom boots fine, arabic is supported, no lam-alef problem, which is just great..

b) i tried the cm7 patch on another rom based on cm6.1 final, this one doesn't include the RTL fix, adding arabic was successful, both read and write, but the lam-alef problem exists here...

i also opened a new message to typed a couple of words in all the roms that the patches worked in...all while logcat was running...

the logcats are named according to their respective cases...
[Galaxy S I9000 Android Development] madmack:
by lamalef problem i take you mean the space after them ?

that's something my patch does, and i don't know how your cm7 in a) didn't have a space after lamalef because my patch certainely does add that in to preserve string sizes.

the CM patch will never work on non-CM frameworks, so thats normal. I'm glad the 2.2/2.2.1 patch works on the Sense UI Froyo builds.. you're the first guy to confirm that so thats cool.

so far my patch does not work on Sense Gingerbread. All others seem to be doing just fine.
[Galaxy S I9000 Android Development] jaikat:
yes that is exactly what i meant, the space after...

as for how/why the space doesn't appear in that particular rom, i don't know. but like i said, its the only one i tried where the developer says he included an RTL fix, in fact, i think he's one the guys that publish their work on i.android.co.il, so i think he got it from there or something..

i'm glad things worked out after all, i mean for me at least, and anyone who wants to use the patch for cm6 i guess... you should get the word out that cm7 should work for cm6 in your first post or something..

i was thinking of posting the links to the roms which were successfully arabized and their respective framework.jar(s) on ce4arab.com, if you don't mind of course.. and of course i'll put your name(nickname) in reference to the work you've done... i'm sure many will be happy to know that their Hero still has life in it after all :) or, maybe you'd like to do it yourself... let me know..

one last thing, isn't there a way to get rid of the space after lam-alef? another way to preserve the string sizes??
[Galaxy S I9000 Android Development] madmack:
yea, i'll update the patch to say CM6/CM7 instead of CM7 when i get a moment.

the space after lamalef is a big hassle. I actually did try to overcome this problem in one of my patches. you go can go to my blog and see the version history, one of em does fix it but causes issues elsewhere. that was as far as i got with it. I had to abandon the whole thing after that to perhaps the summer or something, coz its a fun and challenging problem that will take a while to fix and involves more than one file to get right. the major issue was with writing. I can overcome the lamalef read problem pretty easily, but again, that messes up the writing so badly. If you wanna know how a messed up writing looks like, simply get CM7 and try the arabic version on it; spaces are inserted at random, weird characters and replicated ones appear at the beginning and end of strings unexpectedly.. etc

the ICU4J library provides different way to handle that problem. put the space after the lamalef, at the beginning of the string, or at the end of the string. if you choose any of the last two, it'll fix reading strings, but not writing. spaces at the beginning or end of strings that user did not input devastate the messy methods that Android implements in SpannableStringBuilder.java ! i know this the hard way.

if you simply resize text to return something smaller.. well, programs aren't aware of that size change, so they try to set characters that are in range, but out of range in the shaped string and boom, you get force closes all over the place.

that's simply the dilemma here. its a lot more complicated than it seems, that's why i put up my code online so that perhaps some brave soul would take the challenge themselves :)

edit: forgot to tell you that you can absolutely go ahead and post working frameworks wherever you want. just make sure you do reference things correctly :) thanks for asking
[Galaxy S I9000 Android Development] jaikat:
Well i'm no dev by any means, or anything close to being one for that matter... i wish i knew more about android/java to lend a helping hand to others, the way you and other devs are helping..

I'm planning on openning threads for each rom, and i'll make sure to refer to both this page and the arabic one on ce4arab.com(yeah i saw that one too)... after giving you the credit for the framework patch of course...

I'll be watching this thread and your blog for anything new... thank you, really, and keep it up..
[Galaxy S I9000 Android Development] jaikat:
@ madmack

uhhmm... i'm back already.. :)

i'm sure you're aware of an app called "Arabic Android" in the market, developed by a guy called Ayman Al-Sanad, yes?

this guy has made available libwebcore.so(s) for Sense based roms, such as the HTC Desire, among others...

what i wanted to ask is, how, in your opinion, was he able to patch the libwebcore.so files for Sense roms, despite the fact that Sense roms are not open source!!

you can check his site at ardoid.com
[Galaxy S I9000 Android Development] madmack:
yea, of course I'm aware of his closed source work :rolleyes:

webcore is not closed source. its open because its licensed differently than all other android components. if you dig htc's development site, you'll find the webcore sources. just like Samsung had to do. I believe the licensing is GPL (which they have to share) vs the framework (Apache license) which they're not obliged to share and is used for other android components.
[Galaxy S I9000 Android Development] mariotme:
Hey Madmack thank you for your efforts and amazing work.

I just wanted to point some kind of bug after flashing the CWM version.

I flashed it on Darky v9.3 and v9.4 also Insanity Rom's and i noticed that after flashing the CWM arabic shaping mod it breaks something in the Extended power menu. and it seems its just the recovery button from the extended power menu. After pressing it the phone vibrates a couple of times and then just reboots. :)
[Galaxy S I9000 Android Development] madmack:
yea, that's not a bug. the CWM file is based on stock JS5. If you use any of these framework mods (battery, extended power menu, themes) then you'll have to patch their framework manually and put it on your device.

I'll try to make the patcher process a bit easier in the next version by creating a new CWM file for you when you patch framework.jar manually.
[Galaxy S I9000 Android Development] mariotme:
Oh ok thats great that you know exactly whats wrong ;)

Amazing news looking forward to the new CWM update, coz am kinda noob to do all that other stuff in the first post :S

Keep it up man

thanks once more

Edit: forgot to mention Flashing the CWM arabic patcher on Insanity's Rom didnt work i ended up with Squares instead of Arabic letters :[
[Galaxy S I9000 Android Development] madmack:
new version out. check out my blog for the change log.

you guys are also very welcome to try this new version on Sense UI Gingerbread. As always, please do provide a logcat if the phone gets stuck at bootup.
[Galaxy S I9000 Android Development] D69K:
Assalamu Alaikom Madmack I've been following the thread silently :) hoping for some news about gingerbread with sense and finally it's here :)

i've downloded the new version, and now i'm flashing 2.3.2 sense ill let you know when i finish testing :)

EDIT 2 :

It might be a problem with the new CWM zip file, it seems that it doesn't flash properly.

I'm checking now i will let you know.

EDIT 3 :

YES there is a problem with the generated CWM update file, it doesn't flash anything. (I'm using CWM v3.0.0.6 i don't know if it related or anything)

so i replaced framework.jar with the one inside the *.zip file and i got bootloop just like before :(

i have included the logcat file HERE

i'll be waiting :)

this page has become the no.1 visited in my firefox bookmarks lol.