Shabbir Panjesha
Shabbir Panjesha

Reputation: 1939

Android get .apk file from emulator

I am newbie to the android development. Just out of curiosity i was wondering if it is possible to get back installed .apk file from android emulator ???

Upvotes: 7

Views: 18067

Answers (3)

ƒernando Valle
ƒernando Valle

Reputation: 3714

you can copy the route if you are working in eclipse, the apk that you install in the emulator is the same that is in your project when you compile it, go to folder bin, select .apk ctrl+c and paste in your desktop for example.

How to extract the apk file from device:

First run your emulator.

if you are in windows, open cmd and go to platform-tools : in my case cd C:\Program Files (x86)\Android\android-sdk\platform-tools

after that run adb as:

adb pull /data/app <the directory where do you wannt to save>

example:

adb pull /data/app C:\Users\tato469\Desktop\app

Access this folder and select your app.

NOTE: Look if only one emulator is running, else it will throw an error.

Upvotes: 3

RED_
RED_

Reputation: 3007

Are you trying to run the app on a device or do you just want the .apk?

TO run it on a device:

1) Click the project
2) Go to Run -> Run configurations -> Target tab
3) Select Always prompt to pick device then apply.

After which everytime you try and run the application it will let you select any plugged in devices

TO get the .apk

1) Right-click project file
2) Export
3) Follow instructions

Upvotes: -1

baske
baske

Reputation: 1352

The question linked by @thepoosh indeed has some correct answers to your question, but it is not the accepted answer. Scroll down a bit to answer of either @plaisthos or @Pratik.

In short: your .apk resides in the /data/app directory on your emulator. Note: It probably has a name that differs from the name of the .apk file on your build machine, since the .apk get renamed to something that looks like your package name.

So, using adb shell: - cd /data/app - ls (and check the name of your .apk file) - exit adb shell - on commmandprompt: adb pull /data/app/your.filename.apk

Or from Eclipse use the fileexplorer tab as stated by @Pratik in the other thread.

Upvotes: 4

Related Questions