While there's the excellent mod of the general Xperia keyboard for all devices (linked at the bottom of this post), I could only find an ancient version of the Xperia Chinese keyboard modified the same way. So, here is a more up to date version:
Patch 2 also removes some libraries that were unnecessary, and includes a different build of SQLite.
Details
Source Image: G8141_47.1.A.16.20_1308-5321_R5B_CE1 (Sony Xperia XZ Premium / Maple)
Package Name: com.sonyericsson.textinput.chinese
Original Filename: textinput-chn-xxhdpi.apk
How to use
If you do not grant the above permission, the keyboard will crash when trying to display pop-up dialogs (tap and hold the language switch button to test).
Modification scope
1. Integrated external libraries into the package:
(a) From the original image:
(b) From LineageOS 17.1:
(c) From SQLite Precompiled Android Binaries (3320300):
2. Changed values loaded into $LayoutParams;->type:I in:
(5 occurences total)
From:
0x000007dc = 0x000007d9 (TYPE_KEYGUARD_DIALOG) | 0x00000002 (TYPE_APPLICATION) | 0x00000001 (TYPE_BASE_APPLICATION)
To:
0x000007f6 (TYPE_APPLICATION_OVERLAY)
Background / Why
3. Changed manifest to add SYSTEM_ALERT_WINDOW permission (needs to be granted manually, application will not prompt for it):
Remarks
The version linked below is the initial one. See above for updated links.
Xperia Chinese Keyboard modified to work on any device
Supports pinyin, zhuyin, stroke order, handwriting and Cangjie, as well as English input
Version: 25.1.A.0.10
View attachment 4825075 View attachment 4825077 View attachment 4825105 View attachment 4825107
DownloadSupports pinyin, zhuyin, stroke order, handwriting and Cangjie, as well as English input
Version: 25.1.A.0.10
View attachment 4825075 View attachment 4825077 View attachment 4825105 View attachment 4825107
Patch 2 also removes some libraries that were unnecessary, and includes a different build of SQLite.
Details
Source Image: G8141_47.1.A.16.20_1308-5321_R5B_CE1 (Sony Xperia XZ Premium / Maple)
Package Name: com.sonyericsson.textinput.chinese
Original Filename: textinput-chn-xxhdpi.apk
How to use
- Install the APK as you normally would
- Manually grant the permission: Settings → Apps & notifications → See all apps → Xperia Chinese keyboard → Advanced → Display over other apps: Allowed
- Enable keyboard in Settings → Languages & input
If you do not grant the above permission, the keyboard will crash when trying to display pop-up dialogs (tap and hold the language switch button to test).
Modification scope
1. Integrated external libraries into the package:
(a) From the original image:
Code:
libunwind.so
Code:
libbase.so
libc++.so
libnativehelper.so
Code:
libsqlite.so
Code:
smali/com/sonyericsson/textinput/chinese/uxp/view/InputMethodDialog.smali
smali/com/sonyericsson/textinput/chinese/uxp/view/keyboard/CloudAccessTipsDialog.smali
smali/com/sonyericsson/textinput/chinese/uxp/view/settings/ChineseHardKeyboardInputMethodChoice.smali
smali/com/sonyericsson/textinput/chinese/uxp/view/settings/ChineseInputMethodChoice.smali
smali/com/sonyericsson/textinput/chinese/uxp/view/settings/FirstUsageTipsDialogVisualisation.smali
0x000007dc = 0x000007d9 (TYPE_KEYGUARD_DIALOG) | 0x00000002 (TYPE_APPLICATION) | 0x00000001 (TYPE_BASE_APPLICATION)
To:
0x000007f6 (TYPE_APPLICATION_OVERLAY)
Background / Why
Also note: cannot use 0x000003e8 (TYPE_APPLICATION_PANEL) as there is no activity.
Code:
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
- This fully works for me on LineageOS 16.0. If it doesn't work for you, most likely you'll need a different version of libsqlite.
- Should be safe to use in general but use it at your own risk
- Modify the application further to request permission instead of crashing
- Xperia keyboard for most languages port by @greenys'
- Xperia Chinese keyboard version 10.1.A.0.1 (Android 4.4+, 2012-2013) by @danist727
The version linked below is the initial one. See above for updated links.
Attachments
-
18.8 MB Views: 1,230
-
19.5 MB Views: 1,121
Last edited: