Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
92 commits
Select commit Hold shift + click to select a range
066f511
Scaffolding for the new app
grendello Jul 3, 2025
68a23a9
Slight IAspect changes + some flesh for the skeleton
grendello Jul 4, 2025
67d58b5
A few steps more
grendello Jul 7, 2025
b768a4d
Assembly stores progress
grendello Jul 7, 2025
d2d0c0f
Oops, forgot to add this one, doh
grendello Jul 8, 2025
bcccc59
Progressing with assembly stores + shared libraries
grendello Jul 8, 2025
1f8ec57
More assembly store code
grendello Jul 9, 2025
b6a0246
AssemblyStore + Assembly reading
grendello Jul 10, 2025
bed5ddd
Oops, forgot to commit this one
grendello Jul 11, 2025
e84a1f3
More assembly store + assemblies
grendello Jul 11, 2025
db02140
Android binary XML parser (for in-package AndroidManifest.xml)
grendello Jul 14, 2025
e18769c
Android manifest almost finished (protobuf missing) + native bits
grendello Jul 15, 2025
3512941
NativeAOT detection support
grendello Sep 22, 2025
db77fa1
Let's do some reporting
grendello Sep 23, 2025
57fa96b
More info about shared libraries
grendello Sep 24, 2025
5cb188b
More NAOT goodies
grendello Sep 24, 2025
a586512
Moving on with reporters
grendello Sep 25, 2025
783a9a3
Application package reporter continued
grendello Sep 25, 2025
6ecd049
libxamarin-app.so reporter (beginnings)
grendello Sep 26, 2025
4346eb2
Some more basic app info from the manifest
grendello Sep 26, 2025
972081d
Revamp shared libraries aspect states, lighter now
grendello Sep 26, 2025
bb758af
Various odds and ends
grendello Sep 26, 2025
f3f8bd0
TODOs
grendello Sep 26, 2025
c98d0ac
Add protobuf generated code to read AAB manifest
grendello Oct 7, 2025
be41b30
Protobuf appears to work, next step: conversion to System.Xml
grendello Oct 7, 2025
fe76ee9
Load manifest from protobuf
grendello Oct 8, 2025
77ed26b
Markdown rendering.
grendello Oct 9, 2025
a394caa
Beginnings of a unified output presenter
grendello Oct 10, 2025
8b9dfb6
Rendering is a mess, need a different way to do it. TBC tomorrow
grendello Oct 13, 2025
2d4b3b0
New markdown construction class. Rendering TBD.
grendello Oct 15, 2025
c1be514
Markdown rendering works now
grendello Oct 15, 2025
638309f
Tweak
grendello Oct 16, 2025
961f7c4
Bump LZ4 to v1.3.8
grendello Feb 6, 2026
3d0df8e
Use the latest Google.Protobuf package
grendello Feb 6, 2026
7e5edac
Google.Protobuf 3.33.5 doesn't restore... use 3.33.4 instead
grendello Feb 6, 2026
5b8a2f8
Improving nested reporting
grendello Feb 6, 2026
a5c9db3
Fix permissions list rendering
grendello Feb 19, 2026
b9fe46f
Better support for wrapped assembly stores
grendello Feb 19, 2026
5c153b7
Assembly store reporting
grendello Feb 20, 2026
601f062
Oops
grendello Feb 20, 2026
8c46c6f
A handful of changes, tbc tomorrow
grendello Feb 23, 2026
c1f8a54
Don't rewind data stream here, it's positioned where it should be
grendello Feb 24, 2026
29caf91
Fixes to application package reporter + some small fixes
grendello Feb 24, 2026
b7aca93
Fixlets for AndroidManifest
grendello Feb 24, 2026
c1c6831
Manifest reporter
grendello Feb 24, 2026
766c52e
Much better assembly store reporting in package reporter
grendello Feb 25, 2026
71fe094
Improvements to shared library reporting
grendello Feb 26, 2026
22d6577
Parser Android ident data
grendello Feb 26, 2026
b684f38
Formatting improvements
grendello Mar 2, 2026
f9eb9b0
Already implemented, remove forgotten TODO comment
grendello Mar 2, 2026
7141ce2
Command line args, the basics
grendello Mar 2, 2026
bc4999c
`extract manifest` command implemented
grendello Mar 2, 2026
24fad20
Implementing the extractor concept and infrastructure
grendello Mar 3, 2026
ff0f10b
[WIP] Support for extracting multiple files from a container
grendello Mar 4, 2026
222cdcc
[WIP] More of the assembly file extractor
grendello Mar 4, 2026
7a64e65
[WIP] More of the assembly extractor
grendello Mar 5, 2026
68f3c97
[WIP] Assembly extraction from assembly stores
grendello Mar 5, 2026
cb3221f
[WIP] summary command
grendello Mar 5, 2026
b69b96a
Assembly decompression
grendello Mar 6, 2026
a179892
[WIP] Support for DSO-wrapped individual assemblies
grendello Mar 6, 2026
99fd780
Fixlets
grendello Mar 6, 2026
1434790
[WIP] Support for detecting and reporting on Portable PDB files
grendello Mar 9, 2026
d4928aa
[WIP] PDBs
grendello Mar 9, 2026
b036bf3
TBC later
grendello Mar 10, 2026
244769c
PDBs extracted from individual .so files now
grendello Mar 10, 2026
012cd76
Properly implement substream
grendello Mar 11, 2026
f4190da
Assembly and PDB extraction from various sources fully works now
grendello Mar 11, 2026
20fbd35
Improved logging, added support for writing to a log file
grendello Mar 12, 2026
0e83726
Report goes to file by default, improved (?) log structure
grendello Mar 13, 2026
b459c00
Individual assembly reports
grendello Mar 16, 2026
9bebdf9
Improved options processing + logging
grendello Mar 16, 2026
7347d60
No warnings!
grendello Mar 17, 2026
916ac60
Formatting + more info in the full report
grendello Mar 17, 2026
aa4044a
Clean up, remove old output code
grendello Mar 18, 2026
193aa4c
Remove dead bits
grendello Mar 18, 2026
c899213
Better exception logging
grendello Mar 18, 2026
b2df9ab
Implement the remaining bits of the manifest reader
grendello Mar 18, 2026
0a711f1
Move satellite detection to ApplicationAssembly
grendello Mar 18, 2026
28742f3
Fixlets
grendello Mar 18, 2026
c45f427
Some docs
grendello Mar 18, 2026
373e27d
Better satellite detection + WIP R2R detection
grendello Mar 19, 2026
e7e26c8
[WIP] R2R detection
grendello Mar 19, 2026
1ccb56e
Presentation improvements
grendello Mar 20, 2026
cb3e368
Satellite and RTR detection for compressed assemblies
grendello Mar 20, 2026
8b77547
Implement temporary file management
grendello Mar 20, 2026
617ffd7
Cleanup
grendello Mar 20, 2026
196fc71
No warnings
grendello Mar 20, 2026
1f3f0d7
Don't really need those
grendello Mar 20, 2026
f277160
Move
grendello Mar 20, 2026
1b3c9aa
Move
grendello Mar 20, 2026
3ad8d7f
Address feedback
grendello Mar 23, 2026
2efc6e1
Been a while
grendello Mar 26, 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 .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@
# https://help.github.com/articles/about-codeowners

# These owners will be the default owners for everything in the repo.
* @jonathanpeppers @grendello @simonrozsival
* @jonathanpeppers @simonrozsival
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)
64 changes: 64 additions & 0 deletions tools/apput/src/Android/ARSCHeader.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
using System;
using System.IO;

namespace ApplicationUtility;

/// <summary>
/// Reads and validates an Android Resource Container (ARSC) chunk header,
/// which consists of a chunk type, header size, and total chunk size.
/// </summary>
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