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

libconscrypt_jni.so is not 16kb aligned for Android #3624

Closed
fxsweety opened this issue Aug 8, 2024 · 18 comments
Closed

libconscrypt_jni.so is not 16kb aligned for Android #3624

fxsweety opened this issue Aug 8, 2024 · 18 comments
Labels
feature-request Request a new feature

Comments

@fxsweety
Copy link

fxsweety commented Aug 8, 2024

Which AWS Services is the feature request for?
to get libconscrypt_jni.so to be 16kb aligned

Is your feature request related to a problem? Please describe.
Android has released to check if the libraries used are 16kb aligned https://developer.android.com/guide/practices/page-sizes#:~:text=Beginning%20with%20Android%2015%2C%20Android,on%20these%2016%20KB%20devices
and we noticed libconscrypt_jni.so comign from aws sdk is not aligned

/tmp/my_apk_out9/tmp/my_apk_out8/lib/arm64-v8a/libconscrypt_jni.so: \e[31mUNALIGNED\e[0m (2**12)

@fxsweety
Copy link
Author

fxsweety commented Aug 8, 2024

we tried com.amazonaws:aws-android-sdk-iot:2.75.2

1 similar comment
@fxsweety
Copy link
Author

fxsweety commented Aug 8, 2024

we tried com.amazonaws:aws-android-sdk-iot:2.75.2

@tylerjroach
Copy link
Member

Conscript is a library from Google. We will be reliant on that library adding 16kb page size support: https://github.com/google/conscrypt

Please also consider AWS newer IoT library that builds in additional support for mqttv5: https://github.com/aws/aws-iot-device-sdk-java-v2

@smore-lore
Copy link

Hey, can you confirm where you get the conscrypt library from? Built from source or from somewhere else?

@github-actions github-actions bot added the pending-maintainer-response Issue is pending response from an Amplify team member label Aug 16, 2024
@tylerjroach
Copy link
Member

@smore-lore It's a library Google publishes.

Here is the import:

implementation 'org.conscrypt:conscrypt-android:2.5.1'

Their repo is open source here: https://github.com/google/conscrypt

@github-actions github-actions bot removed the pending-maintainer-response Issue is pending response from an Amplify team member label Aug 16, 2024
@prbprbprb
Copy link

prbprbprb commented Aug 17, 2024

Should be fixed in org.conscrypt:conscrypt-android:2.5.3, currently going through the publishing pipeline.

@github-actions github-actions bot added the pending-maintainer-response Issue is pending response from an Amplify team member label Aug 17, 2024
@tylerjroach
Copy link
Member

@prbprbprb @smore-lore Thank you both for your support!

@github-actions github-actions bot removed the pending-maintainer-response Issue is pending response from an Amplify team member label Aug 19, 2024
@tylerjroach
Copy link
Member

@fxsweety I see org.conscrypt:conscrypt-android:2.5.3 is available. We will pull this in shortly.

@prbprbprb
Copy link

Let us know how you get on, please.

@github-actions github-actions bot added the pending-maintainer-response Issue is pending response from an Amplify team member label Aug 19, 2024
@fxsweety
Copy link
Author

@fxsweety I see org.conscrypt:conscrypt-android:2.5.3 is available. We will pull this in shortly.

Thank you.. once its updated we will verify from our client side, if its 16kb aligned

@tylerjroach
Copy link
Member

@prbprbprb Verified that 2.5.3 works on 16KB page size devices.

@fxsweety Support will go in our next release of the AWS Android SDK. However, if you are not calling mqttManager.connectUsingALPN, you should not be concerned. Conscrypt is only used when the port is set to 443, which is not used on the standard connect call.

@github-actions github-actions bot removed the pending-maintainer-response Issue is pending response from an Amplify team member label Aug 19, 2024
@prbprbprb
Copy link

Complete aside, I'm just curious why you use unbundled Conscrypt for TLS for that one sub-project?

If it's because it supports a lower minSdk than the Google Play ProviderInstaller API then just a head-up that the next major release will be changing to minSdk 21 which is about the same as Play.

@github-actions github-actions bot added the pending-maintainer-response Issue is pending response from an Amplify team member label Aug 19, 2024
@tylerjroach
Copy link
Member

Thanks for the heads up.

I don't have much historical context into the reasoning. It was most likely used for versions 4.x versions of Android with limited TLS 1.2 capabilities, though I'm not sure why we use Conscrypt for all versions here. It could be to support non Google Play devices as IoT has unique use cases.

This is a legacy library for IoT, with a direct replacement available (minSdk 24), which is likely the reason there is some activity still on this library. This conscrypt update should get us through for the remainder of the product life. Thank you for your support.

@github-actions github-actions bot removed the pending-maintainer-response Issue is pending response from an Amplify team member label Aug 19, 2024
@prbprbprb
Copy link

Cool. I'd suggest that unless you need to run on esoteric devices then ProviderInstaller is probably your best bet (and also 16K aligned nowadays)

@github-actions github-actions bot added the pending-maintainer-response Issue is pending response from an Amplify team member label Aug 20, 2024
@tylerjroach tylerjroach removed the pending-maintainer-response Issue is pending response from an Amplify team member label Aug 20, 2024
@fxsweety
Copy link
Author

@prbprbprb Verified that 2.5.3 works on 16KB page size devices.

@fxsweety Support will go in our next release of the AWS Android SDK. However, if you are not calling mqttManager.connectUsingALPN, you should not be concerned. Conscrypt is only used when the port is set to 443, which is not used on the standard connect call.

Do we know when is the next release. thanks.

@github-actions github-actions bot added the pending-maintainer-response Issue is pending response from an Amplify team member label Aug 20, 2024
@tylerjroach
Copy link
Member

We do not make release commitments but we do try to release weekly when we have an update to ship. I'll update the thread here when this code is released.

@github-actions github-actions bot removed the pending-maintainer-response Issue is pending response from an Amplify team member label Aug 21, 2024
@vincetran
Copy link
Member

Hi @fxsweety, looks like we missed updating this Issue but v 2.77.0 of the SDK has the update to Conscrypt! Closing this issue is resolved.

Copy link
Contributor

This issue is now closed. Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request a new feature
Projects
None yet
Development

No branches or pull requests

6 participants