Android Studio Linux ARM support missing

Any ideas why Google lacks support for Linux ARM combo in the Android Studio?

Linux

Note: Linux machines with ARM-based CPUs aren’t currently supported.

You can get it to work but it’s not trivial, I mean to make a write up at some point but I don’t have the time right now.

Basically Android Studio, Gradle, and the Java compiler all run on top of Java, so you can run it with openjdk provided by your distro. There are some native tools that you need to build from source.

aapt2 is the most painful of these. It is open source but it has hundreds of compiler errors that you need to fix first. Google must have some bespoke build environment for these tools that they are hiding somewhere (no it doesn’t build against AOSP’s headers either).

If you want NDK, then you also need to build cmake 3.18.1 from source (although tbf you need to do that on x86_64 linux as well because the version provided by google is just broken), and I also build cmake although in retrospect I’m not sure that was necessary. These tools do compile and have clear build instructions.

You also need adb but there’s a fedora package that provides that for aarch64.

I have no clue how to get the emulator working although according to the documentation that is supported on aarch64.

Ah, so these compiler errors are not just something I’m doing wrong? Good to know :slight_smile:
I’d be very interested in that write-up! I’ve been trying to use the work at GitHub - nmeum/android-tools: Unoffical CMake-based build system for android command line utilities and Releases · lzhiyong/android-sdk-tools · GitHub as inspiration to work out how to build aapt2 and friends for Asahi Linux, but as you said, lots of compilation errors…

Also - there is a feature request open on the google issue tracker to add support for arm64 linux - might be worth to vote?

https://issuetracker.google.com/issues/227219818

@cshbicos
I’ll have a bash at this if I have time. It definitely sounds doable though, and a successful build may even allow running emulators on mobile Linux devices with a working camera, which Waydroid currently has trouble with.

Is linux-arm64 host build for Microsoft.Android.Sdk.Linux · Issue #11184 · dotnet/android · GitHub of any use? It mentions GitHub - ReVanced/aapt2: Aapt2 package build workflow · GitHub ‘package build workflow’ with latest commits 2 months ago.

This blog post written less than a year ago may also contain useful instructions, although it’s taking the emulation shortcut, which won’t do for my use case: Android development on debian/arm64 :: Home of Andreas Shimokawa

~~This post mentions a repo containing android-sdk-tools (including aapt2), which was last updated 2 years ago: Building Android applications on Linux ARM (aarch64) directly on a smartphone via Termux, crypto coins - cpu-mining.infohttps://github.com/lzhiyong/android-sdk-tools/~~ ← oops, they’re being built for Android, not Linux

The most useful thing I could find for now is https://github.com/lzhiyong/android-sdk-tools/releases/download/35.0.2/android-sdk-tools-static-aarch64.zip from Google Issue Tracker

With this install script emulator doesn’t work: Reddit - Please wait for verification

@beetroot were you ever able to get this working?