Get apk of installed app from Android device


The installed applications are /data/app, however you cannot list the listing of this dir except you are rooted or you have insecure adb, as:

drwxrwx--x system   system            2013-08-05 08:28 app

However you can get the app you want as long as you know the file name.

To download you need to execute adb pull filename, ex:

adb pull /data/app/

How to find the file name

The names of applications are smth like this:, – the package followed by number (1 or 2).
so you can guess and try.

Another way to get the file name is to execute pm path command:

adb shell pm path

Another way is form java code:

PackageManager pm = getPackageManager();
List<ApplicationInfo> pkgs =  pm.getInstalledApplications(PackageManager.GET_META_DATA);
for (ApplicationInfo packageInfo : pkgs) {
    Log.d("PackageInfo", "package :" + packageInfo.packageName);
    Log.d("PackageInfo", "file path:" + packageInfo.sourceDir);