yashsingh1/xdaforums huggingface dataset:
[Galaxy S I9000 Android Development] jaguaralani:
Of course I did,

stuck at boot screen ... used version 0.813 of your patcher ...
[Galaxy S I9000 Android Development] madmack:
make sure you've chosen Sense UI in the patcher menu. If you did, then give me a logcat of the bootloop. I need something to work with.
[Galaxy S I9000 Android Development] madmack:
beta testers needed

guys, I'm just done with 0.900 of the patch.

I'm not putting this up on the blog yet because it's rescripted and uses a different patching program for libandroid_runtime.so and libwebcore.so (both hebrew and arabic patches). The tool is developed by brightidea and it's his latest 1.9B.

See if this works with JVT. I've ran a couple of tests just to make sure my new run script doesn't have any bugs but I haven't tested it on the device per se.

http://www.multiupload.com/Q2XIACELL3 (Edit: Thanks for those who tested it. Please refrain from testing any further :) )

Appreciate any feedback.
[Galaxy S I9000 Android Development] jaguaralani:
Unfortunately mate, I have reverted back to the Arabic Stock Rom :(
[Galaxy S I9000 Android Development] Chief_Death:
will try as soon I return home thanks madmack
[Galaxy S I9000 Android Development] darkmoon078:
السلام عليكم

I tried the new patcher, but it didn't work with me, I got boot loop.

ps: i tried to get logcat but I couldn't be able to do that, I don't know why!
[Galaxy S I9000 Android Development] madmack:
Thanks for testing.

Here is 0.901 that will work

http://www.multiupload.com/KZH2N0ASEZ

The JVT problem is solved guys :)

I'll put that up on the blog in a sec.
[Galaxy S I9000 Android Development] Chief_Death:
Will try it ASAP :)

Thanks madmack
[Galaxy S I9000 Android Development] darkmoon078:
tnx madmack, it works like a charm :)

ps: the new patcher made my system stop responding after finishing patching which forced me to log off :confused:, I have win 7
[Galaxy S I9000 Android Development] Rahulrulez:
It didn't happened with me.. everything's working like a charm. Maybe some other process / app did this.
[Galaxy S I9000 Android Development] Rugal:
Thanks, I used your new script pack and apply your updates to MIUI RTL script .. It works great here also .. Thanks :D
[Galaxy S I9000 Android Development] hatemk:
madmack,

Will this work if I deodex framework.odex, apply the patch and then re-odex it again?
[Galaxy S I9000 Android Development] madmack:
won't work. you'll need to reodex all the dependencies as well afaik.

some folks said u can patch the signature and get it working, but i haven't had much luck personally.
[Galaxy S I9000 Android Development] hatemk:
I gave it a go earlier today, only to get stuck at the htc logo boot screen. I will try to look at patching the signature although i can't imagine how can that work.
[Galaxy S I9000 Android Development] madmack:
news

:D:D:D
[Galaxy S I9000 Android Development] migamax:
so can you pull the arabic files and maybe try to decode or patch it into somehow make it work in SGS1:D
[Galaxy S I9000 Android Development] hatemk:
Thanks for the patch. Finally it worked for me but not before deodexing the whole rom.

I've tried several times with deodex-redex-copy_signature approach with no success despite of the several guides showing otherwise. On my luckiest trial, the phone booted to the lock screen but I had repeatable fc for htc launcher and the phone wasn't usable at all (not even after clearing dalvik-cache or a factory reset).

I can only assume that dalvik somehow checks the signature against the dex file before loading it and the patched framework doesn't check to the copied (old) signature.
[Galaxy S I9000 Android Development] madmack:
nah man. it means that i won't have to maintain this arabization anymore given that Google is taking care of it themselves.

ICS is completely reworked at the text and webkit level. I was worried that we might have to wait a while before our RTL changes can be ported. But Google did take care of it so that will no longer be needed.

As for you, I think your best bet is to wait for ICS to land on the I9000 :) I won't be porting anything given that I already have work done (with many hours spent on it) that works quite well for all versions before ICS.

thanks for letting us know.

i think framework.jar is such a major player in the android system that we can't simply just deodex-reodex it without messing up the hard references from the other jars/apks. most of the deodex-reodex-signature-patch work was done with files that have little to no dependency afaik.
[Galaxy S I9000 Android Development] jaguaralani:
@ MADMACK,

Dear mate,

Good day,

I still have no luck making this patch work in HTC FLYER DEODEXED ROM,

Would it be OK if I uploaded to you the framework.jar + the 2 lib files to help me (us) in arabizing the rom ?

P.S. Please do not ask me to post the logcat, I do not have the rom now on me device....

