Skip to content

feat: add support for Android#15565

Merged
JoergAtGithub merged 1 commit intomixxxdj:mainfrom
acolombier:feat/add-android-build
Nov 22, 2025
Merged

feat: add support for Android#15565
JoergAtGithub merged 1 commit intomixxxdj:mainfrom
acolombier:feat/add-android-build

Conversation

@acolombier
Copy link
Member

@acolombier acolombier commented Nov 3, 2025

Currently, the Android app starts but it is pretty much unusable without most of the currently outstanding QML PRs.

I have a branch on my fork with most of these PR merged on top of this, if anybody wants to play with this locally.

TODO:

  • Signing key
  • Waveform false positive assert fix To be fixed later
  • Logo and version number
  • VCPKG update to latest 2.7
  • Target API 28 as per Qt guideline (will be done ahead of 3.0 release)
  • Complete the wiki page about building for Android

@github-actions github-actions bot added ui build preferences waveform soundio cmake qml controller backend developer experience Issues, bugs and PRs related to the development process, development environment & developer docs labels Nov 3, 2025
@acolombier acolombier added this to the 3.0-beta milestone Nov 3, 2025
@JoergAtGithub
Copy link
Member

My phone failed installing the apk from CI, with a message that the package is corrupt

@acolombier
Copy link
Member Author

Yeah, that's because it is not signed (see the file name, ...-unsigned.apk). I need to fix this. Also, is your phone on Android 15?

@OOKAMIFR
Copy link

hello

this is really interesting and would like to take a look about
you talk about your fork branch, do you have link ?

i would like to test apk and try to build from git with android studio

tnanks :)

@acolombier
Copy link
Member Author

acolombier commented Nov 21, 2025

Hi @OOKAMIFR , my branch is feat/android but it contains a lot of changes! Note that this is mostly done to be built from Ubuntu 24.04 and you will need to do some work . In case you are on Windows/Mac/Other Linux distro, you may want to look into the devcontainer definition, which I use to develop on.

Also, note that you won't be able to directly build from Android Studio. You may use Android studio to debug/profile the application, but the build process relies on CMake (gradle file gets generated by Qt to bundle the native library only, and I wasn't able to get the Qt plugin for Android Studio to work with VCPKG but perhaps I did something wrong)

@gbraad
Copy link

gbraad commented Nov 21, 2025

Android 15

It installed on 12, and crashed on start. If this is 15 only, enforce this... but hopefully not, as what requires 15?

@acolombier
Copy link
Member Author

acolombier commented Nov 21, 2025

Currently, it targets SDK 35 only (Android 15).

If this is 15 only, enforce this...

As written in the PR description, we will aim to support lower SDK - likely up to 11 since there is permissions and AAudio changes. In the current state, this is expected to crash, as it depends on the ready QML PRs - if you are interested, we are looking for help test and review those.

Please note that as the rest of the 3.0, this is highly unstable software and we suggest to be extra careful/expect random behaviour currently!

@acolombier
Copy link
Member Author

@JoergAtGithub could you please have a look again? We should now have a signed APK. If it works, I will setup some persisting keys so we can have rolling updates from main artifacts.

@acolombier acolombier marked this pull request as ready for review November 21, 2025 21:08
@gbraad
Copy link

gbraad commented Nov 21, 2025

More than willing to help. Wanted to have a look at libopenmpt/linmodplug, but sure will see what I can do here.

@JoergAtGithub
Copy link
Member

JoergAtGithub commented Nov 21, 2025

I can install and start it now on my phone now
😃:
Screenshot_2025-11-21-23-25-45-70_e8a3968b9086a5a5c5c32ca3f444cb6e
But the screen resoluzion/size seems not to be recognized. I saw only the part of the UI shown in the screenshot. The knob responed somehow tontouch gestures, but it was not a smooth linear movement.
After the second start I get always the following message, which is not helpful, as I can not specify command line arguments. And an old profile can not exist on Android btw.
Screenshot_2025-11-21-23-31-45-25_e8a3968b9086a5a5c5c32ca3f444cb6e

@acolombier
Copy link
Member Author

acolombier commented Nov 21, 2025

Yep, that's the expected result!
As I mentioned above, we will need to merge many (most?) of the QML PR, and hopefully, this will help with motivating the team to do so ;)

But the screen resoluzion/size seems not to be recognized. I saw only the part of the UI shown in the screenshot. The knob responed somehow tontouch gestures, but it was not a smooth linear movement.

This is partially being fixed in #15483 (which depends of #14849)

After the second start I get always the following message, which is not helpful, as I can not specify command line arguments. And an old profile can not exist on Android btw.

This is fixed in #15361

- name: "[android] Setup signing key"
if: startsWith(matrix.artifacts_slug, 'android')
run: |
if [ -z "${ANDROID_SIGNING_KEYSTORE_BASE64}" ]; then
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to register an Android code-sign key in name of Mixxx e.V. ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need, we can simply generate a key with the Mixxx e.V as organisation. I have done that already, I will upload the secret once we merge the PR

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have setup a certificate for CN=Android App, OU=Mixxx Development Team, O=Mixxx e.V now

BUILDENV_SHA256="0821e7d4f6b989ed5acc3c9a8dafa00f479d9d8bfc8dea9f9b512816070c9bba"
fi
else
echo "ERROR: Unsupported architecture detected: $HOST_ARCH"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the host architecture of the VCPKG buildsystem really relevant here? I assumend that only the target architecture matters, but I might be wrong.
Does the host platform / compiler matter? Can I use the mixxx-deps-2.7-arm64-android-9dcfaf7 buildenv to build the Android app under Windows or macOS?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, unfortunately, it seems that it is relevant. Looking at VCPK, it seems that you need to cross compile from a predictable system due to toolings (e.g Qt moc, used during compilation)

In the wiki, I have suggested using DevContainer to allow building from Mac and Windows for now, till we support other hosts (if we decide it is necessary!)

return -1;
}

#ifndef Q_OS_ANDROID
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general the libusb backend of hidapi should support reading the report-descriptor. Maybe an Android permission issue?

Copy link
Member Author

@acolombier acolombier Nov 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately, it only works once you have allowed the app to access the device, as it requires to communicate with the device

Currently, I have made the decision to follow the given flow:

  • List all device (without hid read)
  • User starts a controller
  • Android permission popup

In the future, we could change to:

  • List all device and popup permission request for each one to get HID read
  • User starts a controller

Arguably, an Android device will usually only have USB device intended to be used in Mixxx so we could assume the second flow is acceptable, but I would suggest to keep the first one for now, as there is further work to do on permission anyway

Copy link
Member

@JoergAtGithub JoergAtGithub left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code LGTM! And the .apk from CI starts up on my phone.

@acolombier acolombier force-pushed the feat/add-android-build branch from 7597102 to 4239279 Compare November 22, 2025 13:36
@JoergAtGithub
Copy link
Member

Thank you, for this great contribution!

@JoergAtGithub JoergAtGithub merged commit a9b4887 into mixxxdj:main Nov 22, 2025
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Android build cmake controller backend developer experience Issues, bugs and PRs related to the development process, development environment & developer docs packaging preferences qml soundio ui waveform

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants