ApkHealthChecker 1.0.4
dotnet add package ApkHealthChecker --version 1.0.4
NuGet\Install-Package ApkHealthChecker -Version 1.0.4
<PackageReference Include="ApkHealthChecker" Version="1.0.4" />
<PackageVersion Include="ApkHealthChecker" Version="1.0.4" />
<PackageReference Include="ApkHealthChecker" />
paket add ApkHealthChecker --version 1.0.4
#r "nuget: ApkHealthChecker, 1.0.4"
#:package ApkHealthChecker@1.0.4
#addin nuget:?package=ApkHealthChecker&version=1.0.4
#tool nuget:?package=ApkHealthChecker&version=1.0.4
ApkHealthChecker
Issue Fixed - New Version 1.0.4 ApkHealthChecker is a lightweight .NET library that executes an embedded PowerShell script to analyze and measure the runtime health and performance characteristics of Android applications (APKs). Compatible with Console Application (.NET Framework).
The library is packaged as a NuGet package and supports both modern .NET and legacy .NET Framework environments.
📌 Key Features
- ✅ Executes an embedded PowerShell (.ps1) script (no external files required)
- ✅ Simple and reusable C# API
- ✅ Supports APK performance checks:
- Cold start analysis
- Warm start analysis
- Frame statistics collection
- Optional reset of performance stats
- ✅ HTML & JSON Report Generation (Automatic at \bin\Debug\ApkHealthReports\apk_health_report.html)
- ✅ Multi‑targeted support:
- .NET 8 (PowerShell 7)
- .NET Framework 4.7.2 (Windows PowerShell 5.1)
🧱 Architecture Overview
ApkHealthChecker embeds a PowerShell script (Scripts/ApkHealth.ps1) directly into the compiled assembly as an embedded resource.
At runtime, the library:
- Loads the embedded PowerShell script
- Executes it using
System.Management.Automation - Passes parameters from C# to PowerShell
- Collects and returns the script output as structured results
This approach:
- Avoids PowerShell execution‑policy issues
- Eliminates dependency on external script files
- Ensures portability and reliability
📦 Installation
Install from NuGet:
dotnet add package ApkHealthChecker
Or via Visual Studio:
- Right‑click project → Manage NuGet Packages
- Search for ApkHealthChecker
- Install
🚀 Usage Example
using ApkHealthChecker;
using System;
namespace ConsoleApp
{
internal class Program
{
static void Main(string[] args)
{
var checker = new ApkHealth();
var results = checker.CheckApk(
packageName: "com.example.app",
resetStats: true,
useFrameStats: true,
coldStartCount: 2,
warmStartCount: 3
);
foreach (var line in results)
{
Console.WriteLine(line);
}
}
}
}```
---
## 🧪 API Reference
### `CheckApk(...)`
```csharp
string[] CheckApk(
string packageName,
bool resetStats,
bool useFrameStats,
int coldStartCount,
int warmStartCount
)
Parameters
| Parameter | Description |
|---|---|
packageName |
Android package name (e.g. com.example.app) |
resetStats |
Whether to reset performance statistics before testing |
useFrameStats |
Whether to collect frame rendering statistics |
coldStartCount |
Number of cold start runs |
warmStartCount |
Number of warm start runs |
Returns
string[]— Output lines produced by the PowerShell script
⚙️ Requirements
System Requirements
- ✅ Windows OS
- ✅ ADB (Android Debug Bridge) installed and available in
PATH - ✅ Android device or emulator connected
PowerShell Requirements
| Target Framework | PowerShell |
|---|---|
| .NET 8 | PowerShell 7+ |
| .NET Framework 4.7.2 | Windows PowerShell 5.1 |
🧩 Target Frameworks
This library is multi‑targeted:
net8.0
net472
NuGet automatically selects the appropriate assembly for your project.
🛠 Development Notes
- The PowerShell script is embedded using
EmbeddedResource - No runtime identifier (RID) is required for class library packaging
- The project is compatible with modern SDK‑style builds
- Designed to work cleanly with
dotnet buildanddotnet pack
🧰 Troubleshooting
- NU5026: File to be packed not found – Clean
bin/andobj/folders and run a freshdotnet buildbeforedotnet pack. - C# language version issues on net472 – Set
<LangVersion>8.0</LangVersion>fornet472and disable implicit usings there. - GlobalUsings.g.cs errors on net472 – Disable implicit usings for
net472to avoid C# 10 features in that target. - RID warnings on .NET 8 – Prefer portable RIDs (e.g.,
win-x64) and update dependencies. Use<UseRidGraph>true</UseRidGraph>only as a temporary workaround.
📄 License
MIT License
👤 Author
Mohai Minul Islam
Software Quality Assurance Engineer
Dhaka, Bangladesh
⭐ Why ApkHealthChecker?
ApkHealthChecker bridges the gap between PowerShell‑based Android tooling and modern .NET automation, enabling QA engineers and developers to run repeatable, script‑driven APK performance checks directly from C#.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Framework | net472 is compatible. net48 was computed. net481 was computed. |
-
.NETFramework 4.7.2
- Microsoft.PowerShell.5.1.ReferenceAssemblies (>= 1.0.0)
- System.Security.Cryptography.Pkcs (>= 10.0.2)
-
net8.0
- System.Management.Automation (>= 7.3.0)
- System.Security.Cryptography.Pkcs (>= 10.0.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.4 | 147 | 2/11/2026 |
ApkHealthChecker v1.0.4 is the first stable release of a .NET library for analyzing Android APK health and performance using an embedded PowerShell script.
This release provides a clean C# API for running cold start, warm start, and frame statistics analysis without requiring external script files. The library supports both .NET 8 (PowerShell 7) and .NET Framework 4.7.2 (Windows PowerShell 5.1), making it suitable for modern and legacy automation environments.
Designed android app performance testing.