12

I have eclipse and ADT and android SDK installed and I want to test apk files on my emulator.

I followed guides from stackoverflow, like this: How do I Install .apk files in the android emulator?

but these guides doesnt works a this point: I dont know where i have to put the APK file. For example, this command:

adb -s emulator-5554 install something.apk

It fails because can't find my apk file. Where i have to put it?

Community
  • 1
  • 1
NullPointerException
  • 36,107
  • 79
  • 222
  • 382

3 Answers3

23

You can put it anywhere on your system, just specify the path as part of your command line:

C:\android-sdk\platform-tools> adb -s emulator-5554 install C:\Users\Me\Desktop\myapp.apk

Or, change into the directory your APK is in first, then run your command:

C:\> cd %USERPROFILE%\Desktop
C:\Users\Me\Desktop> adb -s emulator-5554 install myapp.apk

Note: The above assumes you're on Windows, substitute UNIX-style paths if you're on Linux or Mac OSX.

buczek
  • 2,011
  • 7
  • 29
  • 40
Justin ᚅᚔᚈᚄᚒᚔ
  • 15,081
  • 7
  • 52
  • 64
7

Add these lines to your path variable

C:\............\Android\android-sdk
C:\............\Android\android-sdk\tools
C:\............\Android\android-sdk\plateform-tools
  1. Run your emulator by typing the following command on command prompt

    emulator -avd

  2. Run the another command prompt window and type the following command

    adb -install ......path of apk file......./Appname.apk

Jhonathan
  • 1,611
  • 2
  • 13
  • 24
Amit
  • 91
  • 1
  • 3
  • 8
2

You can start the command console and type

If the emulator is already running.

adb install <filepath/filename.apk> 

if the file is in same directory, else specify the path of the filename.

ravi.zombie
  • 1,482
  • 1
  • 20
  • 23