In the bring up stage of a project, various files, such as config, drivers, and kernel image, are constantly updated.
Sometimes the skipping Insecure File error may occur, resulting in device boot failure.
For details, see:
For details, see 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;
}
This is a new feature of 4.1, which is more secure. Our R & D staff will note the following:
As I have experienced, when updating the WiFi/BT driver, the newly compiled file is as follows:
-RW-r -- 1 yangxx 173140 2013-06-19 galcore. Ko
-RW-r -- 1 yangxx 62088 2013-06-19 mbt8xxx. Ko
-RW-r -- 1 yangxx 277004 2013-06-19 mlan. Ko
-RW-r -- 1 yangxx 358032 2013-06-19 sd8787.ko
-RW-r -- 1 yangxx 3876608 2013-06-19 uimage
Obviously, the File Permission is 644, Which is 777 after being pushed to the board,
The procedure is as follows:
ADB Root
ADB remount
ADB push ***/system/lib/modules/
ADB shell sync
ADB reboot
An error occurred while restarting the board. After reading these files from the serial port, the permissions changed to 777.
After the study, you must change the permissions in the Board as follows:
ADB Root
ADB remount
ADB Shell
# Cd/system/lib/modules/
# Chmod 644 *. Ko
# Reboot
Then OK
Summary:
[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
644(Wasted much time in thisstep, as push "777" files always in before verification)
[Reason]
Android defines secure file checking mechanic ismduring devcie boot, those with 777 permission will be regarded as inscure file.
Here, just make drivers matches kernel imagecorresponding, not Android system images.