Devices launched with Android 13 will use a more efficient file system

All devices that will be launched on the market with Android 13 on board will make use of EROFS, a new, more efficient file system used for the first time by Huawei. Yes, you read that right: despite the US ban affecting heavily on Huawei’s international sales, after many years the Chinese manufacturer continues to significantly influence the entire world of Android devices.

The novelty had passed somewhat in silence compared to the more evident ones of the new version of the robot, but now the usual Mishaal Rahman took care of digging deeper and bringing it to light.

join us on telegram

From Huawei to Linux to Android: here is EROFS

EROFS (“Enhanced Read-Only File System”), a file system created by engineer Xiang Gao when he worked for Huawei, will be used on every device launched with Android 13, or rather on all those with GMS (Google Mobile Services).

To be honest, this file system is already used by some OEMs in addition to Huawei due to its benefits in terms of efficiency and performance. Well. now that EROFS is supported by Linux 5.4, Google has seen fit to take the leap and make it the default file system for Android’s read-only partitions.

First introduced in the Linux kernel staging area with version 4.14 in mid-2018 – when author Xiang Gao had submitted the first driver patches -, EROFS differs from other read-only file systems in that it also looks at performance and not just efficiency in terms of space-saving.

As a demonstration of what was stated, Xiang had shared a promising comparison between the sequential and random read/write data of an Android smartphone with Kirin 970 with partition formatted with EROFS and with EXT4.

After a year of development and other patches, Xiang had managed to bring EROFS from the staging area to the mainline of Linux with version 5.4 in 2019. The file system was already stable enough to fit into 10 million Huawei with EMUI 9.0.1 and the Chinese manufacturer had presented it as one of the new features of EMUI 9.1.

Other OEMs and Google

Due to the new kernel version required and the need to adapt the OTA update infrastructure, other OEMs have embraced the change only in mid-2021 and examples of OPPO and Xiaomi can be cited.

But now the news is ready to spread thanks to Google: the Android Common Kernel has adopted EROFS from android11-5.4 and the devices launched with Android 13 must have at least android12-5.4, so every device with the new version out of the box will be at least compatible with EROFS; in addition, Google has brought support for EROFS into the Android update_engine, added userspace tools, open to the possibility of creating GSI and AVD cuttlefish with EROFS. The road now seems to have been traced: Google intends to replace EXT4 with the file system made famous by Huawei, at least in the read-only partitions of Android.

raven:/ $ mount
/dev/block/dm-7 on / type ext4 (ro,seclabel,relatime)
/dev/block/dm-8 on /system_dlkm type ext4 (ro,seclabel,relatime)
/dev/block/dm-9 on /system_ext type ext4 (ro,seclabel,relatime)
/dev/block/dm-10 on /product type ext4 (ro,seclabel,relatime)
/dev/block/dm-11 on /vendor type ext4 (ro,seclabel,relatime)
/dev/block/dm-12 on /vendor_dlkm type ext4 (ro,seclabel,relatime)

Previously we mentioned the benefits that convinced other OEMs to join the novelty, well in addition to looking at the performance, this file system is also much more efficient, just think that a cuttlefish image with EROFS occupies 800 MB less than one with EXT4. In short, more space to use for system apps or to offer to users; without forgetting that a smaller OTA update also means less mobile data consumption.

If you want to get into the technical discourse, you can take a look at the following PDF and these other links, but it is a rather complex topic.

The news was in the air

Returning to Google, the news was already in the air since last December, but now he wants to make everything clearer. The PackageManager in the Android 13 beta contains two new feature declarations: android.software.erofs and android.software.erofs_legacy. These do not appear in the AOSP yet, but on Google Pixel 6 with EXT4 there is already a trace of EROFS (we are talking about support, not formatting).

Leave a Comment