Greetings,
I'm using the Freescale Kitkat Android BSP for an IMX6 based board with NAND flash. While the Freescale patches to Android include pulling in external/mtd-utils with some (dated) support for ubi/ubifs this creates a SYSTEM partition with ownership/permissions that do not match those defined in system/core/include/private/android_filesystem.
I've noticed that files in out/target/product/<device>/system all have ownership and umask matching the build user and build user's umask at the time of build and that Android has its own make_ext4fs utility (out/host/linux-x86/bin/make_ext4fs built from system/extras/ext4_utils/make_ext4fs.c) specifically to manage the permissions and ownership of the files in SYSTEM. Doesn't mtd-utils need to be patched to create the files in a ubifs in the same way?
Regards,
Tim
partner
gateworks
Kitkat Android BSP did not generate system.img which is matched with android_filesystem. That was because the tool mkfsubifs in kitkat doesn’t support change system file’s ownership/permissions.
We support change the system file’s ownership/permissions in the next version: lollipop.
You can refer to attached patch to change the ubifs system file’s ownership/permissions.
Have a great day,
Sergio
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Sergio,
I ended up patching mtd-utils also. Your patch does not look complete. Mine can be found here in case anyone needs it: mkfs.ubifs: add fixstats capability · ca8f166 · Gateworks/android_external_mtd-utils · GitHub. I believe something else is still missing as I recall still having to disable selinux to boot via NAND UBI. I'll revisit and reply when I can get back to looking at this.
I think the release notes are very misleading in stating that NAND is supported.
Regards,
Tim