# MariBank / Hook 相关 logcat(adb 不在 PATH 时也可用) param( [switch]$Clear, [switch]$Follow ) $ErrorActionPreference = "Stop" $sdk = "C:\Users\Administrator\AppData\Local\Android\Sdk" $adb = Join-Path $sdk "platform-tools\adb.exe" if (-not (Test-Path $adb)) { Write-Host "adb not found at $adb" -ForegroundColor Red exit 1 } $pattern = "MariBankRoot|1201|seabank|ClashMeta|LSPosed-Bridge.*notiMessage" if ($Clear) { & $adb logcat -c Write-Host "logcat cleared." -ForegroundColor Green exit 0 } if ($Follow) { Write-Host "Following logcat (Ctrl+C to stop)..." -ForegroundColor Cyan & $adb logcat | Select-String -Pattern $pattern } else { & $adb logcat -d | Select-String -Pattern $pattern }