Thanks..
[Galaxy S I9000 Android Development] madmack:
you know how these things work?

I can't do anything with your files given that i don't have your device. they simply won't run anywhere so they're useless to me.

logcat or it didn't happen :rolleyes:
[Galaxy S I9000 Android Development] DrForIslam:
Thanks very useful :)
[Galaxy S I9000 Android Development] jaguaralani:
Ok me mate,

LogCat attached :cool:
[Galaxy S I9000 Android Development] roenano:
Can you please upload your framework.jar? I think I found the problem.
[Galaxy S I9000 Android Development] madmack:
bad news man :(

dalvikvm( 2850): ERROR: Unable to find decl for native Landroid/graphics/Canvas;.native_resetBitMapMask:(I)V
dalvikvm( 2850): ERROR: Unable to find decl for native Landroid/graphics/Canvas;.native_checkVisibility:(III)Z

In other words, HTC changed the Paint.smali file and my AOSP file that I patched to include arabic is missing some methods that HTC added to that file. Namely native_checkVisibility and native_resetBitMapMask. these two's declaration is still there in libandroid_runtime.so but they were omitted by my patcher.

Two solutions. a) you have some experience patching smali files, all you have to do is add the two missing functions to my paint.smali file and repatch.

b) a better solution would be to find the diff between my smali file and the aosp paint.smali, then apply (with some minor tweaks) the same changes to your htc flyer paint.smali file.

I'm not going to do neither due to my lack in experience in smali and because I frankly don't own the device and hence won't need to invest the time in that personally.

If you can't do it yourself, maybe someone from the community can chime in :)
[Galaxy S I9000 Android Development] roenano:
That's the reason I asked him to upload the framework.jar...
[Galaxy S I9000 Android Development] madmack:
see :) our community is plentiful!
[Galaxy S I9000 Android Development] jaguaralani:
Sorry dudes, I wasn't around lately, just arrived and saw your discussions...

here is me framework.jar file :D
[Galaxy S I9000 Android Development] roenano:
OK, mate, I'm pretty sure it's done.

Go to madmaks patcher, browse to "arabic_script_0.901_windows\files\gingerbread\graphics"and replace "canvas.smali" file in there with the attached one (inside the zip).

Now run the patch normally (I think you should choose Sense UI). If you still have any problem a new logcat will be appreciated.

