Although it may not attract much attention compared to other upcoming changes, Android 13 is preparing to bring a big new requirement to smartphone manufacturers. All devices launched with Android 13 or higher will need to use Huawei’s EROFS file system format for read-only partitions if they want to access Google services and Play Store. This is not an arbitrary change, however, and customers will enjoy some real benefits, such as potentially faster update downloads and slightly less system storage loss.
Change noticed for the first time Mishaal Rahman from Esper.io in a series of commitments over the past few months, and in an upcoming speech from Google telegraphing the change. Google’s licensing requirements can sometimes be hidden, but some technical changes like this are usually highlighted in things like: Android Compatibility Definition documentationand more detailed information may be available as Android 13 nears release.
File systems are a fantastically complex subject, but the short version is that different types of storage media and different use cases require different optimizations to work best. A spinning mechanical disk will have different requirements than read-only optical media or flash memory, and applying exactly the same rules to each can negate the benefits and introduce unnecessary performance penalties. File systems are not uniform, and choosing the right one for a particular storage type and application can have real benefits.
For example, in 2018 Google Samsung’s stylish flash storage-optimized F2FS For user data segments in pixels. Other Android phones (both before and after) have used it. While it offers multiple benefits for flash-based storage systems, the biggest include improved write speeds and reduced performance degradation when space is limited. But what if you don’t have to worry so much about write speed as in the case of a read-only system partition? Most Android phones will run with EXT4 in this case, but this file system doesn’t support compression like other newer file systems do, opening the door for further optimization.
I don’t know exactly how much Huawei’s EROFS shares with other file system formats on a technical level, but it offers its own enhancements that make it well suited for system partition use cases. Some system and hidden partitions on an Android device are read-only; this means that they do not need to be changed constantly, even if they are changed occasionally with updates.
In this case, it would seem like it’s not easy to compress them, but compression typically imposes performance penalties on memory usage or read/write speeds. Of course, on a read-only partition, write speeds don’t matter much, but read speeds do. Fortunately, EROFS is faster when randomly reading from a compressed read-only partition and reduces memory overhead when you need to do it. And by being compressed, it reduces the space these read-only partitions may need to occupy, freeing them up for other uses, and potentially even giving the saved space back to the customer. Rahman reports that a Cuttlefish virtual Android device image can save around 800MB of space when created using the format. This can also reduce the size of images deployed in OTA updates, protecting customers’ valuable data.
Comparisons from presentation and research paper. In short: many advantages, few disadvantages for read-only partition use cases.
In an article submitted by one of the creators of the file system, EROFS “reduces boot time of real-world applications by up to 22.9%, while nearly halving storage usage.” While the numbers actually shown in the research paper have changed and the sample benchmarks often show more modest gains, the improvements were still significant and the new file system can outperform even standard Android EXT4 in uncompressed applications: Ext4 and F2FS without compression support, EROFS always performs comparable to them. and even outperforms them.”
There doesn’t seem to be any real downsides to using EROFS for read-only system partitions, and Google seems to agree. In recent months, most of its internal tools have been updated to support it. Some vendors like OPPO and Xiaomi actually already use it. And according to one model soon commitsGoogle makes it a requirement, at least for devices launching with Android 13 if you want to use Google’s apps and store.
Rahman says the Pixel 7 will be among the first new phones to meet this soon-to-be-imposed requirement, taking advantage of the new file system format when they launch later this year. User data partitions on most phones will probably still be EXT4 or F2FS, by the way, unless Google introduces any new requirements later.
Google Pixel is no longer the phone to buy for long-term software support