Skip to content

feat: add support for BoringSSL on Android 16 with updated offsets#885

Merged
cfc4n merged 3 commits into
masterfrom
feature/android-16-boringssl
Dec 5, 2025
Merged

feat: add support for BoringSSL on Android 16 with updated offsets#885
cfc4n merged 3 commits into
masterfrom
feature/android-16-boringssl

Conversation

@cfc4n
Copy link
Copy Markdown
Member

@cfc4n cfc4n commented Dec 5, 2025

This pull request adds support for Android 16's BoringSSL version to the codebase, updating offsets and logic to handle changes in BoringSSL's internal structures. The main changes include introducing a new header for Android 16, updating probe logic to use the correct offsets, and modifying the offset generation script for future Android versions.

Android 16 BoringSSL support:

  • Added new header file kern/boringssl_a_16_kern.c with updated offsets for BoringSSL structures specific to Android 16, reflecting changes such as the relocation or removal of fields like version and secret_length.
  • Updated the build configuration in variables.mk to include the new target kern/boringssl_a_16.

Probe logic updates for BoringSSL offset changes:

  • Modified probe functions in kern/boringssl_masterkey.h and kern/openssl.h to conditionally use new offsets (SSL_SESSION_ST_SSL_VERSION) and handle the absence of certain fields (secret_length) for Android 16 and above, using preprocessor guards for compatibility. [1] [2] [3] [4] [5] [6]
  • Defined BORINGSSL_SSL_MAX_MASTER_KEY_LENGTH for use when the secret_length field is missing in Android 16's BoringSSL.

Offset generation script improvements:

  • Updated utils/boringssl_android_offset.sh to support Android 16, including logic to remove obsolete offsets and substitute new ones when generating header files for Android versions greater than 15. [1] [2]

…d definitions

Signed-off-by: CFC4N <cfc4n.cs@gmail.com>
@cfc4n cfc4n requested a review from Copilot December 5, 2025 15:33
@cfc4n cfc4n linked an issue Dec 5, 2025 that may be closed by this pull request
@dosubot dosubot Bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Dec 5, 2025
@dosubot dosubot Bot added the enhancement New feature or request label Dec 5, 2025
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Dec 5, 2025

🔧 Debug Build Complete (PR 885, RunID 19967791054)

📦 Download Links:

⏰ Files will be retained for 7 days, please download and test promptly.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds support for Android 16's BoringSSL implementation, which introduces structural changes to SSL session handling. The changes accommodate the relocation of the version field from ssl_st to ssl_session_st and the removal of the secret_length field.

  • Added Android 16-specific offset definitions in a new header file
  • Updated probe logic with conditional compilation to handle structural differences between Android versions
  • Enhanced the offset generation script to automatically adapt for Android 16+ releases

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
variables.mk Adds build target for Android 16 BoringSSL support
kern/boringssl_a_16_kern.c New header defining offsets for Android 16's BoringSSL structures with SSL_SESSION_ST_SSL_VERSION replacing SSL_ST_VERSION
kern/boringssl_masterkey.h Updates probe logic to conditionally read version from new location and handle missing secret_length field with fallback to maximum key length
kern/openssl.h Adds conditional compilation guards for version reading to support Android 16's structural changes
utils/boringssl_android_offset.sh Updates script to automatically handle Android 16+ by removing obsolete offsets and substituting new fields during header generation

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread utils/boringssl_android_offset.sh Outdated
Comment thread kern/boringssl_masterkey.h Outdated
Comment thread kern/openssl.h
Comment thread utils/boringssl_android_offset.sh Outdated
Comment thread kern/boringssl_masterkey.h
Comment thread utils/boringssl_android_offset.sh
Comment thread utils/boringssl_android_offset.sh Outdated
Comment thread utils/boringssl_android_offset.sh Outdated
Signed-off-by: CFC4N <cfc4n.cs@gmail.com>
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Dec 5, 2025

🔧 Debug Build Complete (PR 885, RunID 19968063840)

📦 Download Links:

⏰ Files will be retained for 7 days, please download and test promptly.

Signed-off-by: CFC4N <cfc4n.cs@gmail.com>
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Dec 5, 2025

🔧 Debug Build Complete (PR 885, RunID 19968424840)

📦 Download Links:

⏰ Files will be retained for 7 days, please download and test promptly.

@cfc4n cfc4n merged commit 603f3e6 into master Dec 5, 2025
10 checks passed
@cfc4n cfc4n deleted the feature/android-16-boringssl branch December 5, 2025 16:18
@dosubot dosubot Bot mentioned this pull request Apr 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Android 16: ecapture only captures http responses

2 participants