Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,731,300 Members 53,083 Now Online
XDA Developers Android and Mobile Development Forum

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

Tip us?
 
Ambious
Old
(Last edited by Ambious; 19th February 2012 at 10:53 AM.) Reason: Discontinued
#1  
Ambious's Avatar
Senior Member - OP
Thanks Meter 342
Posts: 1,537
Join Date: May 2008
Location: Haifa

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

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, 13305 views)
Code:
/phone/model/:# HTC One M8 (S-OFF)
/phone/rom/:# MaximusHD | 6.0.1 | Android 4.4.3 (2.12.401.3)
/phone/recovery/:# TWRP 2.7.1.0 Touch Recovery

/tablet/model/:# Asus Nexus 7 (2013) - 32GB LTE (deb)
/tablet/rom/:# ParanoidAndroid (Android 4.4.4) / Ubuntu Touch (Experimental)
/tablet/recovery/:# TWRP 2.7.0.0 Touch Recovery (MultiBoot Enabled!) 
The Following 35 Users Say Thank You to Ambious For This Useful Post: [ Click to Expand ]
 
Ambious
Old
(Last edited by Ambious; 14th August 2011 at 12:22 PM.)
#2  
Ambious's Avatar
Senior Member - OP
Thanks Meter 342
Posts: 1,537
Join Date: May 2008
Location: Haifa

 
DONATE TO ME
Default 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)
The Following 11 Users Say Thank You to Ambious For This Useful Post: [ Click to Expand ]
 
Life Engineer
Old
#3  
Life Engineer's Avatar
Senior Member
Thanks Meter 218
Posts: 1,041
Join Date: Jun 2010
Location: Jounieh
If it will work man i'll give you a real big THANKS!
LG G2 D802 - CPU binned 3
Current ROM: Spiderio 380dpi ROM v1.2b android 4.4.2
Current Kernel: Stock

Previously owned devices: Nokia N96>HTC HD2>HTC DESIRE HD>SG NEXUS>HTC SENSATION XE>SGSII>SGSIII>LG NEXUS 4>LG G2
Damn! I think I got it... I got ORD => Obsessive ROM-updating Disorder => Click here!
If I helped in any means please click the "Thanks" button and that will do!
The Following User Says Thank You to Life Engineer For This Useful Post: [ Click to Expand ]
 
jaguaralani
Old
#4  
jaguaralani's Avatar
Senior Member
Thanks Meter 582
Posts: 2,062
Join Date: Aug 2007
Location: Perth

 
DONATE TO ME


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, 181 views)
The Following User Says Thank You to jaguaralani For This Useful Post: [ Click to Expand ]
 
Voffchik
Old
#5  
Voffchik's Avatar
Senior Member
Thanks Meter 19
Posts: 233
Join Date: Apr 2009
Location: Tel-Aviv
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
HD2 RIP
All hail to SGS2!!!
 
TheAgent1982
Old
#6  
Senior Member
Thanks Meter 33
Posts: 748
Join Date: Sep 2007

 
DONATE TO ME
Thumbs up congratulation

Congratz of your new Project!
I will give it a shot as soon as i can
If you like my work...
For more experience and teaching!

Please Donate
USD EUR ISL


HTC HD2 (aka LEO) T8585
ROM:
EnergyROM "LEO" Series
VS
ANDROID MDJ Series
Radio: 2.15.50.14 ( Lastest Official HD2 Rhodium Radio )

HTC Touch Pro 2
ROM:
EnergyROM 3.0 "LEO" Series
Radio: 4.49.25.91 (Lastest Official TP2 Rhodium Radio)

HTC Touch Pro - SOLD
ROM: EnergyROM 3.0 "Warhawk" Series
Radio: 1.14.25.05 ( Official Raphael Radio )
 
downloadzy
Old
#7  
Member
Thanks Meter 3
Posts: 37
Join Date: 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, 102 views)
 
Sup3r
Old
#8  
Member
Thanks Meter 34
Posts: 49
Join Date: Apr 2006
Location: jeddah
I appreciate your efforts

reverse numbers problem still exits

big thanks
 
Ambious
Old
#9  
Ambious's Avatar
Senior Member - OP
Thanks Meter 342
Posts: 1,537
Join Date: May 2008
Location: Haifa

 
DONATE TO ME
Quote:
Originally Posted by Voffchik View Post
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.
Code:
/phone/model/:# HTC One M8 (S-OFF)
/phone/rom/:# MaximusHD | 6.0.1 | Android 4.4.3 (2.12.401.3)
/phone/recovery/:# TWRP 2.7.1.0 Touch Recovery

/tablet/model/:# Asus Nexus 7 (2013) - 32GB LTE (deb)
/tablet/rom/:# ParanoidAndroid (Android 4.4.4) / Ubuntu Touch (Experimental)
/tablet/recovery/:# TWRP 2.7.0.0 Touch Recovery (MultiBoot Enabled!) 
The Following User Says Thank You to Ambious For This Useful Post: [ Click to Expand ]
 
Ambious
Old
(Last edited by Ambious; 10th January 2011 at 07:29 PM.)
#10  
Ambious's Avatar
Senior Member - OP
Thanks Meter 342
Posts: 1,537
Join Date: May 2008
Location: Haifa

 
DONATE TO ME
Quote:
Originally Posted by Sup3r View Post
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 View Post


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 :)
Code:
/phone/model/:# HTC One M8 (S-OFF)
/phone/rom/:# MaximusHD | 6.0.1 | Android 4.4.3 (2.12.401.3)
/phone/recovery/:# TWRP 2.7.1.0 Touch Recovery

/tablet/model/:# Asus Nexus 7 (2013) - 32GB LTE (deb)
/tablet/rom/:# ParanoidAndroid (Android 4.4.4) / Ubuntu Touch (Experimental)
/tablet/recovery/:# TWRP 2.7.0.0 Touch Recovery (MultiBoot Enabled!) 

The Following User Says Thank You to Ambious For This Useful Post: [ Click to Expand ]
Tags
application, right to left, rtl patcher
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes