【Android Debug】 Skipping insecure file ...

在某个项目的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 to 644 (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.





  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值