测试提了几个bug
1、系统语言默认设置成中文,否则时间控件显示的内容有问题
2、关闭10分钟不操作自动休眠功能
3、默认关闭虚拟键盘,目的在文本控件点击后,虚拟键盘就会在右下角显示出来,导致物理键盘的小键盘的回车键无效
Android系统修改默认语言为中文
对于Android系统修改默认语言的方法,各个版本的系统方法都差不多一致,至少我在Android5.1和Android9.0使用都成功,具体方法如下:
在build/target/product/full_base.mk中
修改PRODUCT_LOCALES := zh_CN 就可以了。
上面修改无效,尝试:
https://blog.csdn.net/victoryckl/article/details/7969433
.修改build/tools/buildinfo.sh:
echo "persist.sys.language=zh"
echo "persist.sys.country=CN"
echo "persist.sys.localevar="
echo "persist.sys.timezone=Asia/Shanghai"
echo "ro.product.locale.language=zh"
echo "ro.product.locale.region=CN"
关闭10分钟不操作自动休眠功能
修改PowerManagerService.java文件getScreenOffTimeoutLocked()函数
androidx86/frameworks$ vi ./base/services/core/java/com/android/server/power/PowerManagerService.java
直接return mMaximumScreenOffTimeoutFromDeviceAdmin;
默认关闭虚拟键盘
lzm@compilere:~/workspace/android-x86/androidx86/frameworks/base/services/core/java/com/android/server$ grep -rn "keyboardPresence" *
policy/PhoneWindowManager.java:2662: public void adjustConfigurationLw(Configuration config, int keyboardPresence,
policy/PhoneWindowManager.java:2664: mHaveBuiltInKeyboard = (keyboardPresence & PRESENCE_INTERNAL) != 0;
policy/PhoneWindowManager.java:2670: || (keyboardPresence == PRESENCE_INTERNAL
wm/DisplayContent.java:1245: int keyboardPresence = 0;
wm/DisplayContent.java:1278: keyboardPresence |= presenceFlag;
修改wm/DisplayContent.java:1278: keyboardPresence |= presenceFlag;
//if (device.getKeyboardType() == InputDevice.KEYBOARD_TYPE_ALPHABETIC) {
if (1) {
config.keyboard = Configuration.KEYBOARD_QWERTY;
keyboardPresence |= presenceFlag;
}
增加自带应用
build/core/Makefile:34: error: Prebuilt apk found in PRODUCT_COPY_FILES: vendor/evideo/common/priv-app/google_inputMethod.apk:system/priv-app/google_inputMethod.apk, use BUILD_PREBUILT instead!.
15:20:59 ckati failed with: exit status 1
vi build/core/Makefile
#Tommy Delete 删除如下代码
#define check-product-copy-files
#$(if $(filter %.apk, $(1)),$(error
# Prebuilt apk found in PRODUCT_COPY_FILES: $(1), use BUILD_PREBUILT #instead!))
#endef
增加版本信息:
build/make/tools/buildinfo.sh增加:
echo "ro.product.version=1.0.0"
lzm@compilere:~/workspace/android-x86/androidx86$ cat gen.sh
#!/bin/bash
FIRMWARE_VERSION="1.0.0"
sed -i "s/ro.product.version=.*/ro.product.version=$FIRMWARE_VERSION"/g"
build/make/tools/buildinfo.sh
ROOT_DIR=$(pwd)
echo "cp platform signature"
cp -a $ROOT_DIR/vendor/evideo/emt100t/security/platform.* $ROOT_DIR/build/target/product/security/
. build/envsetup.sh
lunch android_x86_64-userdebug
make -j32 iso_img
机器绑定网卡
修改 device/generic/common/init.sh
function init_evideo()
{
case "$(cat /sys/class/net/wifi_eth/address)" in
64:00:6a:00:29:ac|a4:1f:72:5f:6b:07|a4:1f:73:5f:6f:0e)
;;
*)
reboot
;;
esac
}
do_init添加调用函数
修改小键盘回车与主键盘回车键值一样
diff --git a/frameworks/base/data/keyboards/Generic.kl b/frameworks/base/data/keyboards/Generic.kl
index f10ba96..e13305c 100644
--- a/frameworks/base/data/keyboards/Generic.kl
+++ b/frameworks/base/data/keyboards/Generic.kl
@@ -115,7 +115,8 @@ key 92 HENKAN
key 93 KATAKANA_HIRAGANA
key 94 MUHENKAN
key 95 NUMPAD_COMMA
-key 96 NUMPAD_ENTER
+# modify by songyoulin
+key 96 ENTER
key 97 CTRL_RIGHT
key 98 NUMPAD_DIVIDE
key 99 SYSRQ
替换默认输入法为google拼音
参考:https://www.cnblogs.com/muhuacat/p/7406112.html
diff --git a/RK3288_5.1/frameworks/base/packages/SettingsProvider/res/values/defaults.xml b/RK3288_5.1/frameworks/base/packages/SettingsProvider/res/values/defaults.xml
index a1e900a..6eebebb 100644
--- a/RK3288_5.1/frameworks/base/packages/SettingsProvider/res/values/defaults.xml
+++ b/RK3288_5.1/frameworks/base/packages/SettingsProvider/res/values/defaults.xml
@@ -86,7 +86,7 @@
<string name="def_wireless_charging_started_sound" translatable="false">/system/media/audio/ui/WirelessChargingStarted.ogg</string>
<!-- add by lyx -->
- <string name="config_default_input_method" translatable="false">com.sohu.inputmethod.sogou/.SogouIME</string>
+ <string name="config_default_input_method" translatable="false">com.google.android.inputmethod.pinyin/.PinyinIME</string>
替换默认输入法为google拼音不能用
找了个x86版本的,主要是lib底下要是x86的库
vmware安装时候启动进入不android界面
grub界面,按e修改参数
移动光标“ quiet ”参数替换为“ nomodeset xforcevesa
永久修改:
grub选项进入debug
vi /grub/menu.lst