-
Notifications
You must be signed in to change notification settings - Fork 0
/
AdbAliases.ps1
38 lines (34 loc) · 936 Bytes
/
AdbAliases.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# Adb Devices
function ad { & adb devices }
# Adb Log
function al { & adb logcat @args }
function alc { & adb logcat -c }
function als { & adb logcat | Select-String @args }
# Adb Install
function ai { & adb install @args }
function aid { & adb install -d @args }
function air { & adb install -r @args }
function aidr { & adb install -d -r @args }
# Adb Shell
function as { & adb shell @args }
function asas {
param (
[Parameter(Mandatory = $true)][string]$PackageName,
[Parameter(Mandatory = $true)][string]$LaunchActivity
)
Write-Host "Start app '$PackageName' with activity '$LaunchActivity'"
& adb shell am start -n $PackageName/$LaunchActivity
}
function asp {
& adb shell ps @args
}
function asps {
& adb shell ps | Select-String @args
}
function asast {
param (
[string]$PackageName
)
Write-Host "Stop app '$PackageName"
& adb shell am force-stop $PackageName
}