Skip to content

Instantly share code, notes, and snippets.

@nickknissen
Created March 23, 2026 09:36
Show Gist options
  • Select an option

  • Save nickknissen/060004d533f7a4a28667497778959ad5 to your computer and use it in GitHub Desktop.

Select an option

Save nickknissen/060004d533f7a4a28667497778959ad5 to your computer and use it in GitHub Desktop.
Aula decompile skill
name decompile
description Fetch and decompile a new version of the Aula Android app (com.netcompany.aulanativeprivate)
argument-hint <version e.g. 2.15.2.1>
allowed-tools Bash, Read, Write, Edit, Glob, Grep, WebFetch, WebSearch

Decompile Aula Android App

Fetch and decompile the Aula Android APK for version $ARGUMENTS (package: com.netcompany.aulanativeprivate).

If no version argument is provided, ask the user for the version number.

Prerequisites

Check that these tools are installed. Install any that are missing:

  1. Java runtimesudo apt-get install -y -qq default-jre-headless
  2. llvm-objcopysudo apt-get install -y -qq llvm
  3. apkeep (EFF) — download binary from https://github.com/EFForg/apkeep/releases/latest/download/apkeep-x86_64-unknown-linux-gnu to /tmp/apkeep
  4. pymauistore — clone https://github.com/mwalkowski/pymauistore.git to /tmp/pymauistore
  5. Python depspip install --user lz4 pyelftools
  6. .NET SDK + ILSpy — install via https://dot.net/v1/dotnet-install.sh --channel 8.0, then dotnet tool install -g ilspycmd

Always set these env vars before running dotnet/ilspycmd:

export DOTNET_ROOT="$HOME/.dotnet"
export PATH="$HOME/.dotnet:$HOME/.dotnet/tools:$PATH"

Pipeline

Step 1: Download APK

cd /tmp && ./apkeep -a com.netcompany.aulanativeprivate .

This downloads an .xapk file to /tmp/com.netcompany.aulanativeprivate.xapk.

Step 2: Extract XAPK

mkdir -p /tmp/aula-xapk && cd /tmp/aula-xapk && unzip -o /tmp/com.netcompany.aulanativeprivate.xapk

Verify the version in manifest.json matches the requested version.

The base APK is com.netcompany.aulanativeprivate.apk. The native libraries are in config.arm64_v8a.apk.

Step 3: Extract .NET assemblies from blob

# Extract the assemblies blob from the native config APK
mkdir -p /tmp/aula-native
unzip -o /tmp/aula-xapk/config.arm64_v8a.apk lib/arm64-v8a/libassemblies.arm64-v8a.blob.so -d /tmp/aula-native

# Extract DLLs from the XABA blob using pymauistore
mkdir -p /tmp/aula-dlls
python3 /tmp/pymauistore/pymauistore.py /tmp/aula-native/lib/arm64-v8a/libassemblies.arm64-v8a.blob.so /tmp/aula-dlls

Step 4: Decompile DLLs to C#

Remove the old decompiled output first:

rm -rf decompiled/csharp/AulaNative decompiled/csharp/AulaNative.Droid decompiled/csharp/AulaNative.Droid.Private

Decompile the three Aula-specific DLLs:

export DOTNET_ROOT="$HOME/.dotnet"
export PATH="$HOME/.dotnet:$HOME/.dotnet/tools:$PATH"

ilspycmd -p -o decompiled/csharp/AulaNative /tmp/aula-dlls/AulaNative.dll
ilspycmd -p -o decompiled/csharp/AulaNative.Droid /tmp/aula-dlls/AulaNative.Droid.dll
ilspycmd -p -o decompiled/csharp/AulaNative.Droid.Private /tmp/aula-dlls/AulaNative.Droid.Private.dll

Optionally decompile IdentityModel for auth reference:

ilspycmd -p -o decompiled/csharp/IdentityModel /tmp/aula-dlls/IdentityModel.dll
ilspycmd -p -o decompiled/csharp/IdentityModel.OidcClient /tmp/aula-dlls/IdentityModel.OidcClient.dll

Step 5: Verify and report

  1. Count decompiled files: find decompiled/csharp/AulaNative -name "*.cs" | wc -l
  2. Check the API version in decompiled/csharp/AulaNative/AulaNative.Configuration/Conf.cs
  3. Report to the user:
    • Version decompiled
    • Number of files
    • API version found
    • Any notable changes (new service files, new model directories)

Step 6: Update CLAUDE.md

Update the version number and API version in CLAUDE.md if they changed.

Step 7: Commit

Stage and commit the changes:

git add decompiled/ CLAUDE.md
git commit -m "feat: update decompiled source to v$ARGUMENTS"

Cleanup

Remove temp files when done:

rm -rf /tmp/aula-xapk /tmp/aula-native /tmp/aula-dlls /tmp/com.netcompany.aulanativeprivate.xapk

Troubleshooting

  • XAPK vs APK: apkeep may download .xapk (split APK bundle) or plain .apk. Check with file command. If plain APK, skip the XAPK extraction step.
  • Different blob format: If the blob header is not XABA, the app may have changed its assembly packaging. Check for assemblies.blob / assemblies.manifest format (older Xamarin) and use pyxamstore instead.
  • ilspycmd fails with "missing runtime": Ensure DOTNET_ROOT is set correctly.
  • pymauistore import error: Install missing deps: `pip install --user lz4 pyelftools
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment