Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

[PC-UTIL] [Discontinued] [Source Opened] Android RTL Auto-Patcher + ProTools (v.1.5)

OP Ambious

10th January 2011, 04:34 PM   |  #1  
Ambious's Avatar
OP Senior Member
Flag Haifa
Thanks Meter: 387
 
1,629 posts
Join Date:Joined: May 2008
Donate to Me
More
Quote:

Discontinuation Notice + Source Opened!

Quote:


This project is now discontinued, as I have moved on to Android 4.X (ICS) which has perfect built-in RTL support.
I will still provide basic support as much as I can, but if your device has it, I recommend you move on to ICS as well.

If you wish to continue working on this project and improving, you have my blessing (as long as you credit me, of course).
Source code is available here, but be-ware: it's an undocumented, unorganized mess.


Android RTL Auto-Patcher
Version 1.5
The Problem

It's a well known fact that while Android has Hebrew and Arabic fonts, it has a problem with Right-To-Left alignment. The problem: It doesn't exist.
Sure, MOST programs display text correctly, but mix text and numbers in the same line and you'll get reverse numbers (123 appears as 321), and in SOME Google apps (like Gmail and Maps) the words themselves are reverse (so 'apple' appears as 'elppa').

The Old Solution

There is a solution for this, however you have to create a separate patch for every build, because the patch changes files in the build's framework. It's a relatively easy process, but for people who change builds constantly, it can get tiresome.

This Program

This program detects if a build is compatible with the patch, and if so - creates it almost automatically and install it back to the phone. A process that took about 10 minutes to complete before and required some knowhow, now takes only seconds and requires almost no prior experience!



ProTools
The ProTools are a collection of tools that will allow you to patch ROMs manually either directly to ZIP files, to the phone, or to framework files. It will also allow you to push, pull, extract and manipulate files to and from ROMs of all kinds, with great flexibility and ease!



Compatibility
This program is intended for use with custom DEODEXED roms of Android versions 2.1 and above. The program will inform you if your build is not deodexed.
The program will allow you to either push the fix directly to the device or flash via recovery.
WARNING: Some 'squashedFS' builds have been reported not to be compatible, and the program can not - at the moment - detect those!

Warnings
This program is in Beta stage!
Many features have not been thoroughly tested and error handling is far from perfect.
It may give some errors, crash or stall - at which point I ask that you please send me your log.txt (to find it, click 'About' and then 'Locate Log') or as an upload in this thread.

I do request - however - that you try to be as specific as possible regarding your build, your computer, and what caused the problem.
Also, if you include the log here, please enclose it in 'code' tags.

Requirements
  • You MUST have Microsoft .Net Framework 4 installed for this to work.
  • You will also need the latest Java Runtime Environment
  • You must also have the ADB drivers already installed:
    • In Windows Vista/7, just connect the phone and let Windows Update do it's thing.
    • In Windows XP, you need to manually install the drivers available here.
  • ADB itself comes with the program, so you don't need that.
How to use
  • If available, boot into recovery (recommended for non-rooted devices!)
  • Connect your phone to USB and make sure the computer recognizes it
  • Run the program, and select 'Test Connection'
  • After connection has been made, if the build is compatible - select the correct Sense version. The program WILL attempt to auto-detect, but it's not 100% reliable, so please confirm that the program detected correctly
  • Select distribution method:
    • Push to Device (Recommended) - does simply that, the program will attempt to automatically patch the phone for you.
    • Create ZIP - creates a ZIP file that's flashable through Recovery (Clockwork Recovery Mod). Will also offer you to save the ZIP on the SD card (doesn't even require mounting USB).
    • Show File - will just show you the patched 'framework.jar' so you can do whatever you want with it.
  • Select any additional options you might be interested in (Gingerbread keyboard, for example - is a fixed Gingerbread keyboard with fixed Hebrew RTL that is compatible with the patch the program installs. It should work on 2.2 devices as well, and replaces the stock Android keyboard).
  • GO GO GO!

Reporting bugs
Please be sure to provide the name and type of your build when giving feedback or reporting bugs. For better bug-squashing, please also provide your log.txt file, which you will find in the application's directory.

Also, even if you experienced no bugs, your logs will be appreciated.

Finally, if you put the the log content in your post, PLEASE encode it with 'code' tags.
If you have any additional non-bug-related questions, feel free to ask them in this thread. I will do my best to improve this program as time goes by.
Thank you, and good luck!

