feat: add automatic Android API Level detection via getprop#3153
Open
feat: add automatic Android API Level detection via getprop#3153
Conversation
Member
|
I don't believe this is strictly required, Though it does not hurt to include this, but please verify the claim. |
Author
Member
|
So you are saying the lower API level 24 does not work on Termux, any errors? Could you also check the output of |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Description
Currently,
maturinrequires theANDROID_API_LEVELenvironment variable to be explicitly set when building on-device in environments like Termux. If missing, the build fails even though the host system is a live Android instance where this information is readily available.This PR introduces a fallback mechanism:
ANDROID_API_LEVELand other clues (linker/CC) are missing, it attempts to querygetprop ro.build.version.sdk.Motivation
I encountered this issue while trying to install tools in Termux on my Redmi Note 8 Pro. Automating this step removes a manual barrier for many mobile developers.
Testing