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

Following up on [#9213](https://github.com/dotnet/android/issues/9213), The information provided in the comment is inaccurate, and this has caused us significant trouble. #9530

Open
zuo99 opened this issue Nov 20, 2024 · 0 comments
Assignees
Labels
Area: App+Library Build Issues when building Library projects or Application projects.

Comments

@zuo99
Copy link

zuo99 commented Nov 20, 2024

Android framework version

net8.0-android

Affected platform version

VS 2022 17.9.0, .NET 8.0.100

Description

In the comment, grendello mentioned that if our customers upgraded to Android 10, native apps would also encounter this issue, and they would then upgrade their signing and verification system. However, in reality, after waiting for our customers to upgrade to Android 10, the native apps are running perfectly fine without encountering any alignment issues. The problem we are facing persists with the application developed using MAUI, just as it did before.
Image

Steps to Reproduce

review Resolving Offset Errors in MAUI 8 Apps Post-Publisher Signing
#9213

Did you find any workaround?

// assemblies must be 16-byte or 4-byte aligned, or Bad Things happen
if (((state.data_offset & 0xf) != 0) || ((state.data_offset & 0x3) != 0)) {
log_fatal (LOG_ASSEMBLY, "Assembly '%s' is located at bad offset %lu within the .apk", entry_name.get (), state.data_offset);
log_fatal (LOG_ASSEMBLY, "You MUST run zipalign on %s to align it on 4 or 16 bytes ", strrchr (state.file_name, '/') + 1);
Helpers::abort_application ();
} The code snippet enforces alignment and forcibly exits when the alignment is incorrect,Could we modify it to avoid forcing the application to exit? While Google enforces alignment requirements, native apps do not forcibly exit in such cases.

Relevant log output

@zuo99 zuo99 added Area: App+Library Build Issues when building Library projects or Application projects. needs-triage Issues that need to be assigned. labels Nov 20, 2024
@dellis1972 dellis1972 removed the needs-triage Issues that need to be assigned. label Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: App+Library Build Issues when building Library projects or Application projects.
Projects
None yet
Development

No branches or pull requests

5 participants