Adb App Control Extended Key May 2026
#!/bin/bash # Extended ADB App Control Script PACKAGE=$1 ACTION=$2 USER_ID=$3:-0 # Default to user 0
adb shell pm suspend --user 0 com.tencent.mobilegame When you want to play again: adb app control extended key
case $ACTION in suspend) echo "Suspending $PACKAGE (extended suspend key)" adb shell pm suspend --user $USER_ID $PACKAGE ;; unsuspend) echo "Unsuspending $PACKAGE" adb shell pm unsuspend --user $USER_ID $PACKAGE ;; disable-until-launch) echo "Disabling $PACKAGE until launched by user" adb shell pm disable-until-used --user $USER_ID $PACKAGE ;; grant-all-perms) echo "Granting all dangerous permissions to $PACKAGE" adb shell pm list permissions -d -g | grep "Permission:" | awk 'print $2' | while read perm; do adb shell pm grant $PACKAGE $perm done ;; deep-link) URL=$4 echo "Launching $PACKAGE with extended key deep link to $URL" adb shell am start -W -a android.intent.action.VIEW -d "$URL" $PACKAGE ;; *) echo "Usage: $0 <package> <suspend|unsuspend|disable-until-launch|grant-all-perms|deep-link> [user_id]" ;; esac *) echo "Usage: $0 <
adb shell pm unsuspend --user 0 com.tencent.mobilegame No data loss, no re-login. QA teams use extended keys to launch apps in specific states. adb app control extended key