OpenParable
Skip to content
← Back to skills

Update Tpn

Documents
update-tpn

Update Tpn is an Agent Skill for documents published in the dotnet/android repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

Audit and update the THIRD-PARTY-NOTICES.TXT file. Use when the user asks to "update TPNs", "audit third-party notices", "check third-party licenses", or after adding/removing a dependency. Scans submodules, vendored code, NuGet packages, and native libraries to ensure the TPN file is complete and accurate.

View on GitHub ↗
QUICK START

How to use this skill

Bring this guide into your coding agent with a prompt tailored to the tool you use.

  1. Open your project in Codex.
  2. Copy and paste the prompt below.
  3. Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/dotnet/android/blob/HEAD/.github/skills/update-tpn/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/update-tpn, but wait for my approval before writing files or running scripts.

Copying this prompt does not install or run the skill. Review third-party files before use.

Update Third-Party Notices

Audit and regenerate the THIRD-PARTY-NOTICES.TXT file at the repo root.

This file is checked in and shipped as-is in the product NuGet packages. There is no code generation step — this skill replaces the old xaprepare TPN infrastructure.

File Format

The file uses the MicrosoftOSS header format:

xamarin-android

THIRD - PARTY SOFTWARE NOTICES AND INFORMATION
Do Not Translate or Localize

This project incorporates components from the projects listed below.
The original copyright notices and the licenses under which Microsoft
received such components are set forth below.
Microsoft reserves all rights not expressly granted herein, whether by
implication, estoppel or otherwise.

1.  name (url)
2.  name (url)
...

%% name NOTICES AND INFORMATION BEGIN HERE
==========================================
<license text>

==========================================
END OF name NOTICES AND INFORMATION

Entries are sorted case-insensitively by name. Each entry has a numbered TOC line and a license section.

Audit Workflow

Step 1 — Inventory all dependencies

Scan these sources to build a complete list of third-party dependencies:

Git Submodules

Read .gitmodules for all submodules. Current submodules and their license files:

SubmoduleURLLicense File
Java.Interophttps://github.com/dotnet/java-interopexternal/Java.Interop/LICENSE
lz4https://github.com/dotnet/lz4 (fork of https://github.com/lz4/lz4)external/lz4/lib/LICENSE
xxHashhttps://github.com/Cyan4973/xxHashexternal/xxHash/LICENSE
constexpr-xxh3https://github.com/chys87/constexpr-xxh3external/constexpr-xxh3/LICENSE
robin-maphttps://github.com/xamarin/robin-map (fork of https://github.com/Tessil/robin-map)external/robin-map/LICENSE
libunwindhttps://github.com/libunwind/libunwindexternal/libunwind/LICENSE
xamarin-android-toolshttps://github.com/dotnet/android-tools(not a third-party dep)
android-api-docshttps://github.com/dotnet/android-api-docs(not a third-party dep)

Vendored Source (src-ThirdParty/)

List contents of src-ThirdParty/ directory. Current vendored code and license sources:

DirectoryNameLicense Source
android-platform-tools-base/android/platform/tools/basehttps://android.googlesource.com/platform/tools/base/+/refs/heads/main/sdk-common/NOTICE (Apache 2.0)
bionic/google/bionichttps://android.googlesource.com/platform/bionic/ (Apache 2.0)
crc32.net/force-net/crc32.nethttps://github.com/force-net/Crc32.NET (MIT)
StrongNameSigner/brutaldev/StrongNameSignerhttps://github.com/brutaldev/StrongNameSigner/ (Apache 2.0)

Note: Mono.Security.Cryptography/, System.Diagnostics.CodeAnalysis/, System.Runtime.CompilerServices/, and dotnet/ are Microsoft-owned and do not need TPN entries.

NuGet Packages

Search .csproj files for <PackageReference> elements. Current third-party NuGet packages needing TPNs:

PackageName in TPNLicense URL
ELFSharpKonradKuczynski/ELFSharphttps://elfsharp.it/ (MIT + LLVM)
K4os.Compression.LZ4MiloszKrajewski/K4os.Compression.LZ4https://github.com/MiloszKrajewski/K4os.Compression.LZ4/ (MIT)
Xamarin.LibZipSharpxamarin/LibZipSharphttps://github.com/xamarin/LibZipSharp/ (MIT)
IronyIronyProject/Ironyhttps://github.com/IronyProject/Irony (MIT)
Newtonsoft.JsonJamesNK/Newtonsoft.Jsonhttps://github.com/JamesNK/Newtonsoft.Json (MIT)
NuGet.ProjectModelNuGet/NuGet.Clienthttps://github.com/NuGet/NuGet.Client (Apache 2.0)
Mono.Cecilmono/cecilhttps://github.com/mono/cecil/ (MIT)
Microsoft.Xml.SgmlReaderlovettchris/SgmlReaderhttps://github.com/lovettchris/SgmlReader/ (Apache 2.0)

Note: Microsoft-owned NuGet packages (Microsoft., System.) do not need TPN entries.

Vendored Linker Code

The src/Xamarin.Android.Build.Tasks/Linker/External/ directory contains vendored code from the Mono linker:

SourceName in TPNLicense URL
Linker/External/mono/linkerhttps://github.com/mono/linker/ (MIT)

Native Libraries (from CMakeLists.txt)

Check src/native/ CMakeLists.txt files for references to external native code. The submodules above (lz4, xxHash, libunwind, robin-map) are compiled into native libraries.

Android SDK Tools

These are downloaded and shipped with the SDK:

ToolName in TPNLicense URL
aapt2google/aapt2https://mvnrepository.com/artifact/com.android.tools.build/aapt2 (Apache 2.0)
bundletoolgoogle/bundletoolhttps://github.com/google/bundletool (Apache 2.0)
r8google/r8https://r8.googlesource.com/r8/ (BSD-3-Clause)
binutilsgnu/binutilshttps://sourceware.org/git/?p=binutils-gdb.git;a=tree;hb=HEAD (GPLv3)

libzip (via LibZipSharp NuGet)

LibZipSharp bundles libzip internally:

SourceName in TPNLicense Location
libzip (in LibZipSharp NuGet)nih-at/libzipLibZipSharp NuGet Licences/libzip/LICENSE or https://github.com/nih-at/libzip/ (BSD-3-Clause)

Step 2 — Cross-reference

Compare the inventory against the current entries in THIRD-PARTY-NOTICES.TXT:

  • Missing entries: Dependencies found in Step 1 but not in the TPN file
  • Stale entries: TPN entries for dependencies no longer used
  • Incorrect info: Wrong URLs, outdated license text

Step 3 — Update the file

For each change:

  1. Add/remove the TOC line (maintain sorted order and renumber)
  2. Add/remove the license section (maintain sorted order)
  3. For new entries, fetch the license text from the source URL or LICENSE file

Step 4 — Verify

Run grep -cP "^\d+\." THIRD-PARTY-NOTICES.TXT (or Select-String "^\d+\." THIRD-PARTY-NOTICES.TXT on Windows) to confirm the entry count and ordering.