Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
5e4ed58
Scaffolding for the new app
grendello Jul 3, 2025
442e5e8
Slight IAspect changes + some flesh for the skeleton
grendello Jul 4, 2025
378ffa6
A few steps more
grendello Jul 7, 2025
21e30fa
Assembly stores progress
grendello Jul 7, 2025
2f94334
Oops, forgot to add this one, doh
grendello Jul 8, 2025
0c088f1
Progressing with assembly stores + shared libraries
grendello Jul 8, 2025
32a91c9
More assembly store code
grendello Jul 9, 2025
4f19923
AssemblyStore + Assembly reading
grendello Jul 10, 2025
4bb9f9d
Oops, forgot to commit this one
grendello Jul 11, 2025
4396b05
More assembly store + assemblies
grendello Jul 11, 2025
ac63d00
Android binary XML parser (for in-package AndroidManifest.xml)
grendello Jul 14, 2025
5949478
Android manifest almost finished (protobuf missing) + native bits
grendello Jul 15, 2025
189df07
NativeAOT detection support
grendello Sep 22, 2025
62d82af
Let's do some reporting
grendello Sep 23, 2025
eef1034
More info about shared libraries
grendello Sep 24, 2025
924795f
More NAOT goodies
grendello Sep 24, 2025
14b98a0
Moving on with reporters
grendello Sep 25, 2025
86f3ca2
Application package reporter continued
grendello Sep 25, 2025
19a7b91
libxamarin-app.so reporter (beginnings)
grendello Sep 26, 2025
c8ea93a
Some more basic app info from the manifest
grendello Sep 26, 2025
2eaefae
Revamp shared libraries aspect states, lighter now
grendello Sep 26, 2025
c728352
Various odds and ends
grendello Sep 26, 2025
95efcf3
TODOs
grendello Sep 26, 2025
1ef0830
Add protobuf generated code to read AAB manifest
grendello Oct 7, 2025
b9802ec
Protobuf appears to work, next step: conversion to System.Xml
grendello Oct 7, 2025
43d3857
Load manifest from protobuf
grendello Oct 8, 2025
3ecd9d7
Markdown rendering.
grendello Oct 9, 2025
b48a61c
Beginnings of a unified output presenter
grendello Oct 10, 2025
9f84ef7
Rendering is a mess, need a different way to do it. TBC tomorrow
grendello Oct 13, 2025
7b29419
New markdown construction class. Rendering TBD.
grendello Oct 15, 2025
3ae0dff
Markdown rendering works now
grendello Oct 15, 2025
bc65dbc
Tweak
grendello Oct 16, 2025
3c3d3c8
Bump LZ4 to v1.3.8
grendello Feb 6, 2026
3d6951e
Use the latest Google.Protobuf package
grendello Feb 6, 2026
002d2b2
Google.Protobuf 3.33.5 doesn't restore... use 3.33.4 instead
grendello Feb 6, 2026
6f506da
Improving nested reporting
grendello Feb 6, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
<MonoCecilVersion>0.11.5</MonoCecilVersion>
<NewtonsoftJsonPackageVersion>13.0.3</NewtonsoftJsonPackageVersion>
<NuGetApiPackageVersion>5.4.0</NuGetApiPackageVersion>
<LZ4PackageVersion>1.3.6</LZ4PackageVersion>
<LZ4PackageVersion>1.3.8</LZ4PackageVersion>
<MonoOptionsVersion>6.12.0.148</MonoOptionsVersion>
<SystemCollectionsImmutableVersion>8.0.0</SystemCollectionsImmutableVersion>
<SystemRuntimeCompilerServicesUnsafeVersion>6.0.0</SystemRuntimeCompilerServicesUnsafeVersion>
Expand Down
1 change: 1 addition & 0 deletions tools/apput/projects/.placeholder
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This directory will contain .csproj files to be used by 3rd parties (e.g. XABT tests)
60 changes: 60 additions & 0 deletions tools/apput/src/Android/ARSCHeader.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
using System;
using System.IO;

namespace ApplicationUtility;

class ARSCHeader
{
// This is the minimal size such a header must have. There might be other header data too!
const long MinimumSize = 2 + 2 + 4;

readonly long start;
readonly uint size;
readonly ushort type;
readonly ushort headerSize;
readonly bool unknownType;

public AndroidManifestChunkType Type => unknownType ? AndroidManifestChunkType.Null : (AndroidManifestChunkType)type;
public ushort TypeRaw => type;
public ushort HeaderSize => headerSize;
public uint Size => size;
public long End => start + (long)size;

public ARSCHeader (Stream data, AndroidManifestChunkType? expectedType = null)
{
start = data.Position;
if (data.Length < start + MinimumSize) {
throw new InvalidDataException ($"Input data not large enough. Offset: {start}");
}

// Data in AXML is little-endian, which is fortuitous as that's the only format BinaryReader understands.
using BinaryReader reader = Utilities.GetReaderAndRewindStream (data, rewindStream: false);

// ushort: type
// ushort: header_size
// uint: size
type = reader.ReadUInt16 ();
headerSize = reader.ReadUInt16 ();

// Total size of the chunk, including the header
size = reader.ReadUInt32 ();

if (expectedType != null && type != (ushort)expectedType) {
throw new InvalidOperationException ($"Header type is not equal to the expected type ({expectedType}): got 0x{type:x}, expected 0x{(ushort)expectedType:x}");
}

unknownType = !Enum.IsDefined (typeof(AndroidManifestChunkType), type);

if (headerSize < MinimumSize) {
throw new InvalidDataException ($"Declared header size is smaller than required size of {MinimumSize}. Offset: {start}");
}

if (size < MinimumSize) {
throw new InvalidDataException ($"Declared chunk size is smaller than required size of {MinimumSize}. Offset: {start}");
}

if (size < headerSize) {
throw new InvalidDataException ($"Declared chunk size ({size}) is smaller than header size ({headerSize})! Offset: {start}");
}
}
}
Loading