完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
1.默认语音、地区、时区
device/rockchip/rk322x/rk322x_box/system.prop persist.sys.language=zh #简体中文 persist.sys.country=CN #中国 persist.sys.timezone=Asia/Shanghai #GMT+8 2.版本号: build/core/Makefile # A human-readable string that descibes this build in detail. # build_desc := $(TARGET_PRODUCT)-$(TARGET_BUILD_VARIANT) $(PLATFORM_VERSION) $(BUILD_ID) $(BUILD_NUMBER) $(BUILD_VERSION_TAGS) build_desc := V1.0.0 #可以直接去掉上面一大串引用,也可以在上面的基础上修改 3.默认输入法: 1)frameworks/base/core/java/com/android/internal/inputmethod/InputMethodUtils.java // At the initial boot, the settings for input methods are not set, // so we need to enable IME in that case. public void enableAllIMEsIfThereIsNoEnabledIME() { if (!TextUtils.isEmpty(getEnabledInputMethodsStr())) {//增加一个取反! StringBuilder *** = new StringBuilder(); final int N = mMethodList.size(); for (int i = 0; i < N; i++) { InputMethodInfo imi = mMethodList.get(i); Slog.i(TAG, "Adding: " + imi.getId()); if (i > 0) ***.append(':'); ***.append(imi.getId()); } putEnabledInputMethodsStr(***.toString()); } } 2)frameworks/base/packages/SettingsProvider/res/values/defaults.xml 3)frameworks/base/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java private void loadSecureSettings(SQLiteDatabase db) { //此处省略好多行 loadStringSetting(stmt, Settings.Secure.DEFAULT_INPUT_METHOD, R.string.def_input_method ); //add by haming for baidu input method } finally { if (stmt != null) stmt.close(); } } 4.设备信息: build/tools/buildinfo.sh echo "ro.product.model=XXX" echo "ro.product.brand=AiSing" echo "ro.product.name=XXX" echo "ro.product.device=ASBox" echo "ro.product.board=Box" echo "ro.product.manufacturer=company name" 5.分区大小修改: 如以下将boot分区增大了0x00004000,从原来的0x00006000变更到0x00010000, 其中@前面的十六进制数值表示分区的大小,单位:Kbit,@后面的十六进制数值表示分区的起始地址。 device/rockchip/rk322x/parameter.txt CMDLINE:console=ttyFIQ0 androidboot.selinux=permissive androidboot.hardware=rk30board androidboot.console=ttyFIQ0 init=/init mtdparts=rk29xxnand:0x00002000@0x00002000(uboot),0x00004000@0x00004000(trust),0x00002000@0x00008000(misc),0x00000800@0x0000A000(baseparamer),0x00007800@0x0000A800(resource),0x00006000@0x00012000(kernel),0x00010000@0x00018000(boot),0x00010000@0x00028000(recovery),0x00020000@0x00038000(backup),0x00040000@0x00058000(cache),0x00008000@0x00098000(metadata),0x00002000@0x00A0000(kpanic),0x00400000@0x000A2000(system),-@0x004A2000(userdata) 6.静态logo&开机视频: 1)静态logo修改 直接替换以下两个bmp文件 kernel/logo.bmp kernel/logo_kernel.bmp 2)添加开机视频 函数声明:frameworks/base/cmds/bootanimation/BootAnimation.h class BootAnimation : public Thread, public IBinder::DeathRecipient { public: …… //此处省略好多行 void playMusic(); bool playVideo(); //在这里声明一个播放视频的函数 …… //此处省略好多行 } 函数实现及使用:frameworks/base/cmds/bootanimation/BootAnimation.cpp namespace android { ……//此处省略好多行 #define USER_BOOTVIDEO_FILE "/data/local/boot.mp4" #define SYSTEM_BOOTVIDEO_FILE "system/media/boot.mp4" ……//此处省略好多行 bool BootAnimation::threadLoop() { bool r; ……//此处省略好多行 if (mZip == NULL) {//若bootanimation.zip文件是空文件,则播放android原生开机动画 r = android(); } else if ((0 == access(USER_BOOTVIDEO_FILE, F_OK)) || (0 == access(SYSTEM_BOOTVIDEO_FILE, F_OK))) { //系统指定路径存在视频文件则播放开机视频 r = playVideo(); } else { //否则播放开机帧动画 r = movie(); } ……//此处省略好多行 return r; } bool BootAnimation::playVideo() //播放开机视频函数实体 { ALOGD("playVideo"); const float MAX_FPS = 60.0f; const float CHECK_DELAY = ns2us(s2ns(1) / MAX_FPS); eglMakeCurrent(mDisplay, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); eglDestroySurface(mDisplay, mSurface); sp //mp->reset(); if((0 == access(USER_BOOTVIDEO_FILE, F_OK)) && mp != NULL) { mp->setDataSource(NULL, USER_BOOTVIDEO_FILE, NULL); } else if((0 == access(SYSTEM_BOOTVIDEO_FILE, F_OK)) && mp != NULL) { mp->setDataSource(NULL, SYSTEM_BOOTVIDEO_FILE, NULL); } mp->setLooping(false); mp->setVideoSurfaceTexture(mFlingerSurface->getIGraphicBufferProducer()); mp->prepare(); mp->start(); // when boot complete, then exit animation #if 1 while(true) { if(exitPending()) break; usleep(CHECK_DELAY); checkExit(); } #endif mp->stop(); return false; } …...//此处省略好多行 }; 开机视频文件拷贝: 首先将文件拷贝到以下目录 vendor/rockchip/common/apps/CopyCustomFile/boot.mp4 然后添加编译脚本 vendor/rockchip/common/apps/CopyCustomFile/Android.mk LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) LOCAL_POST_PROCESS_COMMAND :=$(shell mkdir -p $(TARGET_OUT)/media/) LOCAL_POST_PROCESS_COMMAND :=$(shell cp -r $(LOCAL_PATH)/boot.mp4 $(TARGET_OUT)/media/) include $(call all-makefiles-under,$(LOCAL_PATH)) |
|
|
|
你正在撰写答案
如果你是对答案或其他答案精选点评或询问,请使用“评论”功能。
1331 浏览 1 评论
synopsys 的design ware:DW_fpv_div,浮点数除法器,默认32位下,想提升覆盖率(TMAX),如果用功能case去提升覆盖率呢?
1352 浏览 1 评论
RK3588 GStreamer调试四路鱼眼摄像头四宫格显示报错
2868 浏览 1 评论
【飞凌嵌入式OK3576-C开发板体验】RKNN神经网络-YOLO图像识别
254 浏览 0 评论
【飞凌嵌入式OK3576-C开发板体验】SSH远程登录网络配置及CAN通讯
1336 浏览 0 评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-2 17:18 , Processed in 0.673014 second(s), Total 73, Slave 54 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号