How canheo136/quicklook.plugin.apkviewer works
Project type and purpose
• The project includes:
• A “native‐style” QuickLook plugin entrypoint (Plugin.cs, ViewerPane.xaml(.cs))
• A .NET wrapper library (AAPTForNet/) around the Android aapt.exe tool for parsing APKs
• A sample/debug host (StartupDebuging/)
• Packaging scripts (Scripts/)
File structure
• Top‐level solution & plugin project (.sln, QuickLook.Plugin.ApkViewer.csproj, Plugin.cs, ViewerPane.*)
• Submodule/library AAPTForNet/
• AAPTForNet.csproj – .NET Standard or .NET Framework project
• Core classes: ApkParser, ApkExtractor, ResourceDetector
• Filter pipeline: /Filters/*.cs
• Data models: /Models/*.cs
• Native tool: /tool/aapt.exe
• Packaging & utilities:
• PowerShell scripts: pack-zip.ps1, update-version.ps1
• Sample host debugger: StartupDebuging/
README
• Confirms it’s an Android‐APK preview plugin for QuickLook
• Installation and build steps reference building the project, packaging via script, and installing into QuickLook
a. Main components
• QuickLook Host (external)
• Plugin Loader / Extension Point
• ApkViewer Plugin Core
– Entry Point (Plugin.cs)
– UI Component (WPF UserControl: ViewerPane.xaml(.cs))
• AAPTForNet Library
– ApkExtractor & ApkParser
– Filter Pipeline (ABIFilter, PermissionFilter, etc.)
– ResourceDetector
• External Native Tool: aapt.exe
• Packaging Scripts (build & pack steps)
b. Relationships & interactions
1. User selects .apk in QuickLook → Host invokes Plugin Loader
2. Plugin Entry Point in Plugin.cs receives a file handle
3. Plugin calls AAPTForNet → invokes aapt.exe via ApkExtractor
4. Raw text/xml output flows into ApkParser → populates DumpModel & ApkInfo
5. Data passes through each filter (BaseFilter → ABIFilter, PermissionFilter, etc.)
7. Final ApkInfo model handed to the WPF UI (ViewerPane)
8. UI renders preview in QuickLook window
9. Packaging scripts bundle everything into a .qlplugin
c. Architectural patterns & design principles
• Plugin architecture (dynamic extension)
• Pipeline pattern for parsing & filtering
• MVC/MVVM–style separation: Models in AAPTForNet, View in WPF, Controller logic in Plugin.cs
• Submodule/library separation (AAPTForNet as reusable component)
d. Key technologies & frameworks
• .NET Framework / .NET Standard (C#)
• WPF / XAML for UI
• Native aapt.exe tool (Android SDK)
• PowerShell for build & packaging
• Git submodule for AAPTForNet
Detail
• Major class group (ApkExtractor, Filters, Models) as its own subcomponent.
• Exact sequence of operations from file selection to UI rendering.
• Packaging step into the final .qlplugin artifact.