![]() |
![]() |
|||||||||
|
||||||||||
| } |
Adb: App Control Extended Keyadb shell pm list packages --user 10 This lists only apps installed in the work profile. Combining --user with disable/suspend allows per-profile app control. | Command | Effect | | :--- | :--- | | pm disable-user | Disables for the current user only. | | pm disable-until-used | Disables until the user manually launches the app. | | pm disable-dm | Disables package verification. (Dangerous; for development only) | | pm enable | Re-enables a disabled app. | adb app control extended key adb shell am start -S -W --user 0 -a android.intent.action.VIEW -d "https://example.com" com.android.browser This force-stops the browser, waits for it to load the URL, and does so on user 0. This level of control is impossible with a simple tap on the screen. Why should you care about the adb app control extended key ? Here are three powerful scenarios. Use Case 1: Corporate Device Management (Without MDM) You manage 50 company tablets. You want to disable the camera and YouTube but keep Chrome and Gmail. adb shell pm list packages --user 10 This #!/bin/bash # Extended ADB App Control Script PACKAGE=$1 ACTION=$2 USER_ID=$3:-0 # Default to user 0 | | pm disable-until-used | Disables until the adb shell pm disable-user --user 0 com.google.android.youtube adb shell pm disable-user --user 0 com.android.camera2 adb shell pm grant com.google.android.gm android.permission.CAMERA Wait—the last line is crucial. Instead of disabling camera apps, you revoke the permission via the extended key. A game constantly runs background tracking services. Instead of uninstalling (which loses data), you suspend it. adb shell pm suspend --user 0 com.tencent.mobilegame When you want to play again: |
|||||||||