Find Path One liner
The command:
adb shell "pm path "$(adb shell "pm list packages | grep google" | awk -F: '{print $2}')In short:
List Packages: Finds all installed packages containing "google":
adb shell "pm list packages | grep google"Extract Package Name: Extracts only the package name from the output:
| awk -F: '{print $2}'Get APK Path: Retrieves the file path of the APK for the first matching package:
adb shell "pm path <package_name>"Combining It All: Automatically passes the package name to
pm pathto get the APK path in one command.
Last updated