1. 程式人生 > >[RK3399][Android7.1] 除錯筆記 ---谷歌拼音替換搜狗輸入法

[RK3399][Android7.1] 除錯筆記 ---谷歌拼音替換搜狗輸入法

Platform: RK3399 OS: Android 7.1 Kernel: v4.4.83

由於搜狗輸入法存在版權原因,換成了谷歌拼音,雖然apk已經下架,但還是可以使用的。

改動:

diff --git a/packages/SettingsProvider/res/values/defaults.xml b/packages/SettingsProvider/res/values/defaults.xml
index 28024eb..43e4123 100644
--- a/packages/SettingsProvider/res/values/defaults.xml
+++ b/packages/SettingsProvider/res/values/defaults.xml
@@ -227,7 +227,7 @@
     <string name="def_screenshot_location">internal_storage</string>
     
     <!-- Kris, 170401, Add sougou input method. -->
-    <string name="def_input_method" translatable="false">com.sohu.inputmethod.sogou/.SogouIME</string>
+    <string name="def_input_method" translatable="false">com.google.android.inputmethod.pinyin/.PinyinIME</string>
 
 	<!-- Kris, 170418, Use 24-hour format by default. -->
 	<string name="time_12_24">24</string>
diff --git a/Pinyin/Android.mk b/Pinyin/Android.mk
new file mode 100644
index 0000000..125320e
--- /dev/null
+++ b/Pinyin/Android.mk
@@ -0,0 +1,16 @@
+
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := googlepinyin
+LOCAL_MODULE_CLASS := APPS
+LOCAL_MODULE_TAGS := optional
+LOCAL_BUILT_MODULE_STEM := package.apk
+LOCAL_MODULE_SUFFIX := $(COMMON_ANDROID_PACKAGE_SUFFIX)
+#LOCAL_PRIVILEGED_MODULE :=
+#LOCAL_OVERRIDES_PACKAGES := 
+LOCAL_SRC_FILES := $(LOCAL_MODULE).apk
+#LOCAL_REQUIRED_MODULES :=
+LOCAL_CERTIFICATE := PRESIGNED
+include $(BUILD_PREBUILT)
+
diff --git a/Pinyin/googlepinyin.apk b/Pinyin/googlepinyin.apk
new file mode 100644
index 0000000..1f3c900
Binary files /dev/null and b/Pinyin/googlepinyin.apk differ
diff --git a/Sougou/Android.mk b/Sougou/Android.mk
deleted file mode 100644
index 2168456..0000000
--- a/Sougou/Android.mk
+++ /dev/null
@@ -1,16 +0,0 @@
-
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-LOCAL_MODULE := sougoushurufa
-LOCAL_MODULE_CLASS := APPS
-LOCAL_MODULE_TAGS := optional
-LOCAL_BUILT_MODULE_STEM := package.apk
-LOCAL_MODULE_SUFFIX := $(COMMON_ANDROID_PACKAGE_SUFFIX)
-#LOCAL_PRIVILEGED_MODULE :=
-#LOCAL_OVERRIDES_PACKAGES := 
-LOCAL_SRC_FILES := $(LOCAL_MODULE).apk
-#LOCAL_REQUIRED_MODULES :=
-LOCAL_CERTIFICATE := PRESIGNED
-include $(BUILD_PREBUILT)
-
diff --git a/Sougou/sougoushurufa.apk b/Sougou/sougoushurufa.apk
deleted file mode 100644
index 6033acd..0000000
Binary files a/Sougou/sougoushurufa.apk and /dev/null differ

diff --git a/device.mk b/device.mk
index e6e42dc..3bd6b91 100755
--- a/device.mk
+++ b/device.mk
@@ -246,9 +246,9 @@ PRODUCT_COPY_FILES += \
 PRODUCT_PACKAGES += \
     batteryd
 
-#Kris, 180717, add sougou input method.
+#Sid, 181019, use google pinyin input method.
 PRODUCT_PACKAGES += \
-    sougoushurufa \
+    googlepinyin \
     su