Monday, June 2, 2014

Install an APK file in the Android emulator



Windows:
  1. Execute the emulator (SDK Manager.exe->Tools->Manage AVDs...->New then Start)
  2. Start the console (Windows XP), Run -> type cmd, and move to the platform-tools folder of SDK directory.
  3. Paste the APK file in the 'android-sdk\tools' or 'platform-tools' folder.
  4. Then type the following command.
    adb install [.apk path]
    Example:
    adb install C:\Users\Name\MyProject\build\Jorgesys.apk
Linux:
In Linux the adb file is found in platform-tools directory under the SDK root directory

MAC:
PATH=$PATH:"adb location"  
Example : PATH=$PATH:/users/jorgesys/eclipse/android-sdk-mac_64/tools
Then run adb.
go to sdk folder, then go to tools.

copy your apk file inside the tool directory
./emulator -avd myEmulator

to run the emulator on your machine 

>>>> adb install fileName.apk (Windows)

OR
>>>>./adb install fileName.apk (Linux or Mac)



No comments:

Post a Comment