Good luck!
[Galaxy S I9000 Android Development] jaguaralani:
No Go ........ :(
[Galaxy S I9000 Android Development] roenano:
Strange, this method is no missing.

Gotta go now, will try something else later tonight.
[Galaxy S I9000 Android Development] jaguaralani:
Any updates buddies on the FLYER ISSUE ? :D
[Galaxy S I9000 Android Development] mehrzad1363:
any body idea how after Arabic shaping for any deodexed rom then odexing rom?
[Galaxy S I9000 Android Development] roenano:
Sorry, mate, I've been very busy the last days. Will see what I can do on Saturday if I have some time off.
[Galaxy S I9000 Android Development] hypermedic:
galaxy note

does this work for the galaxy note too?:confused:
[Galaxy S I9000 Android Development] jaguaralani:
____________:D____________
[Galaxy S I9000 Android Development] roenano:
OK, jaguaralani, I believe I found and fixed the problem.

Let me know if it works.
[Galaxy S I9000 Android Development] jaguaralani:
:confused::(:confused: No Go ...........
[Galaxy S I9000 Android Development] roenano:
We're advancing... Canvas.smali issue is gone!

now I have to check paint.smali LOL
[Galaxy S I9000 Android Development] jaguaralani:
So does this mean we have a light at the end of the tunnel ?
[Galaxy S I9000 Android Development] evanbigfan:
hope that wont be just a freight train coming your way ,
[Galaxy S I9000 Android Development] roenano:
Replace this paint.smali with the one in the same folder with Canvas.smali and run the tool again.

Good luck!
[Galaxy S I9000 Android Development] jaguaralani:
---:confused::(:confused:---

The device booted now FOR THE FIRST TIME

but got stuck at the stage of loading SENSE
[Galaxy S I9000 Android Development] madmack:
did you try to factory reset the device? the errors that I see from this logcat are not exactly related to the patch. it could be just a case of messed up Dex code which can be solved with a factory reset.
[Galaxy S I9000 Android Development] jaguaralani:
sure I did mate...
[Galaxy S I9000 Android Development] roenano:
+1 with madmack, the logcat is not showing anything related to the patch but permissions and failure loading classes errors.

I would suggest two different things you can try:

Option 1- Try running "fix permissions" in recovery after flashing the CWM RTL zip, then reboot.

Option 2- create a copy of the rom zip in your computer (just to have a backup) and push manually the files from the CWM RTL zip (dragging the '/system' folder from RTL zip to the rom zip should do the trick) then flash the rom normally and reboot.

*In both cases wipe dalvik-cache and cache partition before flashing the zip (full wipe recommended).
[Galaxy S I9000 Android Development] jaguaralani:
FINALLY IT WORKED..................

Things to Know...

1-flashing the output flashable cwm file FAILED (didn't replace files)

2-replacing the files manually from within the rom using root explorer FAILED (ROM hangs up, restart/factory reset causes lots of FC+Sense fails to boot)

3-COOKING THE FILES INTO THE ROM BEFORE FLASHING IT... WORKS LIKE CHARM, RTL+LETTERS ARE CONNECTED+BROWSER/GMAIL...

Thanks buddies......

P.S/ I used the latest 0.903 patcher...

PROBLEM : Only 1, NO ON SCREEN KEYBOARDS :D

ALL FORCE CLOSE EVEN AFTER FIXING PERMISSIONS
[Galaxy S I9000 Android Development] roenano:
Glad to hear that!

Regarding the keyboard issue, I'll need a logcat. Have you tried keyboards downloaded from the market?
[Galaxy S I9000 Android Development] jaguaralani:
tried 6 different keyboards so far..

none works

about the logcat, unfortunately I reverted back to stock rom just now after losing my temper :D

BUT I AM REINSTALLING IT NOW :)
[Galaxy S I9000 Android Development] jaguaralani:
LogCat 6-11-2011 KB FC Issues

LogCat 6-11-2011 KB FC Issues
[Galaxy S I9000 Android Development] roenano:
Try this one.
[Galaxy S I9000 Android Development] jaguaralani:
Testing now............

Doing Paint 1 + Canvas3 with Madmack 0.904 -----> FAILED TO PATCH ALL LIB FILES, ONLY FRAMEWORK GOT PATCHED.

Doing Paint 1 + Canvas3 with Madmack 0.902 -----> PATCHED ALL FILES SUCCESSFULLY, BUT SAME PROBLEM, NO ON SCREEN KEYBOARDS + 99% OF APLICATIONS DO NOT START ( FC )
[Galaxy S I9000 Android Development] madmack:
v0.904 webkit patcher seems to be causing issues. I might remove it from the download list
[Galaxy S I9000 Android Development] roenano:
I'm really sorry, mate. It's pretty hard to debug when you don't have the real thing in front of you.

If you send me a new logcat i'll have a look. But I think may be you should wait for a rom based on ICS that will natively support RTL rendering.
[Galaxy S I9000 Android Development] tzafrir11:
keyboard issue may be caused by missing lib.

open the keyboard.apk file with 7zip

look in folder lib\armeabi\

copy all *.so files to /system/lib on your phone (using adb or prepared rom image)

and make sure the keyboard is in /system/app

good luck :)
[Galaxy S I9000 Android Development] Rabia:
So guys what's the verdict does Arabic work, what are all the files where to put them and what's next
[Galaxy S I9000 Android Development] mab71:
Hi madmack, im using the galaxy tab gtp1000 with a deodexed rom. Can i use yr method to get arabic working on my tab?
[Galaxy S I9000 Android Development] MMarv:
Hi madmack, and thank you for your great tool

I have a question: Does your tool support Persian language as well? I have installed MS2ginger2.1 (http://xdaforums.com/showthread.php?t=1140839) with corrected Arabic support using your tool. I see 3 out of 4 additional Persian letters in the Arabic character set of this ROM (only "ژ" is missing:(). I wonder if you can help adding Persian support to deodexed ROMs as well.

Thank you very much and in advance
[Galaxy S I9000 Android Development] MMarv:
Ok, the Farsi problem can be easily solved by using the attached font;)
[Galaxy S I9000 Android Development] madmack:
thanks, I might add that to the patcher and bundle it in the cwm file.
[Galaxy S I9000 Android Development] Rahulrulez:
Is this patch working with JW1?
[Galaxy S I9000 Android Development] ameerali19:
hi sir

i don't have enough idea in android , rooting etc

i have aHTC flyer with , could you please give me arabic ROM or arabic keyboard for this

sorry for my stupid question

thanks & regards
[Galaxy S I9000 Android Development] madmack:
correct. keeping their names intact that is.

yea, that happens sometimes. I recommend clearing dalvik cache and cache after flashing or replacing framework.jar to avoid that problem in the future.

its a warning, not an error. that's not the problem here really.

are you using sense ui ? my patch is perhaps not compatible with sense ui . a logcat on boot would be helpful to determine the cause.
[Galaxy S I9000 Android Development] zohawkish:
great job but after flash the extended menu stop working l canont enter to recovery ?
[Galaxy S I9000 Android Development] madmack:
you're probably using the cwm update file for js5 based systems. I patched a plain framework.jar without any modifications, so that's why you lost these functionalities when using the update file.

just run the arabic patch manually using the script file by overriding your own framework.jar and it should work.
[Galaxy S I9000 Android Development] goodwill4u1:
Hi Madmack,

i would really like to thank you, for your help and following and answering us when we need.

well, i runned the patch manually and besides having a non working extend power menu, i also have a bug that i confirmed after flashing 3 times the rom again starting for a 2.2 one odin then darky 2.3,

the bug is that when i receive or make any phone call, i always have a "midnight" word where i have to see the time of the call, to the right of the screen.

thank you if you can help

cheers
[Galaxy S I9000 Android Development] madmack:
I'm using darky 9.3 with r64 blue theme. patched it manually and my power extension menu works just fine. :confused:

if I can't replicate it, am afraid I can't fix it.
[Galaxy S I9000 Android Development] salghith:
MIUI arabic

ممكن الله يخليك تعريب الروم الصيني

من أول ما نزل ذا الروم و أنا أستخدمه لما كان جهازي نكسوس ون بتعريب يمشي الحال بدون تعريب المتصفح

أتمنى تعريب هذا الروم للجالكسي اس أمنية يا ناس
[Galaxy S I9000 Android Development] goodwill4u1:
Good morning madmack,

do you think open the rom in 7zip i want to patch and i copy to it in the specified folders the framework.jar and the libwebcore.co and the fonts to the fonts folders and then flash the rom, will it work as it should be? or i have to replace them after flashhing the rom using Root Explorer?

thanks
[Galaxy S I9000 Android Development] zohawkish:
Thanks it works.....just suggestion can u create a patch allow reading arabic from right to left ?
[Galaxy S I9000 Android Development] jaikat:
ok i got logcat running and attached the file, but i think the problem lies in the following lines:

D/AndroidRuntime( 356): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<

I/AndroidRuntime( 356): Heap size: -Xmx38m

D/AndroidRuntime( 356): CheckJNI is OFF

D/AndroidRuntime( 356): --- registering native functions ---

W/dalvikvm( 356): ERROR: Unable to find decl for native Landroid/graphics/Canvas;.native_drawText (Ljava/lang/String;FFLandroid/graphics/Paint;)V

E/JNIHelp ( 356): RegisterNatives failed for 'android/graphics/Canvas'

E/AndroidRuntime( 356): Unable to register all android natives

i did wipe dakvik cache but unfortunately i got the same result...

Aah yes, i forgot to mention that its not a sense rom its froyo based on cyanogenmod 6.1 for HTC Hero

i hope you can help me out here...

thanks
[Galaxy S I9000 Android Development] madmack:
you can totally replace the files in the 7zip update file or override them after flashing your ROM. they both should do the same job :) just make sure that the framework.jar and the libwebcore.so are the correct versions.

this is what this patch does :) arabic should work right to left.

