Fraunhofer Rust Codec Implementation for Android

World’s First Rust Codec Implementation for Google Android

Fraunhofer IIS, the provider of Android’s FDK AAC audio codec implementation for over a decade, has been selected by Google, Inc. as the first media codec developer to deliver a native OS, memory safe, Rust decoder implementation that’s now available in Android 17.

Rust is a modern systems programming language and has become Google’s preferred choice for Androids Media Module because of its inherent memory safety. The decision to move from C/C++ to Rust has been the starting point for a pioneering collaboration between Google and Fraunhofer IIS with the goal of porting its FDK-AAC audio codec to Rust. The result showcases Fraunhofer’s Rust expertise and sets a new standard for media codecs in Android, providing security guarantees while improving decoding performance.

While improved security typically comes at the cost of increased complexity, the team exploited several measures to overcome this trade-off and even reduce complexity. First, the FDK-AAC decoder was ported from fixed-point to floating-point arithmetic exploiting the fact that processor cores used in Android devices nowadays support efficient FPUs. In addition, the need to sanitize the C/C++ code is avoided by Rust, which saves significant instrumentation overhead. Finally, the memory safety of Rust allows further savings because the decoder can now be executed within the same process of the application, instead of an extra sandboxed process as usual. Through this architectural improvement, costly inter-process communication (IPC) can be avoided resulting in significant performance gains. As a result of all those measures, the overall complexity during audio playback is reduced by 40-60% compared to Android 16. This performance improvement is also of particular interest for decoding in editing and gaming use cases.

Fraunhofer’s FDK2 AAC Rust decoder implementation is now available to OEMs and app developers in Android 17. The FDK2 AAC Rust Decoder, developed by Fraunhofer’s audio experts in close partnership with the Android Media and Security teams, underwent extensive security testing & scrutiny before launch.

“Rust is a relatively new programming language that adds a significant layer of security to the Android Operating System,” says Nikolaus Färber, Head of the Embedded Audio Software Department at Fraunhofer IIS. “Developing the FDK2 AAC Rust decoder implementation for Android OS was a great but sometimes challenging experience for our team and we are incredibly proud of the achievement and resulting expertise.”

Since 2012, the Fraunhofer IIS C/C++ software implementations of the open ISO MPEG audio codecs AAC, HE-AAC, HE-AACv2 and AAC-ELD have been part of Android and the Android Open-Source Project with the FDK AAC Codec Library for ARM and x86 processors. In 2018, FDK2 was released, which brought several new technologies to Android OEMs, app developers and service providers, including xHE-AAC with MPEG-D DRC loudness and dynamic range control as well as the low latency AAC-ELDv2 codec.

Fraunhofer’s FDK2 AAC Rust Decoder and C/C++ Encoder and Decoder implementations for Android will both continue to be available to Android OEMs and in AOSP.

Learn more about the Fraunhofer FDK2 AAC Rust Decoder and visit the Fraunhofer IIS booth at the Mobile World Congress (MWC) 2026 in Shanghai (June 24-26) to experience many more innovations from Germany’s audio and speech coding experts.

 

xHE-AAC is a registered trademark of Fraunhofer in Germany, and other countries. Android is a trademark of Google Inc. The Android robot is reproduced or modified from work created and shared by Google and used according to terms described in the Creative Commons 3.0 Attribution License.