ArrayList<PackageInfo> packages = new ArrayList<PackageInfo>(); PackageManager pm; void getPackeges() { pm = (PackageManager) this.getPackageManager(); List<PackageInfo> allPackages = pm.getInstalledPackages(PackageManager.GET_PERMISSIONS); for (int i = 0; i < allPackages.size(); i++) if (!isSystemApplication(allPackages.get(i))) packages.add(allPackages.get(i)); } boolean isSystemApplication(PackageInfo packinfo) { return (packinfo.applicationInfo.flags & ApplicationInfo.FLAG_SYSTEM) != 0 ? true : false; }