Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Install an apk file from command prompt?

Tags:

android

apk

cmd

I want to install a file using the Windows command line. First I want to build after compiling all the .jar files to create an .apk file for an Android application without using Eclipse.

Does anyone know how this can be done without the use of Eclipse & only by making use of command line.

like image 988
Max Avatar asked Aug 16 '11 09:08

Max


People also ask

How do I manually install APK files?

Just open your browser, find the APK file you want to download, and tap it – you should then be able to see it downloading on the top bar of your device. Once it's downloaded, open Downloads, tap on the APK file and tap Yes when prompted. The app will begin installing on your device.

How do I install an APK file on my PC?

Take the APK you want to install (be it Google's app package or something else) and drop the file into the tools folder in your SDK directory. Then use the command prompt while your AVD is running to enter (in that directory) adb install filename. apk . The app should be added to the app list of your virtual device.


2 Answers

You can use the code below to install application from command line

adb install example.apk 

this apk is installed in the internal memory of current opened emulator.

adb install -s example.apk 

this apk is installed in the sd-card of current opened emulator.

You can also install an apk to specific device in connected device list to the adb.

adb -s emulator-5554 install myapp.apk 

Refer also to adb help for other options.

like image 104
Mohit Kanada Avatar answered Sep 22 '22 02:09

Mohit Kanada


You can build on the command line with ant. See this guide.

Then, you can install it by using adb on the command line.

adb install -r MyApp.apk 

The -r flag is to replace the existing application.

like image 37
Graham Borland Avatar answered Sep 22 '22 02:09

Graham Borland