UBIFS File System to Android

Posted on by : Writer Tags:

UBIFS File System to Android

This paper describes the process and modifications necessary for UBIFS file system to properly function under Android Nougat. These modifications refer to BLKROSET ioctl() (input/output control) support and the required modes for fallocate() system call. All modifications have been performed on Android flavored Linux kernel, version 3.18. Validation has been performed by executing CTS test suite, executing LTP test suite and comparing custom test results to those of EXT4 file system. Keywords — Android, fallocate, Linux, UBIFS code shoppy

ANROID is a mobile platform developed by OHA “Open Handset Software Alliance”, whose most influential member is Google. It is open-source software, meaning that anyone can download the source code from AOSP (Android Open Source Project) and use or modify it. Android can be roughly separated into following major components: Applications, Application Framework, Libraries, Runtime, and Linux Kernel [1]. Linux kernel used for Android is not the mainline upstream Linux kernel version. Android introduces various kernel changes required for proper operating system functioning. Those changes are maintained under AOSP, as Linux kernel community does not plan to upstream most of them. UBIFS is a flash file system developed by Nokia engineers with help of the University of Szeged. UBIFS may be considered as the next generation of the JFFS2 file system. UBIFS is very different than any traditional file system – it does not work on top of block devices (like hard drives, MMC/SD cards, USB flash drives, SSDs, etc.). UBIFS was designed to work on top of raw flash, which has nothing to do with block devices. That is why UBIFS does not work on MMC cards and the like – they look like block devices to the outside world because they implement FTL (Flash Translation Layer) support in hardware, which simply emulates a block device on top of the built-in raw flash. UBIFS works on top of MTD subsystem and UBI subsystem, which is a wear-leveling and volume management system for flash devices [2]. File systems recommended for block devices should not be used on raw flash devices, because of lack of wear-leveling, which will quickly lead to file system instability. Each memory location on the flash has a limited number of writes and if not ensured that writing spreads evenly across the whole file system, some memory locations will die out much sooner than the others. This causes a shorter life span of the whole flash memory chip

 UBIFS File System to Android

In its latest versions Android stepped away from raw flash file systems and focused on file system support based on block devices. The focus is mostly on EXT4 and F2FS file systems. However, this approach omits to address a massive number of devices using raw flash, especially earlier released devices which require new Android update for security and feature improvements. Since UBIFS proved to be the best choice when it comes to raw flash file systems, it was an obvious candidate for adding additional support. This paper describes modifications required to enable full UBIFS support for Linux kernel version 3.18 under Android Nougat. Apart from this introduction, the paper consists of 4 additional chapters. Second chapter, which is the next one, explains the issue and the solution related to BLKROSET ioctl() (input/output control). Third chapter explains the issue related to fallocate() system call and describes the solution. Fourth chapter shows steps taken in order to validate UBIFS support on Android. Fifth chapter, which is the final chapter, represents the conclusion. https://codeshoppy.com/php-projects-titles-topics.html