主版例子
http://www.graperain.cn/RK3288/RK3288-Development/
进入刷机模式
adb reboot loader
序列号自定义
rk3288平台的serial number是由drmservice写进去的
init.rk30board.rc
./device/rockchip/common/init.rk30board.rc
# 当“sys.serialno”属性被设置时,会触发ro.serialno的更新
# set ro.serialno
on property:sys.serialno=*
setprop ro.serialno ${sys.serialno}
service drmservice /system/bin/drmservice
class main
oneshot
drmservice
system/core/drmservice
#define SERIALNO_FROM_IDB 0 //if 1 read sn from idb3; if 0 generate sn auto
/** * Program entry pointer *
* @return 0 for success, -1 for SLOGE
*/
int main( int argc, char *argv[] )
{
//------------------------------------------------------------------------------
if(SERIALNO_FROM_IDB)//read serialno form idb
{
vendor_storage_read_sn();
property_set("sys.serialno", sn_buf_idb[0] ? sn_buf_idb : "");
write_serialno2kernel(sn_buf_idb);
SLOGE("get serialno from idb,serialno = %s",sn_buf_idb);
}
else//auto generate serialno
{
generate_device_serialno(10,sn_buf_auto);
property_set("sys.serialno", sn_buf_auto[0] ? sn_buf_auto : "");
write_serialno2kernel(sn_buf_auto);
SLOGE("auto generate serialno,serialno = %s",sn_buf_auto);
}
//-----------------------------------------------------------------------------
}
串口调试
自定义logo
注意logo图片需要是8 bits位的bmp格式,可将图片拷贝到AndroidStudio中查看位深
kernel/logo.bmp
kernel/logo_kernel.bmp
kernel/arch/arm/boot/dts/rk3288-android-lzt.dtsi
display-subsystem {
status = "okay";
ports = <&vopb_out>, <&vopl_out>;
logo-memory-region = <&drm_logo>;
route {
route_edp: route-edp {
status = "disabled";
logo,uboot = "logo.bmp";
logo,kernel = "logo_kernel.bmp";
logo,mode = "center";
charge_logo,mode = "center";
connect = <&vopl_out_edp>;
};
route_dsi0: route-dsi0 {
status = "disabled";
logo,uboot = "logo.bmp";
logo,kernel = "logo_kernel.bmp";
logo,mode = "center";
charge_logo,mode = "center";
connect = <&vopl_out_dsi0>;
};
route_lvds: route-lvds {
status = "disabled";
logo,uboot = "logo.bmp";
logo,kernel = "logo_kernel.bmp";
logo,mode = "center"; // 居中模式不会缩放logo图片,如果logo尺寸小于屏幕尺寸则填充黑色背景
charge_logo,mode = "center";
connect = <&vopl_out_lvds>;
};
route_hdmi: route-hdmi {
status = "disabled";
logo,uboot = "logo.bmp";
logo,kernel = "logo_kernel.bmp";
logo,mode = "center";
charge_logo,mode = "center";
connect = <&vopb_out_hdmi>;
};
};
};
更换完开机logo编译内核烧写resource.img即可
自定义壁纸
frameworks/base/core/res/res/drawable-nodpi/default_wallpaper.png frameworks/base/core/res/res/drawable-sw600dp-nodpi/default_wallpaper.png frameworks/base/core/res/res/drawable-sw720dp-nodpi/default_wallpaper.png
自定义动画
PRODUCT_COPY_FILES += vendor/wif/bootanimation.zip:system/media/bootanimation.zip
desc.txt
1280 800 15 解释:1280 800 是分辨率(注意横竖屏方向) 15是每秒播放帧数
p 1 0 part01 解释:1是循环一次 0 间隔时间为0
p 0 0 part02 解释:0是无限循环 0 间隔时间为0
默认屏幕显示方向
device/rockchip/rk3288/system.prop
ro.sf.fakerotation=false ro.sf.hwrotation=90