android4.4.1修改默认语言为中文
在build\tools\buildinfo.sh文件末尾添加如下代码:
echo "persist.sys.country=CN"
echo "persist.sys.language=zh"
echo "persist.sys.timezone=Asia/Shanghai"
echo "ro.product.locale.language=zh"
echo "ro.product.locale.region=CN"
永不休眠
/frameworks/base/packages/SettingsProvider/res/values/defaults.xml
修改def_screen_off_timeout为 2000000 //界面上最大为 30分钟 = 1800000 ms
frameworks/base/services/java/com/android/server/power/PowerManagerService.java
修改为
private int getScreenOffTimeoutLocked() {
int nosleep;
int timeout = mScreenOffTimeoutSetting;
if (isMaximumScreenOffTimeoutFromDeviceAdminEnforcedLocked()) {
timeout = Math.min(timeout, mMaximumScreenOffTimeoutFromDeviceAdmin);
}
if (mUserActivityTimeoutOverrideFromWindowManager >= 0) {
timeout = (int)Math.min(timeout, mUserActivityTimeoutOverrideFromWindowManager);
}
nosleep = mScreenOffTimeoutSetting;
if(nosleep > 1800000) { // UI max is 30 miniute = 30 x 60 x 1000 = 1800000
nosleep = mMaximumScreenOffTimeoutFromDeviceAdmin;
return Math.max(nosleep, mMaximumScreenOffTimeoutFromDeviceAdmin);
}
return Math.max(timeout, MINIMUM_SCREEN_OFF_TIMEOUT);
}
默认打开wifi.
/frameworks/base/packages/SettingsProvider/res/values/defaults.xml
改写 def_wifi_on 为 true
device.mk 加入 $(call inherit-product, device/friendly-arm/tiny4412/device_nd_custom.mk) , 其内容如下
-
PRODUCT_DEFAULT_LANGUAGE = zh
-
PRODUCT_DEFAULT_REGION = CN
-
-
PRODUCT_DEFAULT_PROPERTY_OVERRIDES += \
-
persist.sys.language=zh \
-
persist.sys.country=CN \
-
persist.sys.timezone=Asia/Shanghai \
-
ro.product.locale.language=zh \
-
ro.product.locale.region=CN
-
-
-
PRODUCT_COPY_FILES += \
-
vendor/friendly-arm/exynos4412/HomeMgr/init_nd.sh:system/bin/init_nd.sh \
-
vendor/friendly-arm/exynos4412/HomeMgr/subapp_monitor.sh:system/bin/subapp_monitor.sh \
-
vendor/friendly-arm/exynos4412/HomeMgr/homebus_modules_lists.conf:system/etc/homebus_modules_lists.conf \
修改 wifi.supplicant_scan_interval=15 -》 1500 减少wifi扫描时间。
tstab 加载分区时 把想要的 ro 换成 rw。
PRODUCT_PACKAGES := \
Gallery2
变成
PRODUCT_PACKAGES := \
Gallery2 \
tinycap \
tinyplay \
tinymix
因为我们会想在 shell下播放声音等信息。
init.rc 中
加入自己的jar包, 否则会出现load失败的情况。以及配置开机属性/开机服务等内容。
-
export BOOTCLASSPATH /system/framework/core.jar:/system/framework/core-junit.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/telephony-common.jar:/system/framework/mms-common.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/apache-xml.jar:/system/framework/nd.module.dtmf.interface.jar:/system/framework/nd.module.voice_cmd.interface.jar:/system/framework/nd.module.audio.interface.jar:/system/framework/nd.module.ofdm.interface.jar:/system/framework/nd.module.native_property.interface.jar
-
# some daemon processes customized for ND.
service nd_init /data/local/bin/init_nd.sh
class main
user root
disabled
service NDM_HomeBus /system/bin/subapp_monitor.sh
class main
user shell
group root cache inet misc audio sdcard_rw log system
service NDM_ofdm /data/local/bin/ofdm_ap
class main
user root
group root cache inet misc audio sdcard_rw log system
service NDM_rfid /data/local/bin/rfid
class main
user root
group root cache inet misc audio sdcard_rw log system
service NDM_homebus /data/local/bin/homebus
class main
#socket homebus stream 660 root radio system misc cache
user root
group root cache inet misc audio sdcard_rw log system
service NDM_zigbeed /data/local/bin/zigbeed &> /sdcard/zigbeed_log
class main
user root
group root cache inet misc audio sdcard_rw log system
service NDM_timertask /data/local/bin/timer_plan
class main
user root
group root cache inet misc audio sdcard_rw log system
service NDM_SCENE /data/local/bin/homescene
class main
user root
group root cache inet misc audio sdcard_rw log system
-
# permissions for nd hardware.
chmod 0666 /dev/nd_dtmf
chmod 0666 /dev/nd_shtxx
chmod 0666 /dev/snd/controlC0
chmod 0666 /dev/snd/pcmC0D0c
chmod 0666 /dev/snd/pcmC0D0p
chmod 0666 /dev/snd/pcmC0D1c
chmod 0666 /dev/snd/pcmC0D1p
chmod 0666 /dev/snd/timer
chmod 0755 /system/bin/init_nd.sh
chmod 0755 /system/bin/subapp_monitor.sh
chmod 0755 /data/local
chmod 0755 /data/local/bin/
设定 system.prop , 默认打开的是wifi。
-
# using wcdma default = 0
-
# wifi 1
-
# eth 2
-
ro.telephony.default_network=0
自己的一些 jar 对应的xml也要设置拷贝
-
PRODUCT_COPY_FILES += \
-
$(LOCAL_PATH)/proprietary/fa_codec_ctrl:system/vendor/bin/fa_codec_ctrl \
-
$(LOCAL_PATH)/proprietary/lights.tiny4412.so:system/lib/hw/lights.tiny4412.so \
-
$(LOCAL_PATH)/proprietary/sensors.tiny4412.so:system/lib/hw/sensors.tiny4412.so \
-
$(LOCAL_PATH)/HomeMgr/frameworks/base/native_audio/nd_module_audio.xml:system/etc/permissions/nd_module_audio.xml \
-
$(LOCAL_PATH)/HomeMgr/frameworks/base/dtmf/nd_module_dtmf.xml:system/etc/permissions/nd_module_dtmf.xml \
-
$(LOCAL_PATH)/HomeMgr/frameworks/base/ofdm/nd_module_ofdm.xml:system/etc/permissions/nd_module_ofdm.xml \
-
$(LOCAL_PATH)/HomeMgr/frameworks/base/voice_cmd/nd_module_voice_cmd.xml:system/etc/permissions/nd_module_voice_cmd.xml \
-
$(LOCAL_PATH)/HomeMgr/frameworks/base/native_property/nd_module_native_property.xml:system/etc/permissions/nd_module_native_property.xml
阅读(2837) | 评论(0) | 转发(0) |