feat:uniapp模块
This commit is contained in:
33
uniapp/scripts/verify-apk.ps1
Normal file
33
uniapp/scripts/verify-apk.ps1
Normal file
@@ -0,0 +1,33 @@
|
||||
# 用法:.\scripts\verify-apk.ps1 "D:\path\to\app.apk"
|
||||
param(
|
||||
[Parameter(Mandatory = $true)]
|
||||
[string]$ApkPath
|
||||
)
|
||||
|
||||
if (-not (Test-Path $ApkPath)) {
|
||||
Write-Error "APK 不存在: $ApkPath"
|
||||
exit 1
|
||||
}
|
||||
|
||||
$sdk = $env:ANDROID_HOME
|
||||
if (-not $sdk) { $sdk = "$env:LOCALAPPDATA\Android\Sdk" }
|
||||
|
||||
$aapt = Get-ChildItem -Path "$sdk\build-tools" -Recurse -Filter "aapt.exe" -ErrorAction SilentlyContinue |
|
||||
Sort-Object FullName -Descending |
|
||||
Select-Object -First 1
|
||||
|
||||
Write-Host "=== APK 文件 ==="
|
||||
Write-Host $ApkPath
|
||||
Write-Host ""
|
||||
|
||||
if ($aapt) {
|
||||
Write-Host "=== 包名(aapt dump badging)==="
|
||||
& $aapt.FullName dump badging $ApkPath | Select-String "package:|launchable-activity"
|
||||
} else {
|
||||
Write-Host "未找到 aapt.exe(Android SDK build-tools)。"
|
||||
Write-Host "请在 HBuilderX 中打开 src/manifest.json -> 基础配置 -> Android包名,确认是否为 com.jyuan.optical"
|
||||
}
|
||||
|
||||
Write-Host ""
|
||||
Write-Host "=== 手机已安装的相关包 ==="
|
||||
adb shell pm list packages | findstr /i "uni jyuan optical"
|
||||
Reference in New Issue
Block a user