Yea, CM6 is not supported currently. native_drawText is indeed not declared in Canvas.java for 2.2 and 2.2.1. It is declared in the CM7 patch though which you can't apply either because its for gingerbread CM only.
[Galaxy S I9000 Android Development] jaikat:
Well if that isn't bad news i don't know what is ..
[Galaxy S I9000 Android Development] madmack:
yea i know.

i can't port my code into all different branches and sources. It needs to be done with the help of the community. If anybody knows how to compile cm6 from source, all they have to do is look at my sources on github and patch it up themselves.

or . . . you could just wait until i get some free time to see if I can do that myself. But understand also that demand for CM6 is on the decline given that CM7 is being developed now.
[Galaxy S I9000 Android Development] goodwill4u1:
Hey Madmack

will it be possible to also have arabic keyboard like the one Darky has for his 9.2 version?

maybe its a matter of replacing a file somewhere inside the rom before flashing?

can you have a look at the Arabic enabled from fist post Darky's thread?

thx
[Galaxy S I9000 Android Development] jaikat:
i totally understand what you're saying, but there's still a plus here somewhere.. its true that cm7 is currently under development, but if that means anything, it means that cm6(froyo) is complete, or at least got to a point where it couldn't get any better..

another good thing about it, is that there won't be a need to patch all sorts of roms because, for example, in my case, all the froyo roms, well most of them, are based on cm6.1 final, so a patch for cm6.1 would mean all these roms will offer arabic support..

