Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

get APK of installed app with adb command

Tags:

android

apk

adb

I try to get the APK file of installed app on my Android phone, I followed this answer which says no need for root access.

I know Facebook app package name is com.facebook.katana, I see it with command adb shell pm list package.

Then, I tried in 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 by:

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

But output is:

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

Why I can not get the APK but that answer says it works?

like image 790
Leem.fin Avatar asked Apr 11 '17 09:04

Leem.fin


People also ask

Can you install APK from ADB?

ADB (Android Debugging Bridge) can be used to execute commands on your VR device. It's mostly used to install applications (APK files) from a Windows PC or Mac with a device connected with USB.


1 Answers

Pull the APK file from the Android device to the development box by setting 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 
like image 61
Fathima km Avatar answered Sep 23 '22 01:09

Fathima km