【Android(安卓)Debug】 Skipping insecure file ...
分类:Android 2013-06-25 17:36 1446人阅读 评论(0) 收藏 举报
在某个项目的bring up阶段,有时候会不断的更新各种文件,config, drivers, kernel image等。
有时候会出现Skipping insecure file 错误,导致device boot失败。
详见如下:
详见system\core\init\util.c---> read_file
if ((sb.st_mode &(S_IWGRP | S_IWOTH)) != 0) {
ERROR("skipping insecure file '%s'\n", fn);
goto oops;
}
这个属于4.1新特性,更加安全,后续我们研发人员注意:
如笔者所经历,更新wifi/bt驱动时, 新编译出来的文件如下:
-rw-r--r-- 1 yangxx yangxx 173140 2013-06-19 07:16 galcore.ko
-rw-r--r-- 1 yangxx yangxx 62088 2013-06-19 07:16 mbt8xxx.ko
-rw-r--r-- 1 yangxx yangxx 277004 2013-06-19 07:16 mlan.ko
-rw-r--r-- 1 yangxx yangxx 358032 2013-06-19 07:16 sd8787.ko
-rw-r--r-- 1 yangxx yangxx 3876608 2013-06-19 07:16 uImage
明显文件权限是644, push到板子后就变成了777,
步骤如下:
adb root
adb remount
adb push *** /system/lib/modules/
adb shell sync
adb reboot
重启板子失败,从串口看这些文件,权限却变成了777.
研究发下,必须到板子里面更改权限才行,如下:
adb root
adb remount
adb shell
# cd /system/lib/modules/
# chmod 644 *.ko
# reboot
然后OK
总结:
[Solution]
1.EnableBT/BT-HID as attached patch says, recompile kernel and BT drivers.
2.Pushgalcore.ko mbt8xxx.ko mlan.ko sd8787.ko to/system/lib/modules/
3.Remountsystem and chmod modules permission to644(Wasted much time in thisstep, as push “777” files always in before verification)
[Reason]
Android defines secure file checking mechanismduring devcie boot, those with 777 permission will be regarded as inscure file.
Here, just make drivers matches kernel imagecorresponding, not android system images.更多相关文章
- ANDROID应用程序的混淆打包分享
- OpenCV4Android(安卓)之 OpenCV4Android(安卓)SDK
- Android(安卓)应用更新使用Bugly
- Android笔记2——开发前奏2工程目录介绍和两个小应用
- Android之Resource介绍和使用
- Android(安卓)Studio文件夹颜色问题
- Android(安卓)资源目录的相关知识
- Android:混合轮播视频和图片
- 编译源码生成的SDK,创建android project 没有proguard.cfg问题