2

I am planning to get the RPi4 with 4GB RAM to replace my desktop. I occasionally build AOSP and Lineage for my android devices, so I wanted to check if RPI4 can be used to compile the same?

I have checked the AOSP docs and it says 64-bit OS is necessary for compilation and a minimum of 4GB RAM and 250GB of storage. I can live will long build times, but since the doc doesn't say anything about the HOST system's architecture, it got me curious.

  • Quick comment. I vaguely remember someone complaining that Rpi4 is still using 32 bit stuff. If that is true, then you have no luck. Otherwise I will google more and learn some AOSP and try to play with it. (I am a huge fan of Android, using Galaxy C9 Pro). Cheers. – tlfong01 Sep 6 '19 at 12:37
  • This post and other similar posts say Rpi is only 32 bit: quora.com/… – tlfong01 Sep 6 '19 at 14:21
1

The documentation at https://source.android.com/setup/build/initializing actually does say something about the host architecture. The package names imply an x86_64 host that also supports i386 binaries via multiarch.

Some users have attempted to run the AOSP build flow natively on aarch64 systems[1], but this is unfinished research.

A means to build AOSP on a Pi requiring not as much creativity would be to install qemu-user-static and develop inside a Debian x86_64 chroot. This can be done even from a 32-bit distribution such as Raspbian. Keep in mind, although you have said:

I can live will long build times

the limited horsepower of the Pi 4 combined with an order of magnitude slowdown due to emulation may result in a build time of days to weeks.

The Pi 4 is marketed as a desktop replacement, not a development workstation replacement.

[1] C/C++ Toolchain for Android Build on aarch64 (WIP)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.