Allow building and running Android apps without an operational Android emulator
- Dominant language
- Python
- Stars
- 3.3k
- Forks
- 549
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 40
Description
### What is the problem or limitation you are having?
Currently, building and running Android apps requires an operational emulator in the Android SDK. Strictly speaking, this isn't necessary to build and run apps on physical devices.
### Describe the solution you'd like
Briefcase considers the emulator optional when it's absent or non-operational.
A confounding issue here is the Android SDK currently considers the emulator a dependency for installing `build-tools`. Since the `build-tools` are required, `sdkmanager` will attempt to install the emulator as well. This can be bypassed, though, by mocking the emulator (like [this](https://github.com/rmartin16/briefcase-android-sdk-aarch64/tree/main/emulator)). Ideally, though, Google will remove this dependency from `build-tools` in the future.
Once you've got a mocked emulator, though, Briefcase tries to use it during `briefcase run android`; at this point, Briefcase would ignore the functionality related to the emulator and just allow the user to run the app on a physical device.
The primary use-case here would be Raspberry Pis. First, it's non-trivial to get a working emulator on a Pi....and second, it's painfully slow to run the emulator on one. So, practically speaking, someone would definitely want to use a physical device anyway.
### Describe alternatives you've considered
Ensure an emulator is always available.
### Additional context
_No response_
Contributor guide
Research direction
Start by tracing the Android handling behind `briefcase run android`, including how `sdkmanager` and the Android SDK emulator are checked during setup. Verify the current behavior with a mocked or non-operational emulator and a physical Android device; done means building and running on the device without requiring an operational emulator.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, python
- Domain
- build-system, mobile
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100