« 6boxing in Final Fantasy XI | メイン | Androidメモ(remount command) »

2009年06月16日

Installing iWnnIME on the G1

At the recent Google Developer Day in Yokohama, attendees were all given a HTC Sapphire with the fully Japanese localized version of Android preinstalled. Presumably it is a nonbranded version of the upcoming DoCoMo HT-03A. A ROM dump was quick to follow, and after poking around and some extracting/copying, I was able to get the iWnnIME working fully on my G1. Here's a quick walkthrough.

Things you will need:
1. The ROM dump, found in the usual places
2. A computer running some flavor of *nix (OSX + xcode kit works too, it's what I used)
3. unyaffs
4. The android dev environment, namely adb. Although this probably isn't *required*, you could potentially do everything after unyaffs-ing by copying the requisite files to the sd card and copying via the terminal emulator.

Some notes before getting started:
-A problem you may run into is lack of space on the /system partition. I'm currently using one of the Rogers Dream ROMs and I had to delete the HTC_CIME.apk to free up enough space to copy all the files over (there are quite a few). Depending on which version of Android you are running, this may not be a problem at all, or it may be a major obstacle; YMMV. Deleting HTC_CIME is as easy as rm -r HTC_CIME.apk from the shell and rebooting. No ill side effects other than not being able to use that particular IME, but I don't have a need for Chinese input so it was a non-issue.
-Didn't need to fix any permissions, just copied and it worked
-I'm writing this mostly from memory and it's a bunch of pseudocode, definitely not a "step-by-step" guide. If you don't know what you are doing then you should probably stop now.
-If you mess up your phone I am not responsible, proceed at your own risk. You know the drill.

Now the walkthrough:
1. Get all of the above things, and compile unyaffs for your box with gcc and all that jazz
2. unyaffs data.img and system.img
3. There are only 2 things we need from data.img. First is the jp.co.omronsoft.iwnnime folder in /data/data, copy it to the same location on your phone (make sure to preserve the subfolder structure). There is also a system@app@iWnnIME.apk@classes.dex in the dalvik-cache folder, copy that over too.
4. Now for the fun part with the multitude of files needed from system.img. I'm a total nub when it comes to this stuff, so not all of these may be required. All I know is that they are all referenced by entries in some of the lib files so for completeness I copied them all over. It may be possible to omit some to save space but it's beyond my ability to tell. First, the files in the /system/lib folder:
libiwnn.so
lib_dic.conf.so
lib_dic_e.conf.so
libEnjcon.so
libEnjemailuri.so
libEnjlearn.so
libEnjlearnL.so
libEnjlearnM.so
libEnjrel.so
libEnjyomi.so
libkaomoji_kihon.so
libkaomoji_tyukyu.so
libnjaddress.so
libnjcon.so
libnjemoji.so
libnjexyomi.so
libnjexyomi_new.so
libnjexyomi_re.so
libnjfzk.so
libnjname.so
libnjtan.so
libnjubase1.so
libnjubase2.so
Copy these to /system/lib
5. Now take DroidSansJapanese.ttf from /system/fonts and copy that over to the same folder on your phone.
6. And finally, copy over iWnnIME.apk to your sd card and run it to install it.
7. Go to your locale settings and you should have a nice new iWnnIME to use.

The only limitation I have experienced with the IME is that it doesn't seem to play too well in landscape mode. It works, but sometimes it gets a little confused. This appears to be limitation of the software though, and not a result of using it on the Dream platform. Even romaji input works a charm using the hardware keyboard on the G1, although it suffers from some of the same issues described above.

Credit goes out to jmaurice for providing the ROM dump, and to the great community at xda for the wealth of info that allowed even a nub like me to be able to pull something like this off.

/rant on
And last but not least, it has come to my attention that there are certain companies out there that have been and will continue to make commercial profits off of the hard work done by the fine folks here on xda, particularly in the realm of selling mobiles in the United States that have been reflashed with Japanese firmwares or other localized apps. What I've done isn't anything amazing compared to what people like Haykuro have done, but I can say with confidence that there are a few companies out there that I can think of off the top of my head that will certainly jump on this and start pawning it off to less savvy customers as their own work. It might not be much, but as a contributor I'm proud of my work, and all I can say is that hacking these ROMs as a hobbyist is one thing, but when I see this method commercialized there will be some people at Omron that won't be too happy.
/rant off

手持ちのG1でAndroid日本語IME iWnnIME のインストールに成功しました。
簡単なまとめです。使用は自己責任で。
必要なものは:
GDD2009で配布されたHTC SapphireのROMダンプ
unyaffs
adbもあると楽
注:使用中のディストリビューションによって/systemパーティションの空きが少ない場合がありますので、そういう場合はいらないファイルを削除なりsymlinkなりして空きを作らないと容量が足りなくなる場合があります。
1.data.imgのjp.co.omronsoft.iwnnimeフォルダを本体の同じ場所に
2.system@app@iWnnIME.apk@classes.dexをdalvik-cacheへ
3.system.imgの/system/libにある各種*.soファイルをコピー(本文参照
4.日本語フォントDroidSansJapanese.ttfをコピー
5.最後にメインのAPKをインストール
6.完了
不明な点がある場合はお気軽にコメントを残してください。

投稿者 error : 2009年06月16日 21:18

トラックバック

このエントリーのトラックバックURL:
http://www.iamerror.com/mt/mt-tb.cgi/107

コメント

Hi, looks like you found my blog :)

Thanks for pointing me to your blog too, I'll have to RSS it!

投稿者 error : 2009年06月18日 04:14

Cool, happy to see you got it working! :)
I made a package and command line instructions on my blog here:
http://my.opera.com/wiz/blog/2009/06/16/how-to-install-japanese-ime-on-android

Best Regards,
J. Maurice

投稿者 J. Maurice : 2009年06月18日 00:43

コメントしてください




保存しますか?