KEMBAR78
Update AssemblyStore documentation to match current implementation by Copilot · Pull Request #10266 · dotnet/android · GitHub
Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jul 2, 2025

The AssemblyStore format documentation in Documentation/project-docs/AssemblyStores.md was outdated and contained several inaccuracies compared to the actual C++ implementation. This PR updates the documentation to reflect the current format as defined in src/native/clr/include/xamarin-app.hh.

Key Changes

Store Location and Architecture

  • Updated store location: Assembly Store files are now correctly documented as being placed in architecture-specific lib/ directories within APK/AAB archives, not the assemblies/ directory
  • Clarified architecture handling: There exists only one Assembly Store per architecture (not separate architecture-agnostic and architecture-specific stores)
  • Added ELF embedding detail: Assembly Store files are found inside ELF shared libraries

Struct Definitions

  • Corrected AssemblyStoreHeader fields: Updated from outdated local_entry_count, global_entry_count, store_id to actual entry_count, index_entry_count, index_size
  • Fixed struct name: Changed AssemblyStoreAssemblyDescriptor to correct AssemblyStoreEntryDescriptor
  • Added missing field: Included mapping_index field in the descriptor structure

File Format Description

  • Updated format layout: Now matches the C++ comment format with correct sections: [HEADER], [INDEX], [ASSEMBLY_DESCRIPTORS], [ASSEMBLY_NAMES], [ASSEMBLY DATA]
  • Corrected index structure: Updated to use AssemblyStoreIndexEntry with platform-specific hash types

New Native Struct Documentation Section

  • Added dedicated section: Complete documentation of the three key C++ structures
  • Included proper syntax: Full struct definitions with [[gnu::packed]] attributes
  • Platform-specific details: Explained xamarin::android::hash_t type variations for 32-bit vs 64-bit platforms

File References

  • Updated header path: Corrected from obsolete src/monodroid/jni/xamarin-app.hh to current src/native/clr/include/xamarin-app.hh

The documentation now accurately reflects the Assembly Store format implementation and provides developers with correct information for understanding the binary file structure.

Fixes #10265.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Co-authored-by: grendello <184788+grendello@users.noreply.github.com>
Copilot AI changed the title [WIP] AssemblyStore documentation needs to be updated Update AssemblyStore documentation to match current implementation Jul 2, 2025
Copilot AI requested a review from grendello July 2, 2025 10:06
Copilot finished work on behalf of grendello July 2, 2025 10:06
Co-authored-by: grendello <184788+grendello@users.noreply.github.com>
Copilot AI requested a review from grendello July 2, 2025 13:16
Copilot finished work on behalf of grendello July 2, 2025 13:16
@grendello grendello marked this pull request as ready for review July 2, 2025 14:47
@grendello grendello merged commit 8c0ca82 into main Jul 2, 2025
1 of 21 checks passed
@grendello grendello deleted the copilot/fix-10265 branch July 2, 2025 14:48
@github-actions github-actions bot locked and limited conversation to collaborators Aug 2, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AssemblyStore documentation needs to be updated

2 participants