码迷,mamicode.com
首页 > 移动开发 > 详细

can't set android permissions - built without android support

时间:2016-09-10 11:31:08      阅读:247      评论:0      收藏:0      [点我收藏+]

标签:

/****************************************************************************
 *      can‘t set android permissions - built without android support
 * 说明:
 *     昨天在使用Ubuntu自带的mkuserimg打包Android ext4镜像时出现这个错误,今天
 * 找一下原因,解决一下。
 *
 *                                          2016-9-10 深圳 南山平山村 曾剑锋
 ***************************************************************************/

一、参考文档:
    1. [Bug 1293267] Re: make_ext4fs results in "can‘t set android permissions - built without android support"
        https://lists.ubuntu.com/archives/foundations-bugs/2014-October/213902.html

二、原因解释如下:
    1. When trying to use make_ext4fs command(through the mkuserimg script), it errors out with "can‘t set android permissions - built without android support", solution was to compile from source and add "-Icore/include -DANDROID" parameter, works fine.
    2. 从上可知,是make_ext4fs编译时参数没给对;
    3. 从Android源码编译的角度来说是编译成功了,也就是说Ubuntu自带了一个make_ext4fs,但没有添加Android的支持,所以只需要将Android编译出来的bin文件路径添加到PATH最前面就可以解决了。
        export PATH=/home/zengjf/myandroid/out/host/linux-x86/bin:$PATH

三、运行效果如下:
    zengjf@zengjf:~/myandroid$ mkuserimg.sh -s out/target/product/sabresd_6dq/system out/target/product/sabresd_6dq/obj/PACKAGING/systemimage_intermediates/system.img ext4 system 374476800 out/target/product/sabresd_6dq/root/file_contexts
    make_ext4fs -s -T -1 -S out/target/product/sabresd_6dq/root/file_contexts -l 374476800 -a system out/target/product/sabresd_6dq/obj/PACKAGING/systemimage_intermediates/system.img out/target/product/sabresd_6dq/system
    Creating filesystem with parameters:
        Size: 374476800
        Block size: 4096
        Blocks per group: 32768
        Inodes per group: 7632
        Inode size: 256
        Journal blocks: 1428
        Label: 
        Blocks: 91425
        Block groups: 3
        Reserved block group size: 23
    Created filesystem with 1304/22896 inodes and 79090/91425 blocks
    zengjf@zengjf:~/myandroid$ 

 

can't set android permissions - built without android support

标签:

原文地址:http://www.cnblogs.com/zengjfgit/p/5858903.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!