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

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

[code=Python] echo on out/host/linux-x86/bin/mkbootfs out/target/product/hammerhead/root | out/host/linux-x86/bin/minigzip > out/target/product/hammerhead/ramdisk.img out/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.img adb shell su 0 reboot bootloader fastboot flash boot out/target/product/hammerhead/boot.img fastboot 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
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值