Skip to content
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

fix: Support patching on ARMv7 by updating AAPT2 #2084

Merged
merged 1 commit into from
Jul 28, 2024

Conversation

oSumAtrIX
Copy link
Member

@oSumAtrIX oSumAtrIX commented Jul 25, 2024

@oSumAtrIX oSumAtrIX requested review from Axelen123 and Ushie July 25, 2024 23:35
@oSumAtrIX oSumAtrIX linked an issue Jul 25, 2024 that may be closed by this pull request
3 tasks
@oSumAtrIX oSumAtrIX changed the title fix: Update AAPT2 library to support patching on ARMv7 fix: Update AAPT2 to support patching on ARMv7 Jul 25, 2024
@oSumAtrIX oSumAtrIX changed the title fix: Update AAPT2 to support patching on ARMv7 fix: Support patching on ARMv7 by updating AAPT2 Jul 25, 2024
@oSumAtrIX oSumAtrIX added the ReVanced Manager Compose Regarding the Compose rewrite of ReVanced Manager label Jul 25, 2024
@kitadai31
Copy link
Contributor

kitadai31 commented Jul 28, 2024

Now that all architectures are fully supported, I think the entire architecture warning can be removed

if (!Aapt.supportsDevice()) {
{
NotificationCard(
isWarning = true,
icon = Icons.Outlined.WarningAmber,
text = stringResource(R.string.unsupported_architecture_warning),
onDismiss = null
)
}
} else null,

private val WORKING_ABIS = setOf("arm64-v8a", "x86", "x86_64")
fun supportsDevice() = (DEVICE_ABIS intersect WORKING_ABIS).isNotEmpty()

@oSumAtrIX
Copy link
Member Author

That's not all architectures

@kitadai31
Copy link
Contributor

kitadai31 commented Jul 28, 2024

If you are talking about armeabi, mips and mips64, there is no need to consider them
If the device only supports those architectures, the installation will be rejected with a compatibility error because the package installer checks the apk archs

In addition, wasn't this warning necessary because armv7 aapt2 was unstable but still existed?
Previously, some ARMv7 devices were compiling resources successfully, and others were failing with 135 error
I believe this is the reason of the word "will most likely fail."
OTOH armeabi, mips and mips64 of aapt2 are not present in manager
This is the difference

@kitadai31
Copy link
Contributor

I believe this is the reason of the word "will most likely fail."

nvm, I forgot about if users patched non-resource patches only

@oSumAtrIX
Copy link
Member Author

The code can be kept as a pessimistic precaution. Its formely known as defensive programming

@oSumAtrIX oSumAtrIX merged commit cdc69ea into compose-dev Jul 28, 2024
3 checks passed
@oSumAtrIX oSumAtrIX deleted the fix/armv7-aapt branch July 28, 2024 20:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ReVanced Manager Compose Regarding the Compose rewrite of ReVanced Manager
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat: Update AAPT2 ARMv7 library
4 participants