one last thing, i remembered at one point there was a patch offered on (cyanogen4arab.com), the blogger said that y6b had made the patches, and they're still available on the site for many devices, G1, magic, Hero, Desire, Nexus One, Evo... the patch fixed both framework.jar and libwebcore.so, back then i had used a rom called froydvillain version 1.5 which i think was based on cm6...

when cm6.1 final (for the Hero that is) got out, the new rom, froydvillain 1.7, was based on 6.1 final, and although libwebcore.so(the same one from the old patch) fixed the browser, the framework.jar was no longer compatible.. and this is why i reverted to your patch to look for answers..

you said that cm6 isn't supported, my question is: how did y6b manage to patch cm6 for all these devices i mentioned? isn't your patch based on his source? or is your method different??

so many questions, sorry... :o
[Galaxy S I9000 Android Development] zohawkish:
Thanks....Sorry but l mean to write from right to left...!
[Galaxy S I9000 Android Development] wanam:
Does "latest nightlies" include the experimental updates (update-cm-experimental-20110317.zip)?

If not, how to do it Allah ijazik bikhir.
[Galaxy S I9000 Android Development] wbsoul:
Thank you very much for your efforts developing this tool and for sharing it with the public.

am using Typhoon C7 build based on one of the latest C7 builds.

I tried first only by replacing the libwebcore.so with the one you supplied, i restarted and the web browser was showing arabic fonts connected RTL and numbers was showing without causing any problem.

then used the tool to patch my own framework.jar replaced it with the orginal one, restarted after clearing cache partition and delvik cache, and then also applications menus and content was able to show all Arabic characters and numbers correctly.

thank you very much again madmack, but why don't you participate in C7 coding by adding the patched code to Cayanogen mod ROM, am sure that they would be very interested for their build to have Arabic support, that will make it attractive for more people.
[Galaxy S I9000 Android Development] wanam:
Same question why they don't include your work, in the CM updates???
[Galaxy S I9000 Android Development] madmack:
I'm not sure which keyboard Darky is integrating with his ROMs, but these are generally a lot easier to copy into your rom than arabizing the whole Android framework so I think the scope is beyond this topic. I recommend Smart Keyboard Pro though (it does have arabic layout in it as well), you can grab that from the Market.

Oh, I think you're talking about my duplicate post over there. Actually, Y6b's code is based on CM6.1 ! Arabiziation should be available already for it, isn't it ?

go to this website http://www.cyanogen4arab.com/ and I think they cover a couple of CM6 frameworks for different phones that they've compiled for. Otherwise, because y6b was kind enough to share his code with us, integrating it into your own rom should be a piece of cake :D only needs some resources and time to recompile the whole thing :eek:

yea, writing should already be right-to-left. use a keyboard like "smart keyboard pro".

As long as codeworkx and the folks porting CM7 don't change the framework (which, so far, they haven't) you're good to use my cwm file. So yes, you can use it for the latest build. A good practice would be to try it out yourself after making a nandroid backup, and if it doesn't work, just restore your last copy and let us know here that it didn't work so I can patch the latest framework manually again and upload a new CWM file.

Cyanogenmod in general is extremely efficient and fast. My port of Y6b's and dudyk's alignment code is cool in that it works, but its a little resource heavy because it uses the java icu4j libraries (hence why your patched framework is about 1MB bigger than the native one). If someone would be able to replicate the functionalities of ArShaper.java (look in my github sources). Then I would say that this solution could be integrated into cyanogenmod and I would submit it myself. Unfortunately I haven't got enough time to work on implementing the shaper code myself, so we'll have to rely on this workaround until someone else implements these APIs him/herself.

I know Aziz Huss' shaper code is being used in the current CM7 build, but its a bit lacking because his shaper code resizes the strings when they include ALEF-LAM which icu4j doesn't, instead, it puts a space after each lamalef to keep the strings the same size as what you input using your keyboard.
[Galaxy S I9000 Android Development] jaikat:
i'm afraid i might'v gotten you mixed up with all that i said earlier :p

i know the site (cyanogen4arab.com), and i mentioned it in my earlier post, the patches available there only worked for a specific version of cyanogen based roms, later ones(mainly the ones based on 6.1 final) are not compatible with the patches there, only libwebcore.so is compatible, not framework.jar... they probably changed the framework :mad:

what really bugs me now is HTC, if only they would give us the source code for their Sense UI, every HTC customer would be happy :cool:

oh, i think you'd might like to know that i tried your patch on two Sense roms for the Hero(2.1 eclair) and it worked.. which is just great, but unfortunately libwebcore.so on sense roms is closed source, so its only half way for me :(