Sub GetApkMetaMap(apkPath As String) As Map
Dim out As Map
out.Initialize
Dim fileObj As JavaObject
fileObj.InitializeNewInstance("java.io.File", Array(apkPath))
Dim apkFile As JavaObject
apkFile.InitializeNewInstance("net.dongliu.apk.parser.ApkFile", Array(fileObj))
Dim apkMeta As JavaObject = apkFile.RunMethod("getApkMeta", Null)
Dim label As String = apkMeta.RunMethod("getLabel", Null)
Dim packageName As String = apkMeta.RunMethod("getPackageName", Null)
Dim versionName As String = apkMeta.RunMethod("getVersionName", Null)
Dim versionCode As Long = apkMeta.RunMethod("getVersionCode", Null)
Dim minSdk As String = apkMeta.RunMethod("getMinSdkVersion", Null)
Dim targetSdk As String = apkMeta.RunMethod("getTargetSdkVersion", Null)
Dim compileSdkVersion As String = apkMeta.RunMethod("getCompileSdkVersion", Null)
Dim compileSdkVersionCodename As String = apkMeta.RunMethod("getCompileSdkVersionCodename", Null)
Dim platformBuildVersionCode As String = apkMeta.RunMethod("getPlatformBuildVersionCode", Null)
Dim platformBuildVersionName As String = apkMeta.RunMethod("getPlatformBuildVersionName", Null)
Dim permissionsJO As JavaObject = apkMeta.RunMethod("getUsesPermissions", Null)
out.Put("Label", label)
out.Put("PackageName", packageName)
out.Put("VersionName", versionName)
out.Put("VersionCode", versionCode)
out.Put("MinSdk", minSdk)
out.Put("TargetSdk", targetSdk)
out.Put("CompileSdkVersion", compileSdkVersion)
out.Put("CompileSdkVersionCodename", compileSdkVersionCodename)
out.Put("PlatformBuildVersionCode", platformBuildVersionCode)
out.Put("PlatformBuildVersionName", platformBuildVersionName)
out.Put("Permissions", permissionsJO)
out.Put("CreatedAt", File.LastModified(apkPath,""))
apkFile.RunMethod("close", Null)
Return out
End Sub