public static String loadPkgNameByFilePath(Context context, String filePath) {
        PackageManager pm = context.getPackageManager();
        PackageInfo info = pm.getPackageArchiveInfo(filePath, PackageManager.GET_ACTIVITIES);
        if (info == null) return null; // FIX NPE
        return info.packageName;
    }
Created by Nick@NewStand.org on 2017/3/13 9:56
E-Mail: NewStand@163.com
All right reserved.
android/android_framework/base/src/main/java/github/tornaco/android/thanos/core/util/ApkUtil.java