How to install OpenWnn Japanese input method from Android SDK
Installing a Japanese IME on Android can be a little tricky since the semi-official OpenWnn IME (jp.co.omronsoft.openwnn), which is included in Japanese Android systems, is not available on the Android Market. Sure, there are alternatives, like Simeji or various OpenWnn derivatives, but if you look carefully, you will notice that they usually do not provide their source code and list full internet access as a requirement. If you feel uncomfortable with the thought of transmitting everything you type (including passwords) to a third party, this post is for you.
The following will show you how to download and set up the Android SDK (software development kit) to pull the the original open-source OpenWnn IME from a virtual Android device.
- Download the Android SDK from Google: http://developer.android.com/sdk/index.html
- Unzip the SDK to a location on your harddrive. The Windows installer will do this automatically for you. On Ubuntu, open a terminal and run the following commands (presuming the .tgz file sits in your /Downloads folder):
mkdir ~/.androidsdk
tar -C ~/.androidsdk -zxvf ~/Downloads/android-sdk_r*-linux_x86.tgz
- Run the Android SDK from the location you just unzipped it to. On Windows you should have an entry for the SDK in your start menu. On Ubuntu, you will have to install the package “ia32-libs”, then execute the file “android” from the ~/.androidsdk/android-sdk-linux_x86/tools folder:
sudo apt-get install ia32-libs
~/.androidsdk/android-sdk-linux_x86/tools/android
- Now configure the SDK as follows: Settings: check “Force https ...” Installed packages: click “Update All...”, then select “Accept” and “Install”. Sit back and have some green tea, because this will take a while.
- Now set up a new virtual Android device (or AVD, “Android Virtual Device”). We will use this device to get to the OpenWnn .apk set-up files. Go to “Virtual Devices”, click “New” and specify a machine with the same specs as your mobile phone, i.e. the same Android version (see Home screen –> Menu button –> Settings –> About phone –> Android version) and phone features. Now click “Create AVD”, then launch your new AVD.
- Open a new terminal (or “command prompt”, a.k.a. cmd.exe). Navigate to your Android SDK folder, open the /platform-tools subfolder and check if your AVD is running via
adb devices
. On Ubuntu, this works as follows:cd ~/.androidsdk/android-sdk-linux_x86/platform-tools
./adb devices
- Now hop on to the AVD by calling
adb shell
, or on Ubuntu:./adb shell
A pound sign (#) will appear. Now navigate to /system/app and list the directory contents. Since we're on the AVD now, the following commands are the same for Windows and Ubuntu users:cd /system/app
ls
You should find the OpenWnn.apk set-up file in here. - Type
exit
to leave the AVD. We will now use thepull
tool to get OpenWnn's .apk file from the virtual device. Runadb pull
followed by the path to OpenWnn.apk, i.e.adb pull /system/app/OpenWnn.apk
on Windows or./adb pull /system/app/OpenWnn.apk
on Linux. Now open your system's file browser, navigate to the /platform-tools folder in your SDK's installation directory, get the OpenWnn.apk file from there and transfer it to your real phone. - On your phone, go to Settings –> Application settings –> and check “Unkown sources”. This will allow installation of non-Market applications, which is what we need to install our OpenWnn.apk (make sure to turn this back off when you're done!). Open the file manager, navigate to OpenWnn.apk and install it. Done. Now activate and select the input method as usual.
Note that although this should be enough to get OpenWnn up and running on your mobile phone, in certain rare cases you also need to copy three lib*.so files from the AVD's /system/lib folder (libwnndict.so, libWnnEngDic.so, libWnnJpnDic.so) over to the same location on your phone. This is much more complicated than the above procedure, however, and involves the risk of damaging your system, so we will save this for another post
More info (Japanese): Install the OpenWnn – Shanghai Android Laboratory