Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
ffcb7d6
Scaffolding for the new app
grendello Jul 3, 2025
17b462a
Slight IAspect changes + some flesh for the skeleton
grendello Jul 4, 2025
5fe97ae
A few steps more
grendello Jul 7, 2025
262a56f
Assembly stores progress
grendello Jul 7, 2025
7847e5a
Oops, forgot to add this one, doh
grendello Jul 8, 2025
0435410
Progressing with assembly stores + shared libraries
grendello Jul 8, 2025
c7f1057
More assembly store code
grendello Jul 9, 2025
ba02502
AssemblyStore + Assembly reading
grendello Jul 10, 2025
161fdf6
Oops, forgot to commit this one
grendello Jul 11, 2025
c92a75b
More assembly store + assemblies
grendello Jul 11, 2025
8546f6c
Android binary XML parser (for in-package AndroidManifest.xml)
grendello Jul 14, 2025
97e2446
Android manifest almost finished (protobuf missing) + native bits
grendello Jul 15, 2025
01bb148
NativeAOT detection support
grendello Sep 22, 2025
d0e8734
Let's do some reporting
grendello Sep 23, 2025
ae905d7
More info about shared libraries
grendello Sep 24, 2025
73eb4a1
More NAOT goodies
grendello Sep 24, 2025
0c86a6f
Moving on with reporters
grendello Sep 25, 2025
344941a
Application package reporter continued
grendello Sep 25, 2025
219e8c9
libxamarin-app.so reporter (beginnings)
grendello Sep 26, 2025
15c62f8
Some more basic app info from the manifest
grendello Sep 26, 2025
100f5c2
Revamp shared libraries aspect states, lighter now
grendello Sep 26, 2025
2aa7a9d
Various odds and ends
grendello Sep 26, 2025
d8f100b
TODOs
grendello Sep 26, 2025
4577813
Add protobuf generated code to read AAB manifest
grendello Oct 7, 2025
bd93dd6
Protobuf appears to work, next step: conversion to System.Xml
grendello Oct 7, 2025
9c944a0
Load manifest from protobuf
grendello Oct 8, 2025
a075fbc
Markdown rendering.
grendello Oct 9, 2025
1db025a
Beginnings of a unified output presenter
grendello Oct 10, 2025
b87cc67
Rendering is a mess, need a different way to do it. TBC tomorrow
grendello Oct 13, 2025
957e757
New markdown construction class. Rendering TBD.
grendello Oct 15, 2025
e5f9a0f
Markdown rendering works now
grendello Oct 15, 2025
0fe21d2
Tweak
grendello Oct 16, 2025
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
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
Loading