$adb = "C:\Users\12914\Android\sdk\platform-tools\adb.exe" $target = "127.0.0.1:7555" $outDir = "C:\Users\12914\Desktop\vscode" # 启动daemon并连接 & $adb start-server 2>$null Start-Sleep -Seconds 2 $result = & $adb connect $target 2>&1 Write-Host "Connect: $result" Start-Sleep -Seconds 2 # 验证连接 $devices = & $adb devices 2>&1 Write-Host "Devices: $devices" # 截图1: 当前页面 Write-Host "=== Screenshot 1: Current page ===" & $adb -s $target shell screencap -p /sdcard/s1.png 2>&1 Start-Sleep -Seconds 1 & $adb -s $target pull /sdcard/s1.png "$outDir\_mumu_s1.png" 2>&1 # 向下滚动查看更多工具卡片 Write-Host "=== Scroll down ===" & $adb -s $target shell input swipe 300 800 300 300 500 2>&1 Start-Sleep -Seconds 2 # 截图2: 滚动后 Write-Host "=== Screenshot 2: After scroll ===" & $adb -s $target shell screencap -p /sdcard/s2.png 2>&1 Start-Sleep -Seconds 1 & $adb -s $target pull /sdcard/s2.png "$outDir\_mumu_s2.png" 2>&1 # 继续滚动到底部 Write-Host "=== Scroll down more ===" & $adb -s $target shell input swipe 300 800 300 300 500 2>&1 Start-Sleep -Seconds 2 # 截图3: 更多内容 Write-Host "=== Screenshot 3: More content ===" & $adb -s $target shell screencap -p /sdcard/s3.png 2>&1 Start-Sleep -Seconds 1 & $adb -s $target pull /sdcard/s3.png "$outDir\_mumu_s3.png" 2>&1 Write-Host "=== All done ==="