handoover
handoover

Reputation: 19

how to run apk file in android

I try to run apk file in android, i follo these steps

  1. First get the Android SDK and unzip it somewhere on your hard drive
  2. Add SDK_ROOT to your system variables pointing to /tools folder under the sdk
  3. Run the emulator
  4. Copy the apk file to /tools folder
  5. Change directory to /tools and run from commandline $adb install your_application.apk
  6. Now check applications list in the emulator and you should see the new application installed and ready.

but i will this type of error :

'adb' is not recognized as an internal or external command,
operable program or batch file.

Upvotes: 0

Views: 3010

Answers (5)

Raj
Raj

Reputation: 1872

copy your apk file to {SDK_ROOT}\platform-tools and follow these steps.

  1. Run the emulator
  2. Copy the apk file to /platform-tools folder
  3. Change directory to /platform-tools and run from commandline $adb install your_application.apk
  4. Now check applications list in the emulator and you should see the new application installed and ready.

Upvotes: 0

hardik pansuria
hardik pansuria

Reputation: 208

i think you dont have set proper environment variable .

add path of adb.bat to PATH variable in windows ...

then from command prompt . type adb and check ..... now it works...

Upvotes: 3

Nanne
Nanne

Reputation: 64429

In the new SDK the adb program is in another dir (platform-tools). You'll have to look a bit, but find a binary with that name (you're using windows, right? it'll be called "adb.bat")

Upvotes: 2

Nick
Nick

Reputation: 1733

From SDK 2.3 the adb. exe is found in {SDK_ROOT}\platform-tools

just open a command window (when in windows) and navigate to that directory then just type the following:

adb install {path-to-apk}

this only works when there's only 1 device/emulator attached to the computer. if you want to send it to a device use the -d flag (i.e. adb -d install c:\program.apk)

Upvotes: 1

Galip
Galip

Reputation: 5465

Have you added it correctly to your system variables?

Look the tools folder up through Windows Explorer en copy the url that's in the address-bar.

Now right click 'Computer' and choose 'Properties' Choose 'Advanced system settings', go to the 'advanced' tab and choose 'Environement variables'.

Now scroll down the list and find 'Path'. Click 'Edit..' Now go to the end of the line and add ';' and after that paste the url you copied.

Now in command prompt try 'adb' and it should work.

Upvotes: 0

Related Questions