1. MIUI is one of the best android ROMs, based on Android 4.1 Jelly Bean MIUI provides a fresh user experience with Cloud services, backup and security tools. MIUI is released every Friday round 12pm UK time. MIUI is now 3 years old and is growing stronger every day with over 10 million users world-wide.

[MOD]Multilanguage T9 dialer (ES-RU-GR-PL-SW-DE-HU-KO-VI-CZ-SK-SL-TR-HE-AR-PE-UK)

Discussion in 'MIUI Mods' started by roenano, Jun 28, 2011.

  1. roenano Members

    Message Count:
    707
    I have promised this mod to many people for long time. After I found the way to make it work with custom languages other than Hebrew (the one was made for in first place), I'm glad to announce I'm taking requests.

    First I want to credit 4PDA.ru people for cracking it in fisrt place and Yosriz for the reverse engineering to have it working for Hebrew (the actual code I base my work on) and lenny_kano for merging all languages together.

    If you want me to make this mod for your language, you'll have to provide me the unicodes for each additional character that have to be searched and in which number it appears. If the character appears in the English alphabet there's no need to add it. For example:

    Spanish:
    Number 2: á (00E1) - Á (00C1)
    Number 3: é (00E9) - É (00C9)
    Number 4: í (00ED) - Í (00CD)
    Number 6: ñ (00F1) - Ñ (00D1) - ó (00F3) - Ó (00D3)
    and so on....

    You can find the unicodes HERE
    Or by typing them HERE

    In addition you will have to edit the dialpad drawable in order to see your local characters in there. Once is made just send it to me and i will make a Theme out of it for easy installation. (find the png attached)

    NEW!!
    As I've been very busy with exams and had not time to update (plus not as much downloads as I expected), I decided to make an automatic tool so everyone can patch his own rom.

    Changelog:

    V1 - Initial release.

    V1.1: - Added Korean language and small fix for Windows 64bit users.

    V1.2: - Added Vietnamese and Czech languages plus some small improvements to the code

    V1.2.1: - Fixed Czech T9 not compiling.

    V1.3:
    - Added missing Czech Characters plus some others to comply with Slovak and Slovenian too! So now it will be Czech, Slovak and Slovene all together!
    - Fixed issue with missing bracket in the .BAT file.

    V1.4b3:
    - Thanks to "lenny_kano" all languages have been merged!! So now no need to select yours, it will be one file for everyone.
    - Updated hanzitopinyin.smali to latest.
    - Potentially fixed missing character in Vietnamese (needs confirmation from users).
    - Added ability to patch manually on computer.
    - some small improvements to the tool code.
    - Added a small check to verify if there was any change to the stock file that needs to be replaced. If there was any, you will get a WARNING message and will be asked to decide if to go ahead or quit.
    *Some times the change is minor and it shouldn't affect the T9 patch, so I would recommend trying it and in case something goes wrong after pushing it to the device just restore the stock framework.jar.

    V1.4b4: - Added Hebrew, Arabic and Persian.

    V1.4b6: (latest)
    - Added Ukrainian
    - Fixed problem with Greek search putting 7, 8 and 9 letters into 6.
    - Fixed Russian searching only for capital letters.
    - Removed some unnecessary tools (apktool and aapt) that I don't know why I put them there in first place... :)

    Instructions:
    For this to work you will need "java" and "adb drivers" (for "On device" patch) installed in your computer.
    * Unzip the contents of "Auto-T9_dialer-V##.zip" to any folder in you computer.

    On device
    1- Reboot into recovery
    2- Make a nandroid backup!!!
    3- Connect your phone to the computer.
    4- Run "MIUI-T9-multi.bat" and select "On device".
    5- Wait for it to finish, it will take some time... It pulls framework.jar file from your device, de-compiles it, replaces a file, re-compiles framework.jar and pushes it back to your device. At the end you will get a "ALL Done.!" "Press any key to finish..." message.
    6- Wipe Cache and Dalvik-Cache.
    7- reboot.
    9- Go to Contacts Settings and press "Re-build T9 index data" at the bottom.

    On computer
    1- Place framework.jar from /system/framework on your rom zip or device and put it on the tool's root folder (just next to the BAT file)
    2- Run "MIUI-T9-multi.bat" and select "On computer".
    3- Wait for it to finish, it will take some time... it de-compiles framework.jar, replaces a file, re-compiles it. At the end you will get a "ALL Done.!" "Press any key to finish..." message. The new patched framework.jar will be in 'generated' folder.
    4- After installed (in any way you like) on the device you should go to Contacts Settings and press "Re-build T9 index data" at the bottom.

    ** If anything goes wrong after rebooting, go back into recovery, run "MIUI-T9-multi.bat" and select "20" (restore stock). It will restore the backed up framework.jar you had installed before applying the patch.
    And please send me the generated log.txt from root folder


    Download the tool:

    1.9.30 or higher:
    Auto-T9_dialer-V1.4b6.zip

    1.9.24 or lower:
    *old version of the tool!!
    Auto-T9_dialer-V1.4.b.zip


    Available languages:
    Spanish
    Russian
    Greek
    Polish
    Swedish
    German
    Hungarian
    Korean
    Vietnamese
    Czech
    Slovak
    Slovene
    Turkish
    Hebrew
    Arabic
    Persian
    Ukrainian

    Pending Languages:
    NONE

    Attached Files:

  2. Google Adsense

  3. roenano Members

    Message Count:
    707
    For rom devs!!

    If you want to include this mod into your MIUI rom you have to decompile framework.jar and replace "classes\com\android\internal\util\HanziToPinyin.smali" with the attached one.
    HanziToPinyin.smali

    If you include it in your rom please give credit by linking to this thread. Thanks

    NOTE:
    This class changes from time to time due to Chinese T9 improvements, so if you get any error while compiling back framework.jar you'll have to manually edit the stock smali file by replacing the function below: (~line 16213)
    Code:
    .method public static formatCharToT9(C)C
        .registers 4
        .parameter "c"
    
        .prologue
        const/16 v2, 0x61
    
        const/16 v1, 0x41
    
        .line 1019
        if-lt p0, v1, :cond_11
    
        const/16 v0, 0x5a
    
        if-gt p0, v0, :cond_11
    
        .line 1020
        sget-object v0, Lcom/android/internal/util/HanziToPinyin;->sT9Map:[C
    
        sub-int v1, p0, v1
    
        aget-char v0, v0, v1
    
        .line 1026
        :goto_10
        return v0
    
        .line 1021
        :cond_11
        if-lt p0, v2, :cond_1e
    
        const/16 v0, 0x7a
    
        if-gt p0, v0, :cond_1e
    
        .line 1022
        sget-object v0, Lcom/android/internal/util/HanziToPinyin;->sT9Map:[C
    
        sub-int v1, p0, v2
    
        aget-char v0, v0, v1
    
        goto :goto_10
    
        .line 1023
        :cond_1e
        const/16 v0, 0x30
    
        if-lt p0, v0, :cond_28
    
        const/16 v0, 0x39
    
        if-gt p0, v0, :cond_28
    
        move v0, p0
    
        .line 1024
        goto :goto_10
    
        .line 1026
        :cond_28
        const/4 v0, 0x0
    
        goto :goto_10
    .end method
    With the one found in HanziToPinyin.smali attached above.

    And then compile back.
  4. pesiran Members

    Message Count:
    143
    Awesome work.
  5. jcg_vazquez Members

    Message Count:
    105
    this should be a sticky! great work roenano!
  6. roenano Members

    Message Count:
    707
    As you can see there's no much interest in it, may be people just doesn't know about this post. So for now, no sticky...

    Just updated the Spanish one for this week.

    Now working on Greek one!!
  7. jcg_vazquez Members

    Message Count:
    105
    well, i'll include it in miuies.
  8. jesus_c Members

    Message Count:
    21
    add russian pls

    number 2 \u0410 А \u0411 Б \u0412 В \u0413 Г
    \u0430 а
    \u0431 б
    \u0432 в
    \u0433 г


    number 3 \u0414 Д \u0415 Е \u0401 Ё \u0416 Ж \u0417 З
    \u0434 д
    \u0435 е
    \u0451 ё
    \u0436 ж
    \u0437 з



    nuber 4 \u0418 И \u0419 Й \u041A К \u041B Л
    \u0438 и
    \u0439 й
    \u043A к
    \u043B л



    number 5 \u041C М \u041D Н \u041E О \u041F П
    \u043C м
    \u043D н
    \u043E о
    \u043F п



    number 6 \u0420 Р \u0421 С \u0422 Т \u0423 У
    \u0440 р
    \u0441 с
    \u0442 т
    \u0443 у


    number 7 \u0424 Ф \u0425 Х \u0426 Ц \u0427 Ч
    \u0444 ф
    \u0445 х
    \u0446 ц
    \u0447 ч


    number8 \u0428 Ш \u0429 Щ \u042A Ъ \u042B Ы
    \u0448 ш
    \u0449 щ
    \u044A ъ
    \u044B ы


    number 9 \u042C Ь \u042D Э \u042E Ю \u042F Я
    \u044C ь
    \u044D э
    \u044E ю
    \u044F я
  9. jesus_c Members

    Message Count:
    21
    why did my message delete?
    I just asked to add russain
    and post unicode
  10. roenano Members

    Message Count:
    707
    For Russian will be very easy, as it was already done by devs at 4PDA.ru, I just have to find the code in my computer.

    EDIT: for some reason your post was marked as spam. Fixed!
  11. jesus_c Members

    Message Count:
    21
    thanx ))) wait it )))
  12. jcg_vazquez Members

    Message Count:
    105
    Mmmm... framework gave me boot loop...
  13. roenano Members

    Message Count:
    707
    I'll have a look now, sorry...
  14. jcg_vazquez Members

    Message Count:
    105
    no prob, just wanted to let you know :)
  15. roenano Members

    Message Count:
    707
    Thanks!
    Fixed and re-uploaded.
    Sorry for the messing up... Looks like i forgot to push the new framework.jar into the ZIP, and last week's one was there.
  16. roenano Members

    Message Count:
    707
    Just updated the OP with Greek and Russian
    Please do a nandroid backup before flashing it and give feedback about how it works as I'm not able to test it!!

    Enjoy it!!!
  17. jesus_c Members

    Message Count:
    21
    flashed but russian t9 did not work
    only english
  18. roenano Members

    Message Count:
    707
    Have you followed the instructions in the first post? The part about changing the locale is crucial!!
    BTW, if you have Nexus S you need to mount "/system" manually in recovery before flashing the zip.
  19. jesus_c Members

    Message Count:
    21
    my bad
    did not do it
    now works perfect! thanx!
  20. roenano Members

    Message Count:
    707
    Happy to hear!
  21. jcg_vazquez Members

    Message Count:
    105
    Ok will Try, add Andy let You now

    Sent from my Milestone using Tapatalk

Share Our Site