Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

check if package exists inside the device adb

Without using grep
adb shell pm list packages [your.package.name] as mentioned in the below answer

According to (also) correct answer below, try grep the result from pm list
packages.
adb shell pm list packages | grep com.your.app.package

If the application is already installed and if you try to install the same app 
again, adb will return with an error - Failure [INSTALL_FAILED_ALREADY_EXISTS].
However, if you want to re-install the already installed app, then use -r 
parameter.

Ex:
adb install -r game.apk
 
PREVIOUS NEXT
Tagged: #check #package #exists #device #adb
ADD COMMENT
Topic
Name
7+2 =