Although less noticed compared to other upcoming changes, Android 13 is ready to impose major new requirements on smartphone makers. All devices running Android 13 or later must use Huawei’s EROFS file system format for read-only partitions when shipping with access to Google services and the Play Store. However, this is not an arbitrary change, and customers can enjoy the real benefits of this change, including the potential for faster downloads of updates and slightly less storage space lost on the system.
This change was first discovered by Mishaal Rahman of Esper.io in a series of commitments over the last few months and a future upcoming talk by Google that telegrams the change. Google’s licensing requirements may be kept secret, but these specific technical changes are often highlighted in the Android compatibility definition documentation, etc., and more detailed information as Android 13 approaches. May be available.
File systems are a very complex subject, but shorter versions require different optimizations to work best with different types of storage media and different use cases. Rotating mechanical discs have different requirements than read-only optical discs and flash memory, and imposing exactly the same rules on each can have no benefit and can result in unnecessary performance degradation. The file system is not a panacea. The real benefits are achieved by choosing the right file system for your particular storage type and application.
For example, in 2018, Google adopted F2FS for Samsung’s sophisticated flash storage for Pixels’ user data partitions. Other Android phones (both front and back) also use it. Flash-based storage systems have multiple benefits, but one of the biggest benefits is increased write speed and reduced performance degradation when space is limited. But what if you don’t have to worry too much about write speed, as in the case of read-only system partitions? In that case, most Android phones support EXT4, but their file system doesn’t support compression like other modern file systems, opening the door to further optimization.
We don’t know exactly how much Huawei’s EROFS shares with other filesystem formats at the technical level, but it does provide unique improvements suitable for system partition use cases. Some systems and hidden partitions on Android devices are read-only. This means that you don’t have to make continuous changes, even if they change occasionally due to updates.
In such situations, compressing them may seem easy, but compression usually imposes a performance penalty on memory usage or read / write speeds. Of course, write speed isn’t that important for read-only partitions, but read speed is. Thankfully, EROFS is faster when reading randomly from a compressed read-only partition, reducing memory overhead when it needs to be done. Also, because it is compressed, it reduces the space that these read-only partitions need to occupy, allows it to be used for other purposes, and may return the saved space to the customer. Rahman reports that building a Cuttlefish virtual Android device image using this format saves about 800MB of space. This also reduces the size of the images deployed by the OTA update, which can save valuable customer data.
Benchmarks from presentations and research papers. So while the read-only partition use case has many advantages, it has some disadvantages.
According to a paper submitted by one of the file system authors, EROFS “reduces actual application launch times by up to 22.9% while halving storage usage.” The numbers actually shown in the research papers vary, and the benchmark examples often show more modest improvements, but still significant improvements, with new filesystems in uncompressed applications. You can beat the standard Android EXT4. For Ext4 and F2FS, which do not support compression, EROFS always performs at the same level, and even better. “
There seems to be no real downside to using EROFS for read-only system partitions, and Google seems to agree. In the last few months, more internal tools have been updated to support it. Some vendors like OPPO and Xiaomi are actually already using it. Also, according to recent commit patterns, Google has made it a requirement for devices running on Android 13. At least if you store using Google’s app.
Rahman says the Pixel 7 will be one of the first new phones to meet the requirements that will soon be imposed, taking advantage of the new file system format that will be available later this year. Most phone user data partitions will probably be either EXT4 or F2FS for the foreseeable future, unless Google later imposes new requirements.
Read next
Commentaires
Enregistrer un commentaire