Download
Always available here:
Attached Files
File Type: rar RTLAutoPatcher-1.5.rar - [Click for QR Code] (4.67 MB, 13654 views)
Last edited by Ambious; 19th February 2012 at 11:53 AM. Reason: Discontinued
The Following 35 Users Say Thank You to Ambious For This Useful Post: [ View ]
10th January 2011, 04:36 PM   |  #2  
Ambious's Avatar
OP Senior Member
Flag Haifa
Thanks Meter: 387
 
1,629 posts
Join Date:Joined: May 2008
Donate to Me
More
Changelog, Known Issues and Planned Features
Changelog

1.5 - 14/08/2011
  • Advanced build numbers to 1.5 due to massive advances in the program.
  • Added global error handling - might not solve ALL problems, but will hopefully help avoid unlogged crashes.
  • When "Install Gingerbread Keyboard" and "Create Zip" are both selected, it will now also install the keyboard on the Zip.
  • The program will now also try to mount sd-ext in addition to system before patching (as will the flashable Zip).
  • When patching fails, the program will offer you to save the patched file to your computer for use with ProTools.
  • In the 'About' window, added the option to find the log file on your computer (for easier error reports).
  • Other minor undocumented improvements.
  • Completely overhauled the ProTools:
    • Offline Patching: Allows patching ROM Zips or 'framework.jar' files directly.
    • Manual Operations: Pretty much what ProTools was before, except with an easier straight-forward interface and with the option to operate on a ROM Zip file, from your phone, or directly from a 'framework.jar' file.
    • Added the option to manually push or pull anything to or from anywhere (with specific buttons for 'framework.jar', 'framework-res.apk' (for theming) and 'build.prop'.
    • Added the option to manually patch the Keyboard to the phone or the a ROM Zip.

1.1.2 - 20/07/2011 - minor update
  • Improved Sense 3.0 Detection
  • Updated build detection strings
1.1.0 - 14/06/2011
  • Fixed critical interface bug that caused the operation compelte / restart prompt not to appear if 'Push' was selected.

1.1.0 - 14/06/2011
  • Removed support for SD/SDRAM based builds
  • Instead, created three distribution methods: Push file, Create flashable zip or just Display file
  • Flashable zip will be flashable via recovery, and will attempt to push itself to the device's SD card.

Version 1.0.0 Beta
  • Build Detection:
    • Improved build properties detection
    • Vastly improved Sense detection mechanism
    • Sense versions now distinct by Sense version
    • Added Sense 2.1 (Gingerbread) support
  • 'Pro Tools' (Beta) - Every single function of the patcher can now be called on seperately and manually.
  • Changed versioning scheme. Version 1.0.0 to be assigned.
  • Updated core framework files (fixed a lot of stability issues in Sense2.0 builds)
Planned Features
  • I plan to seriously improve the RTL fix itself in the near future, but since I lack the knowledge to do so myself, I'm waiting for some new methods currently under development by the excellent devs at iAndroid.co.il to be released.
  • I do plan to release to program's source code eventually, it's just such a mess at this point that I'm more ashamed of it than anything else.
  • I also plan to include a logcat monitor. Because the patch causes the phone to rebuild dalvik cache, first boot after patching often takes a VERY LONG time, and some users wrongfully assume their phone is frozen. I plan to include a logcat monitor that will hopefully know to differentiate between bootloops, errors, and dalvik rebuilding, so users can tell if their phone is actually frozen or just working. If this works, I might release this as an actual separate program.
Known Issues
  • Build 1.1.0 - If 'Push' is selected, when patching process finishes, no message is displayed and the program doesn't prompt to restart. - fixed in 1.1.1
  • There is hardly any error handling in the ProTools section. If they are called with no device available, it MAY freeze/crash the program. Will be fixed in upcoming release.
  • Fixes for Squashed filesystem roms do not work! Mostly.
  • Error handling is STILL utter ****e, may give unexpected errors (or not at all and just fail altogether).
  • If HTC Sync is installed and active, stuff may go nuts all around (as of 0.0.5 this is detected by the program and warns user).
Credits

Program and Graphics created by Elad Avron using Visual Studio 2010 Express.

ZIP Functions created by Elad Avron using free libraries from the IC#Code group, available at http://www.icsharpcode.net/opensource/sharpziplib/

Special thanks:
From HTCAddicts.com: Ronenpg, Ohect.
From XDA-Developers.com: TheAgent1982, silverbluem, mdeejay and the entire HD2 dev crew
From iAndroid.co.il: Classicaldude (Original fix, the hero of RTL!), Dudyk (Original fix), rasmux (Modified fix), Liavk1 (partial SenseHD fix), Avicohh (Gingerbread Keyboard), N1Man (RTL fix for Gingerbread Keyboard).

Keyboard fix by Avicohh and N1Man (from iAndoird.co.il)
Last edited by Ambious; 14th August 2011 at 01:22 PM.
The Following 11 Users Say Thank You to Ambious For This Useful Post: [ View ]
10th January 2011, 04:46 PM   |  #3  
Life Engineer's Avatar
Senior Member
Flag Jounieh
Thanks Meter: 231
 
1,074 posts
Join Date:Joined: Jun 2010
More
If it will work man i'll give you a real big THANKS!
The Following User Says Thank You to Life Engineer For This Useful Post: [ View ]
10th January 2011, 04:51 PM   |  #4  
jaguaralani's Avatar
Senior Member
Flag Perth
Thanks Meter: 590
 
2,089 posts
Join Date:Joined: Aug 2007
Donate to Me
More
Talking


Just tried it V 001 , successfully connected + fetched framework+modified then pushed classes back....
log attached


PC - Win7 + net 4
LeoAndroid - Desire Z ....

Device restarted, passed the first splash (hTC) screen, took very long on the animation one, then started !

Changes :

1-No right side line alignement..
2-Numbers are still wrongly placed..
Attached Files
File Type: zip log.zip - [Click for QR Code] (1.3 KB, 186 views)
The Following User Says Thank You to jaguaralani For This Useful Post: [ View ]
10th January 2011, 05:16 PM   |  #5  
Voffchik's Avatar
Senior Member
Flag Tel-Aviv
Thanks Meter: 19
 
233 posts
Join Date:Joined: Apr 2009
More
Tested and it workes!
Got an error in middle of the prosses but in the end it did what it was supposed to do.

Sent from my HTC HD2 using XDA App
10th January 2011, 05:24 PM   |  #6  
Senior Member
Thanks Meter: 33
 
752 posts
Join Date:Joined: Sep 2007
Donate to Me
More
Thumbs up congratulation
Congratz of your new Project!
I will give it a shot as soon as i can
10th January 2011, 05:52 PM   |  #7  
Member
Thanks Meter: 3
 
37 posts
Join Date:Joined: Jan 2008
Smile my teset here ..
this is my test in the log file attached

thx
Attached Files
File Type: txt log.txt - [Click for QR Code] (7.2 KB, 103 views)
10th January 2011, 06:12 PM   |  #8  
Member
Flag jeddah
Thanks Meter: 34
 
49 posts
Join Date:Joined: Apr 2006
More
I appreciate your efforts

reverse numbers problem still exits

big thanks
10th January 2011, 08:21 PM   |  #9  
Ambious's Avatar
OP Senior Member
Flag Haifa
Thanks Meter: 387
 
1,629 posts
Join Date:Joined: May 2008
Donate to Me
More
Quote:
Originally Posted by Voffchik

Tested and it workes!
Got an error in middle of the prosses but in the end it did what it was supposed to do.

Sent from my HTC HD2 using XDA App

Thanks :)
Can you send me your log.txt?
I'd like to see what the error was.
The Following User Says Thank You to Ambious For This Useful Post: [ View ]
10th January 2011, 08:26 PM   |  #10  
Ambious's Avatar
OP Senior Member
Flag Haifa
Thanks Meter: 387
 
