获取已经安装APK的路径

    PackageManager pm = getPackageManager();

            for (ApplicationInfo app : pm.getInstalledApplications(0)) {
                 Log.d("PackageList", "package: " + app.packageName + ", sourceDir: " + app.sourceDir);
            }
  输出如下:
    package: com.tmobile.thememanager, sourceDir: /system/app/ThemeManager.apk
            package: com.touchtype.swiftkey, sourceDir: /data/app/com.touchtype.swiftkey-1.apk


编程技巧