Android 4.4.2 SELinux 与系统关系详解三:根据Seinfo 为Package 设置安全上下文标签

来源:互联网 发布:学生挣钱的软件 编辑:程序博客网 时间:2024/05/12 18:16

       在对Android 操作系统进行定制开发过程中,优势仅仅需要编译修改过的部分并烧写到设备上进行验证,下面是重新编译打包boot.img,并自动烧写到设备的脚本文件。

[code=Python]echo onout/host/linux-x86/bin/mkbootfs out/target/product/hammerhead/root | out/host/linux-x86/bin/minigzip > out/target/product/hammerhead/ramdisk.imgout/host/linux-x86/bin/mkbootimg --kernel out/target/product/hammerhead/kernel --ramdisk out/target/product/hammerhead/ramdisk.img --cmdline "console=ttyHSL0,115200,n8 androidboot.hardware=hammerhead user_debug=31 maxcpus=2 msm_watchdog_v2.enable=1" --base 0x00000000 --pagesize 2048 --ramdisk_offset 0x02900000 --tags_offset 0x02700000 --output out/target/product/hammerhead/boot.imgadb shell su 0 reboot bootloaderfastboot flash boot out/target/product/hammerhead/boot.imgfastboot reboot[/code]

制作脚本:

1.  进入到你的Android 源代码根目录

2.  gedit  make_bootimage.sh

3.  拷贝上面内容到make_bootimage.sh文件

4.  chmod 777 make_bootimage.sh

5.  ./make_bootimage.sh 验证




0 0