2012 views|0 replies

29

Posts

0

Resources
The OP
 

Development board Android11 changes the third-party input method to the default input method [Copy link]

1. Install the input method and view the input method package name

This time we are going to install Baidu input method. The installation method is as follows:

1.1 Installation using adb command line

Use the win+R key combination on the computer keyboard to pop up the input box, enter cmd to enter the computer terminal, and execute the following command:

#查看是否识别到adb设备
adb.exe devices

#让系统获取root权限
adb.exe root#

让系统可读可写
adb.exe remount#

开始安装
adb.exeinstall/your/target/path/baidu.apk

1.2 U disk/TF card installation

Place the input method apk in a U disk/TF, insert it into the motherboard and let it recognize the device, then go to the system desktop and find the [Explorer] application, then click on the U disk input method apk application to install it.

Installation Successful

1.3 View the input method package name

# ime list -s
com.baidu.input/.ImeService

The output result is the package name/class name of the input method.

2. System pre-installed input method applications

Place the Baidu input method APK that needs to be pre-installed
in the device/rockchip/rk356x/rk3566_r/preinstall_del/directory

(If there is no preinstall_del directory, create one manually) and add the following files:

  • Android.mk
  • baidu.apk(APK)
  • preinstall.mk

Android.mk file content:

include $(call all-subdir-makefiles)

Preinstall.mk file contents:

PRODUCT_PACKAGES += baidu

Note: baidu is the name of the APK, for example, baidu.apk.

3. Modify the input method environment variables

Add the Baidu input method package name/class name obtained in the first step to the following file:

frameworks/base/packages/SettingsProvider/res/values/defaults.xml

The content is as follows:

<!-- should show the screenshot button default -->
<integername="def_screenshot_button_show">0</integer>
  
  +<!-- set default input method-->
  +<stringname="config_default_input_method"translatable="false">com.baidu.input/.ImeService</string>
</resources>

4. Modify the default input method

Add the previous input method environment to the following file:

frameworks/base/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java

Add the following content:

classDatabaseHelperextendsSQLiteOpenHelper{
  
  loadIntegerSetting(stmt, Settings.Secure.SLEEP_TIMEOUT,
                     R.integer.def_sleep_timeout);
  
  + loadStringSetting(stmt, Settings.Secure.DEFAULT_INPUT_METHOD, R.string.config_default_input_method);//add hjt
/*
* IMPORTANT: Do not add any more upgrade steps here as the global,
* secure, and system settings are no longer stored in a database

After adding, recompile the source code.

5. Check whether Baidu Input Method is the default input method

Command Line

# settings get secure default_input_method
com.baidu.input/.ImeService

Set the default input method successfully

This post is from Embedded System

Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

Featured Posts
Common dielectric materials for microstrip lines

Alumina 9.0-9.9 (different purity) Beryllium oxide 6.1 Polytetrafluoroethylene Glass fiber 2.55 Silicon 11.7 Gallium ars ...

Children's humor

Mom called Pippi to get up: " Hurry up and get up! The rooster has crowed several times! " Pippi said: " What does the r ...

RVB2601 Evaluation Board Trial 1 Unpacking and Environment Setup

This post was last edited by woaixiaxiao on 2021-7-16 16:54 Unboxing and environment setup 1. Unboxing photos and i ...

What is the best domestic 32bit arm mcu solution to replace stm32 m3/m4?

The price of stm32 microcontroller has risen horribly, and there are scalpers who are disrupting the market. Now we urg ...

Does the material of the transformer determine the operating frequency of the transformer?

The efficiency of the 50HZ transformer is very low at high frequency. I don't know why. Some say it is caused by eddy cu ...

[Evaluation of Anxinke Bluetooth Development Board PB-02-Kit] First Look

The PB-02-Kit Bluetooth development board is developed based on the PB-01 module of the Anxinke, and its main target is ...

How to draw the PCB package of diodes? Is there any industry standard?

In my previous cooperative factory, I gave the PCB diagram and packaging instructions to the SMT factory, and later atta ...

On the issue of common ground interference

The following figure is: a high-voltage pulse discharge system. The green part and the yellow part (external control) ar ...

How is your city?

Now when I wake up from a nap, I check the company chat room and see that some colleagues have a fever. Before, I couldn ...

[Basic knowledge about power supply] The measurement method I only mentioned after being asked many times!

805735 Let's take a look at the LED driver. The LED driver is a more realistic product. For example, the lamp is basic ...

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list