標籤:
/**************************************************************************** * 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三、運行效果如下: [email protected]:~/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 [email protected]:~/myandroid$
can't set android permissions - built without android support