9

I want to install apk on my emulator, I found this page how to install apk and This thread

and my problem is when I type adb in my command line I got this:

'adb' is not recognized as an internal or external commands

i set the path on windows advance, the path is the tool director in my sdk directory, I mean the path I set is C:\Program Files (x86)\Android\android-sdk\tools, I am working on windows 7

Community
  • 1
  • 1
William Kinaan
  • 25,507
  • 20
  • 76
  • 115

11 Answers11

20

First add your Android SDK path like "C:\Android\android-sdk\platform-tools" to your OS path

Second use this command to restart adb:

adb kill-server
adb start-server
Bobs
  • 21,870
  • 33
  • 134
  • 221
3

1 Step If u have multiple emulator than close all emulator and open emulator by Window--> AVD Manger --> and select any one emulator on which u want to install apk and start that emulator by clicking on Strat

2 Step Open Command Promot and enter path upto folder Platform-tools of android sdk somethiing like cd C:\Program Files (x86)\Android\android-sdk\platform-tools if 64 bit other wise C:\Program Files\Android\android-sdk\platform-tools

3 Step adb install Path Upto ur apk means path in which folder u have put apk Example adb install C:\User\Download\facebook.apk

Khan
  • 7,455
  • 3
  • 25
  • 43
2

Try this

First chage your current directory to platform-tools

cd C:\Program Files\Android\android-sdk\platform-tools

Then install your apk on emulator

adb install "<Path to your apk file>"

for example

adb install "c:\Apps\abc.apk"
Pargat
  • 760
  • 8
  • 23
1

For Mac Users

  1. Go to the /Users/your-user-name/Library/Android/sdk/platform-tools directory

  2. ./adb your-command (Ex: ./adb devices )

Aathi
  • 907
  • 10
  • 12
0

Try changing it to

From

C:\Program Files (x86)\Android\android-sdk\tools

To

C:\Program Files (x86)\Android\android-sdk\platform-tools

If doesn't work then you mught need to restart you system too.

RPB
  • 14,846
  • 15
  • 49
  • 78
0

add

C:\Android\android-sdk\platform-tools

and

C:\Android\android-sdk\platform-tools

to your Path Environment Variables

K_Anas
  • 30,228
  • 9
  • 65
  • 80
0

you can pull apk without command, step 1 select ddms view in editor step 2 select emulator or device step 3 select Fle Explorer step 4 select sdcard and there right corner push amd pull option with device icon here select push option and choose your apk location and push it step 5 now you can see your apk installed in Emulator or in device

Ankitkumar Makwana
  • 3,664
  • 3
  • 16
  • 44
0

Start terminal and write below command

For MAC

./adb kill-server
./adb start-server

For Windows

adb kill-server
adb start-server
Kirtikumar A.
  • 3,892
  • 40
  • 41
  • This is not an answer to the question. The adb command cannot be found! – philk Dec 09 '15 at 10:53
  • 1
    that all doesn't matter. Your answer does not solve any of the OP questions. The "adb" command is not in the path, so its not accessible. How does your answer solve this problem? It doesn't. – philk Dec 09 '15 at 20:15
0

For me it's work perfect

Go to folder android installation Go to platform-tools and try the below command

./adb reverse tcp:8081 tcp:8081

after Running your app

Danieldms
  • 836
  • 7
  • 11
0

For Mac - add next line to bash/zsh config file:

export PATH="$HOME/Library/Android/sdk/platform-tools:$PATH"
zishe
  • 10,055
  • 12
  • 60
  • 101
0

In my case, I had %LOCALAPPDATA%\Android\Sdk\platform-tools in my System Path with no luck.

I moved it to my User Path and it worked perfectly.

P.S. I personally use https://rix0rrr.github.io/WindowsPathEditor/, very straight forward and clean.

Leo
  • 7,914
  • 2
  • 35
  • 46