Running the LineageOS Android distribution on NVIDIA Jetson-based devices
Published:
Topics: Open OS, Open hardware
The highly popular and open source Android operating system, while most prominent in consumer-grade products, is also used as an embedded OS where a familiar user experience and standardized configuration are a priority.
While Antmicro has been providing software, hardware and AI services to help dozens of customers build Jetson-based products based on the officially supported Linux OS, we have seen growing interest in Android as well. Combining the familiar look and feel of Android with the compute power of NVIDIA’s Jetson platforms, which Antmicro has already done in the past opens the doors to new use cases, providing AI-capable and GPU-accelerated processing in a user-friendly package. This is useful to both application developers, thanks to a familiar programming environment and standardized APIs, and the end customers accustomed to Android’s UI/UX, making it a perfect choice for user-facing industrial devices.
To showcase this capability, in this note we’ll describe how to build and run LineageOS, an open and heavily customizable Android distribution, on Antmicro’s open hardware Jetson Nano Baseboard, and how this solution can be adjusted and enhanced by Antmicro for your Jetson-based device.
Building LineageOS for NVIDIA Jetson TX2 NX
LineageOS is an open source distribution of Android, available for a wide range of mobile devices as well as some NVIDIA Jetson platforms. For developers, it offers a so-called LineageSDK which guides the process of building and running the OS and is quite easy to adjust to your needs.
The LineageOS build process produces all the artifacts necessary for flashing the device, i.e. the LineageOS zip installer package and the boot image. The building instructions here are based on the relevant chapter from the LineageOS documentation, with some necessary modifications.
All LineageOS versions should be available for the Jetson TX2 NX, including the newest one - 20.0, based on Android 13. However, when building version 19.1 or higher, LineageOS requires a patch to be applied for the build to succeed. Detailed instructions for downloading and building the sources can be found in a special guide we prepared.
Running LineageOS on Jetson Nano Baseboard
As a basis for many industrial projects we’ve developed over the years, the Jetson Nano Baseboard, in combination with the TX2 NX SoM, serves as a great starting point for a small-footprint Android-capable, user-facing industrial device.
To flash LineageOS to this board, you first need to flash the module with a recovery image, and then, using Android Debug Bridge (ADB) that is available for download as part of Google’s platform tools, you can flash the LineageOS image. LinageOS has designated packages with the recovery image, as described in the flashing section of our guide. The flashing script checks for compatibility with the module and the board and assumes that the board being flashed is the Jetson Xavier NX baseboard. Therefore, you need to empty the TARGET_CARRIER_ID
variable to skip the compatibility check. After successfully flashing the board with a recovery image, you can flash the board with the LineageOS image. For detailed instructions, refer to the complete guide.
Customizing Android for use in products
Antmicro’s services go well beyond porting to new platforms - we offer comprehensive engineering services, including hardware development, boot time optimization, custom branding such as boot logos and more. We can also enable kiosk mode (single application mode) in your device, limiting the number of applications available for users to a predefined subset, disabling device buttons to prevent accidental power-off by the user, disabling screen dimming etc.
To help you manage updates at scale, we can implement an Over-The-Air update system using our Remote Device Fleet Manager (RDFM) supporting both Linux and Android targets with fast delta updates.
Antmicro can help you bring the benefits of the flexible and user-friendly Android OS to your NVIDIA Jetson-based device. We can implement and customize Android for this and other similar hardware platforms, such as our Qualcomm Snapdragon 845 baseboard. If you’re interested in using Android with your embedded device, or would like to customize an existing solution, reach out to us at contact@antmicro.com.