Get the APK of the installed application with adb command

I am trying to get the APK file of an installed app on my android phone, I followed this answer which says there is no need for root access.

I know the name of the Facebook app package is com.facebook.katana

, I see it with the command adb shell pm list package

.

Then I tried on the command line:

adb shell pm path com.facebook.katana

      

It returns:

package:/data/app/com.facebook.katana-2/base.apk

      

Then I pull the apk file to my computer:

adb pull /data/app/com.facebook.katana-2/base.apk

      

But the conclusion is:

adb: error: remote object '/data/app/com.facebook.katana-2/base.apk' does not exist

      

Why can't I get the APK but this answer says it works?

+3


source to share


4 answers


Pull the APK file from the Android device into the development window by setting the destination path.

adb pull /data/app/com.facebook.katana-2/base.apk path/to/desired/destination

      



or use

adb shell cat /data/app/com.facebook.katana-2/base.apk > app.apk 

      

+3


source


Installed

adb pull /data/app/com.facebook.katana-2/base.apk

      

Using:



adb shell cat /data/app/com.facebook.katana-2/base.apk > app.apk

      

And your apk will be generated internally Your_Android_SDK_path\platform-tools

+2


source


Install MyAppSharer from Google Play on your phone, launch it, find the application you want and share it with Google Drive (or write if the file is small enough).

Works on Android 7.1 where the above adb pull commands don't work (at least not for me); says the app doesn't exist. So just use the app, no need to run adb commands.

+1


source


Try using adb pull

to download said file from emulator / device to computer.

adb pull /data/app/com.facebook.katana-2/base.apk target/path   

      

0


source







All Articles