Android - Installing an app from Play Store using the command line

I was looking for the same answer, i can't find a single command to do this, but i found few options that could be useful in such cases:

A. download the .apk to your computer and install the apk from it (just google 'apk downloder' and find one suitable for you):

adb install com.myapp.apk

B. open playstore app from adb and point it to your package, this will look like this:

adb shell am start -a android.intent.action.VIEW -d 'market://details?id=com.myapp'

(i'm sure it can be automated to simulate the neccesarry clicks and install the app, but this requires much more work)

none are as easy as just installing from computer cmd, but that what we have now.


Short Answer : No.

Long Answer :

adb install is a "shortcut" that is equivalent to open a shell (using adb shell) and type pm install. pmstand for package-manager and his behaviour is the same as other package manager in other Linux distributions (like aptitude in Debian or pacmanin Arch Linux) except that pm doesn't fetch package from a distant location.

The Play Store is an application like others, and we can't call android applications like we call a program like a C or "normal" Java program, because the .apk file isn't actually a binary, but a simply zipped package. It is the Dalvik Virtual Machine (sort of equivalent to the Java VM) that deals with running applications. The Play Store application simply download the application you want and then run pm install on the package downloaded.