Android And RISC-V: What You Need To Know To Be Ready

By Last Updated: November 2, 2023

Google is accepting Android patches for RISC-V as per the Google Open Source Blog published in November 2022. And a recent post on the same site states that Google has started providing mature support for RISC-V in Android. As an Android developer, you need to be ready for Android and RISC-V. Explore here what you need to be ready for this. 

As an open source operating system, Android is available at free of cost for everyone. A technical person can port this operating system to several architectures and devices. Due to its compatibility to many devices and CPU architectures, Google has added a new one, RISC-V, to its list of apps and support services. 

Like Android, RISC-V is also an open ISA (instruction set architecture) from Google. Available at free of cost, it has the same level of innovation and industry wide collaboration that is common in software around the hardware to open source ecosystem. 

Prof. Krste Asanović with his students (Andrew Waterman and Yunsup Lee) invented RISC-V in May 2010 at the University of California, Berkeley. After the invention, it has experienced a rapid increase in its adoption in microcontroller and embedded spaces. And now, it has seen its adoption expansion in areas like servers, accelerators, and mobile computing.     

According to the Google Open Source Blog published in November 2022, Google was accepting RISC-V patches. The post published on the Open Source Blog on 31 October 2023 states that Google has started offering mature support for RISC-V in Android apart from accepting patches. 

As an ISA model, RISC-V offers several extensions. And Google has decided to make an initial set around the critical RISC-V extensions that could help attain higher performance. The set has the vector, the rva22 profile, and vector crypto extensions as per the recent RISC-V Europe Summit.  

As per your need and wish, you can create, run and test the Android support for this on your own device. Similar to other AOSP platform targets, you are free to utilize the Cuttlefish Virtual Device Support:  

$ lunch aosp_cf_riscv64_phone-userdebug

$ m -j

$ launch_cvd -cpus=8 -memory_mb=8192

After that, go to use vnc viewer for connecting the running device and start interacting.

At present, these updates can help you in making a basic Android system work on RISC-V, a different kind of computer. However, it is not perfect yet. Some parts, such as the Android Runtime, require more work to be really good. Also, some tools and code are not completely optimized and do not apply the latest features. However, it is good enough for people, especially technicians, to try and work together on.

The Google Open Source Blog states that Google is working on it to make it better. According to them, developers will find testing RISC-V Android apps more comfortable in the future and it will have more tools to test on several different devices. The first one would be from wearables such as smartwatches.  

Apart from making Android work on RISC-V, Google is working with a group called RISE to make software for RISC-V computers that work really well. This includes not just Android but also other operating systems like Linux. It is useful in different areas such as powerful computers.

Google is also doing a lot to support RISC-V. Working with RISC-V International, Google is trying to set RISC-V designs and rules. It will help many other things along with Android. For Android to work on RISC-V, developers need to work together so that it could work well.