1,629 posts
Join Date:Joined: May 2008
Donate to Me
More
Quote:
Originally Posted by Sup3r

I appreciate your efforts

reverse numbers problem still exits

big thanks

Can I get build type and log file please?
Thank you :)

Quote:
Originally Posted by jaguaralani



Just tried it V 001 , successfully connected + fetched framework+modified then pushed classes back....
log attached


PC - Win7 + net 4
LeoAndroid - Desire Z ....

Device restarted, passed the first splash (hTC) screen, took very long on the animation one, then started !

Changes :

1-No right side line alignement..
2-Numbers are still wrongly placed..

The log indicates that you did everything right and experienced no errors, so there are two things I'd like you to try:
  1. In the 'Toolbox' dir in the app dir, the leftover files from the creation process are left. Try pushing framework.jar manually to the device.
  2. If that doesn't work, try putting 'classes_new.dex' in 'framework.jar', renaming it to 'classes.dex' (thus replacing the old one), and repeat step 1.
  3. If that doesn't work something went wrong in the patching process itself, i.e. my source files aren't good for your build (they should be), the compression failed, or any step in between. Let me know if the leftover framework.jar and classes_new.dex solve the problem, and we'll try to isolate the problem from there.

Thank you all for helping :)
Last edited by Ambious; 10th January 2011 at 08:29 PM.

The Following User Says Thank You to Ambious For This Useful Post: [ View ]
Post Reply Subscribe to Thread

Tags
application, right to left, rtl patcher
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes