Skip to content

Set default architecture for Android to aarch64 #4257

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

leo030303
Copy link
Contributor

The default architecture on Android in v0.6.3 was aarch64. It got changed to the architecture of the host device, which is generally x86. I think aarch64 makes more sense as a default, as I couldn't figure out why my apk's were now incompatible with my phone. A quick look didn't find a ton of statistics on it but these numbers from Unity from 2017 have Arm at 98% market share on Android.

@leo030303 leo030303 requested a review from a team as a code owner June 7, 2025 23:41
@jkelleyrtp
Copy link
Member

jkelleyrtp commented Jun 18, 2025

We use the host's architecture since usually people will use the android emulator which typically is aligned with the host for performance since it doesn't require emulation.

I believe our auto-detection logic uses adb to probe the architecture of the connected device. What's your usecase that requires the architecture to be different?

Perhaps in dx serve we could use the adb probe variant and otherwise default to aarch64?

@leo030303
Copy link
Contributor Author

Ya the current logic auto detects using adb and then falls back to the host architecture, my use case is when running dx bundle without having a device connected, on 0.6.3 it defaulted to aarch64 whereas now it's using my laptops architecture.

I understand the reasoning for using the host architecture, maybe the best solution is to default to the host architecture if connected to an emulator, use the connected device architecture if there's a connected device, and otherwise use aarch64 as the fallback. As far as I know this pull request does the second two but I'm not sure about the first, I'll test that and update if necessary

@jkelleyrtp jkelleyrtp added this to the 0.7.0 milestone Jul 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants