About Android-Utils
ModuleBase
Version
Author
CompanyName
Copyright
D:\a\powershell-android-utils\powershell-android-utils\docs\modules\Android-Utils
1.0
Dominique Righetto
Personal
GNU GPL v3
Backup-Data-APK
Synopsis
Syntax
Backup-Data-APK -appPkg <String> -encryptionPassword <SecureString>
Description
Perform a backup of the provided package name on the current connected device using the current connected ADB instance.
Parameters
- -appPkg
- <String>
Package name of the application.
Required?
Position?
Default value
Accept pipeline input?
Accept wildchard characters?true
1
false
false
- -encryptionPassword
- <SecureString>
Encryption password specified into the backup interface on the device during the backup process. Do not specify it on the command line but using the prompt, see call example.
Required?
Position?
Default value
Accept pipeline input?
Accept wildchard characters?true
2
false
false
Inputs
None. You cannot pipe objects to this function.
Outputs
Examples
Example 1Backup-Data-APK -appPkg my.app.package
RelatedLinks
https://github.com/nelenkov/android-backup-extractor
Notes
Compress-APK
Connect-Android-Device
Synopsis
Syntax
Connect-Android-Device -deviceHost <String>
Description
Establish the connection between ADB and a Android device on port 5555.
Parameters
- -deviceHost
- <String>
IP address or host name of the device to connect to.
Required?
Position?
Default value
Accept pipeline input?
Accept wildchard characters?true
1
false
false
Inputs
None. You cannot pipe objects to this function.
Outputs
Examples
Example 1Connect-Android-Device -deviceHost 10.10.10.10
RelatedLinks
https://developer.android.com/tools/adb
Notes
Expand-APK
Synopsis
Syntax
Expand-APK -apkLocation <String>
Description
Depack an APK using APKTOOL instance present in PATH environment variable.
Parameters
- -apkLocation
- <String>
Path to the APK to depack.
Required?
Position?
Default value
Accept pipeline input?
Accept wildchard characters?true
1
false
false
Inputs
None. You cannot pipe objects to this function.
Outputs
Examples
Example 1Expand-APK -apkLocation app.apk
RelatedLinks
Notes
Find-Framework
Synopsis
Syntax
Find-Framework -apkLocation <String>
Description
Try to find if the APK use a framwework used to generate native app.
Parameters
- -apkLocation
- <String>
Path to the APK to analyze.
Required?
Position?
Default value
Accept pipeline input?
Accept wildchard characters?true
1
false
false
Inputs
None. You cannot pipe objects to this function.
Outputs
Examples
Example 1Find-Framework -apkLocation app.apk
RelatedLinks
Notes
Get-APK
Synopsis
Syntax
Get-APK -appPkg <String>
Description
Get the APK from the provided package name on the current connected device using the current connected ADB instance.
Parameters
- -appPkg
- <String>
Package name of the application.
Required?
Position?
Default value
Accept pipeline input?
Accept wildchard characters?true
1
false
false
Inputs
None. You cannot pipe objects to this function.
Outputs
Examples
Example 1Get-APK -appPkg my.app.package
RelatedLinks
Notes
Get-APK-Flags
Synopsis
Syntax
Get-APK-Flags -appPkg <String>
Description
Get the list of app flags.
Parameters
- -appPkg
- <String>
Package name of the application.
Required?
Position?
Default value
Accept pipeline input?
Accept wildchard characters?true
1
false
false
Inputs
None. You cannot pipe objects to this function.
Outputs
Examples
Example 1Get-APK-Flags -appPkg my.app.package
RelatedLinks
https://developer.android.com/studio/command-line/dumpsys
Notes
Get-APK-Permissions
Synopsis
Syntax
Get-APK-Permissions -appPkg <String>
Description
Get the list of app permissions .
Parameters
- -appPkg
- <String>
Package name of the application.
Required?
Position?
Default value
Accept pipeline input?
Accept wildchard characters?true
1
false
false
Inputs
None. You cannot pipe objects to this function.
Outputs
Examples
Example 1Get-APK-Permissions -appPkg my.app.package
RelatedLinks
https://developer.android.com/studio/command-line/dumpsys
Notes
Get-Memory-Dump
Synopsis
Syntax
Get-Memory-Dump -appPkg <String>
Description
Take a memory dump of the process of the application specified on the current connected device using the current connected ADB instance and download it into the current folder (dump file is removed after the download).
Parameters
- -appPkg
- <String>
Package name of the application.
Required?
Position?
Default value
Accept pipeline input?
Accept wildchard characters?true
1
false
false
Inputs
None. You cannot pipe objects to this function.
Outputs
Examples
Example 1Get-Memory-Dump -appPkg my.app.package
RelatedLinks
https://developer.android.com/studio/profile/memory-profiler
Notes
Get-Packages
Get-Screenrecord
Synopsis
Syntax
Get-Screenrecord
Description
Take a screen recording on the current connected device using the current connected ADB instance and download it into the current folder (video is removed after the download).
Parameters
Inputs
Outputs
Examples
Example 1Get-Screenrecord
RelatedLinks
Notes
Get-Screenshot
Install-APK
Show-Android-Functions
Synopsis
Syntax
Show-Android-Functions
Description
Show the available functions exposed by the "Android-Utils" module.
Parameters
Inputs
None. You cannot pipe objects to this function.
Outputs
Examples
Example 1Show-Android-Functions
RelatedLinks
https://github.com/righettod/powershell-android-utils
Notes
Show-Device-Screen
Synopsis
Syntax
Show-Device-Screen
Description
Cast the current USB connected device screen to the current computer using SCRCPY tool from Genymobile.
Parameters
Inputs
Outputs
Examples
Example 1Show-Device-Screen
RelatedLinks
https://github.com/Genymobile/scrcpy
Notes
Show-Diff-APK
Synopsis
Syntax
Show-Diff-APK -apkFirstLocation <String> -apkSecondLocation <String>
Description
Show the difference between 2 APK files.
Parameters
- -apkFirstLocation
- <String>
Path to the first APK file.
Required?
Position?
Default value
Accept pipeline input?
Accept wildchard characters?true
1
false
false
- -apkSecondLocation
- <String>
Path to the second APK file.
Required?
Position?
Default value
Accept pipeline input?
Accept wildchard characters?true
2
false
false
Inputs
None. You cannot pipe objects to this function.
Outputs
Examples
Example 1Show-Diff-APK -apkFirstLocation .\app1.apk -apkSecondLocation .\app2.apk
RelatedLinks
https://github.com/JakeWharton/diffuse
Notes
Show-Signature-APK
Synopsis
Syntax
Show-Signature-APK -apkLocation <String>
Description
Show the APK signature using APKSIGNER instance present in PATH environment variable.
Parameters
- -apkLocation
- <String>
Path to the APK for which the signature must be displayed.
Required?
Position?
Default value
Accept pipeline input?
Accept wildchard characters?true
1
false
false
Inputs
None. You cannot pipe objects to this function.
Outputs
Examples
Example 1Show-Signature-AP -apkLocation app.apk
RelatedLinks
https://source.android.com/security/apksigning
Notes
Test-Tools
Watch-Device-Broadcasts
Synopsis
Syntax
Watch-Device-Broadcasts [-marker <String>]
Description
Monitor the broadcasts send by the device .
Parameters
- -marker
- <String>
String used to filter the events.
Required?
Position?
Default value
Accept pipeline input?
Accept wildchard characters?false
1
false
false
Inputs
None. You cannot pipe objects to this function.
Outputs
Examples
Example 1Watch-Broadcasts-Events
Example 2
Watch-Broadcasts-Events -marker "myapp"
RelatedLinks
https://developer.android.com/studio/command-line/dumpsys
Notes
Watch-Log
Synopsis
Syntax
Watch-Log [-marker <String>] [-tag <String>] [-priority <String>]
Description
Show the device log applying the provided filter on current connected device using the current connected ADB instance.
Parameters
- -marker
- <String>
Filtering expression used as regex.
Required?
Position?
Default value
Accept pipeline input?
Accept wildchard characters?false
1
false
false
- -tag
- <String>
Filtering expression used as Android logging TAG.
Required?
Position?
Default value
Accept pipeline input?
Accept wildchard characters?false
2
false
false
- -priority
- <String>
Filtering log priority ordered from lowest to highest priority (single character in the following range): (V)erbose / (D)ebug / (I)nfo / (W)arning / (E)rror / (F)atal / (S)ilent.
Required?
Position?
Default value
Accept pipeline input?
Accept wildchard characters?false
3
false
false
Inputs
None. You cannot pipe objects to this function.
Outputs
Examples
Example 1Watch-Log -marker "Wifi"
Example 2
Watch-Log -marker "^(.*(Patched).*)$"
Example 3
Watch-Log -tag "APP_TAG"
Example 4
Watch-Log -tag "APP_TAG" -priority I
Example 5
Watch-Log -priority I
RelatedLinks
https://developer.android.com/studio/command-line/logcat#filteringOutput