ADB Concepts : List of ADB Shell command to retrieve ‘Package info’ with different parameters to get a more specific list of app packages.

Get a step-by-step walkthrough in the video below!
Here’s a list of useful adb shell commands to retrieve package info with various filters and parameters. These commands help refine the list of app packages and retrieve detailed information:
Section-1 : Basic Package Listing
Topic-1: List all installed packages:
Command:
adb shell pm list packagesExample:

Topic-2: List system apps only:
Command:
adb shell pm list packages -sExample:

Topic-3: List third-party (user-installed) apps only:
Command:
adb shell pm list packages -3Example:

Topic-4: List disabled packages:
Command:
adb shell pm list packages -dExample:

Topic-5: List enabled packages:
Command:
adb shell pm list packages -eExample:

Topic-6: List packages with a specific keyword (e.g., google):
Command:
adb shell pm list packages | grep googleSection-2: Package Info & Path Details
Topic-1: Get full path to APK of a specific package:
Command:
adb shell pm path com.example.appExample:
adb shell pm path com.wdiodemoapp
Topic-2: Get detailed info for a package:
Command:
adb shell dumpsys package com.example.appExample:
adb shell dumpsys package com.wdiodemoapp
Topic -3: Get specific app’s installation source:
Command:
adb shell pm list packages -iExample:

Topic -4: Get installer package for a specific app:
Command:
adb shell pm get-install-source com.example.appSection-3: User Context & UID
Topic-1: List packages for a specific user (e.g., user 10):
Command:
adb shell pm list packages --user 10Topic-2: Get the UID for a specific package:
Command:
adb shell dumpsys package com.example.app | grep userId=Section-4: Permissions and Components
Topic-1: List permissions used by a package:
Command:
adb shell dumpsys package com.example.app | grep permissionTopic-2: Get app activities, services, receivers, and providers:
Command:
adb shell dumpsys package com.example.app | grep -E "Activity|Service|Receiver|Provider"Section-5: Filtering by Intent or Action
Topic-1: List apps that can handle a specific intent (e.g., web URL):
Command:
adb shell cmd package query-intent-activities -a android.intent.action.VIEW -d http://GitHub Link:
No comments:
Post a Comment