can't set android permissions - built without android support

简介: /**************************************************************************** * can't set android permissions - built without android support * 说明: * 昨天在使用Ubuntu自带的mkuserimg打包Android ext4镜像时出现这个错误,今天 * 找一下原因,解决一下。
/****************************************************************************
 *      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$ 

 

目录
相关文章
|
6月前
|
Android开发
Android JNI与CAN通信遇到的问题总结
Android JNI与CAN通信遇到的问题总结
243 1
|
6月前
Transparent Data Encryption Data Dynamic and Data Dictionary Views You can query a set of dynamic and data dictionary views to find more information about Transparent Data Encryption (TDE) data.
Transparent Data Encryption Data Dynamic and Data Dictionary Views You can query a set of dynamic and data dictionary views to find more information about Transparent Data Encryption (TDE) data.
54 2
|
3月前
|
JavaScript 前端开发 Python
成功解决:Can‘t find Python executable “python“, you can set the PYTHON env variable.
这篇文章分享了作者在运行前端Vue项目时遇到的关于Python执行环境的问题和解决方法。问题是由于找不到Python可执行文件导致的编译错误,解决方法包括安装编译环境、卸载并重新安装出现问题的`node-sass`包,并重新执行`npm install`和`npm run dev`。
成功解决:Can‘t find Python executable “python“, you can set the PYTHON env variable.
|
6月前
|
Java Android开发
问题:Android requires .class compatibility set to 5.
问题:Android requires .class compatibility set to 5.
29 1
|
6月前
|
Android开发
Can t process attribute android:fillColor=@color/camera_progress_delete: references to other resou
Can t process attribute android:fillColor=@color/camera_progress_delete: references to other resou
44 1
|
6月前
|
Python
gyp ERR! stack Error: Can‘t find Python executable “python“, you can set the PYTHON env variable.
gyp ERR! stack Error: Can‘t find Python executable “python“, you can set the PYTHON env variable.
172 1
|
6月前
|
Linux Android开发
Android 内核关闭CAN 串口设备回显功能
Android 内核关闭CAN 串口设备回显功能
51 0
|
6月前
|
数据库 OceanBase
min restore scn of backup set file is greater than restore scn. can't use to restor
min restore scn of backup set file is greater than restore scn. can't use to restor
50 1
|
6月前
|
API Python Windows
[已解决] openai.error.AuthenticationError: No API key provided. You can set your API key in code using
[已解决] openai.error.AuthenticationError: No API key provided. You can set your API key in code using
418 0
Can not set final java.lang.Class field org.apache.ibatis.binding.MapperProxy.mapperInterface to com
Can not set final java.lang.Class field org.apache.ibatis.binding.MapperProxy.mapperInterface to com
152 0