How to install app from command line (terminal)?
I would like to start a terminal window and do the apk installation from command line (shell script)
EDIT1: within the phone. Also is it possible to install from Google Play from URL, instead just a local path?
I didn't get answer, how to install Google Play app from command line.
pm install <package.apk>fails withFailure [INSTALL_FAILED_INVALID_URI]. If on CM12.1 or otherwise having root permissions and theadbclient on the phone, it's possible to work around this by making the phone connect to itself. To do so, you need to executesetprop service.adb.tcp.port 5555, thenadb start-server, thenadb connect 127.0.0.1:5555, then finallyadb shell "pm install <apk_path>". All of the commands are to be executed as root. – Grimoire Feb 18 '17 at 14:11emulator-5554underadb devices. Killing it viaadb emu killdoesn't work, but issuingsetprop service.adb.tcp.port 5555once more will make the dummy emulator disappear. The setprop command has to be executed when the adb server is running, or else the dummy emulator won't disappear. – Grimoire Feb 18 '17 at 14:24chown root.shell /system/bin/adb,chmod 755 /system/bin/adbandchcon u:object_r:system_file:s0 /system/bin/adband see if it works. – Grimoire Feb 22 '17 at 19:09