\r\n$ adb shell pm list packages\r\n...\r\npackage:org.coursera.android\r\npackage:com.quizup.core\r\npackage:com.airbnb.android\r\n...\r\n<\/pre>\nOnce you have the list with you, determine the package name you want to APK of. For some reason the developers of the app might choose to call the package name something that is completed unrelated to the app name. In that case find the app on Google Play Store where the URL of the app will contain the package name.<\/p>\n
Get the APK Path<\/h3>\n
Next, we’ll need to get the path of the desired android package using the package manager again. Let’s try with com.airbnb.android (Airbnb app) in this case:<\/p>\n
\r\n$ adb shell pm path com.airbnb.android\r\npackage:\/data\/app\/com.airbnb.android-1.apk\r\n<\/pre>\nThe output is the path of the APK file on the device’s filesystem.<\/p>\n
Pull the APK<\/h3>\n
Finally, we’ll need to pull the APK file from the Android device (or emulator) to our computer (development box) using adb pull<\/code>.<\/p>\n\r\n$ adb pull \/data\/app\/com.airbnb.android-1.apk\r\n3484 KB\/s (12796521 bytes in 3.586s)\r\n<\/pre>\nYour app APK file should be lying in the current working directory then.<\/p>\n
\r\n$ las -alh\r\n...\r\n-rw-r--r-- 1 rishabhpugalia staff 12M Oct 22 15:37 com.airbnb.android-1.apk\r\n...\r\n<\/pre>\nHope that helps!<\/p>\n","protected":false},"excerpt":{"rendered":"
In this quick tip, we’ll see how to use the excellent Android Debug Bridge (adb) tool on the command line to list all the installed packages on our android device (non-rooted in my case) and then extract one of their APK files to our computer.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[121,40],"tags":[105,89],"_links":{"self":[{"href":"https:\/\/codetheory.in\/wp-json\/wp\/v2\/posts\/1805"}],"collection":[{"href":"https:\/\/codetheory.in\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/codetheory.in\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/codetheory.in\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/codetheory.in\/wp-json\/wp\/v2\/comments?post=1805"}],"version-history":[{"count":4,"href":"https:\/\/codetheory.in\/wp-json\/wp\/v2\/posts\/1805\/revisions"}],"predecessor-version":[{"id":1818,"href":"https:\/\/codetheory.in\/wp-json\/wp\/v2\/posts\/1805\/revisions\/1818"}],"wp:attachment":[{"href":"https:\/\/codetheory.in\/wp-json\/wp\/v2\/media?parent=1805"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/codetheory.in\/wp-json\/wp\/v2\/categories?post=1805"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/codetheory.in\/wp-json\/wp\/v2\/tags?post=1805"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}