APKParser alternatives and similar packages
Based on the "Utility" category.
Alternatively, view APKParser alternatives based on common mentions on social networks and blogs.
-
timber
A logger with a small, extensible API which provides utility on top of Android's normal Log class. -
ExpirableDiskLruCache
DISCONTINUED. Java implementation of a Disk-based LRU cache which specifically targets Android compatibility. -
Android-Templates-And-Utilities
Collection of source codes, utilities, templates and snippets for Android development. -
secure-preferences
DISCONTINUED. Android Shared preference wrapper than encrypts the values of Shared Preferences. It's not bullet proof security but rather a quick win for incrementally making your android app more secure. -
Androl4b
A Virtual Machine For Assessing Android applications, Reverse Engineering and Malware Analysis -
greenrobot-common
General purpose utilities and hash functions for Android and Java (aka java-common) -
vector-compat
A support library for VectorDrawable and AnimatedVectorDrawable classes introduced in Lollipop -
CastCompanionLibrary-android
DISCONTINUED. CastCompanionLibrary-android is a library project to enable developers integrate Cast capabilities into their applications faster and easier. -
motion
An Android library allowing images to exhibit a parallax effect that reacts to the device's tilt -
Colours
A beautiful set of predefined colors and a set of color methods to make your Android development life easier. -
Reservoir
DISCONTINUED. Android library to easily serialize and cache your objects to disk using key/value pairs.
InfluxDB - Purpose built for real-time analytics at any scale.
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of APKParser or a related project?
README
APK Parser [](LICENSE.txt)
Features
- Retrieve basic apk metas, such as title, icon, package name, version, etc.
- Parse and convert binary xml file to text
- Classes from dex file
- Get certificate metas and verify apk signature
[](sample/graphics/apk_parser_sample.png)
Get apk-parser
Download the latest AAR or grab via Gradle:
compile 'com.jaredrummler:apk-parser:1.0.2'
Usage
The easiest way is to use the ApkParser class, which contains convenient methods to get AndroidManifest.xml, apk meta infos, etc.
1. Apk meta info
ApkMeta contains name(label), packageName, version, sdk, used features, etc.
PackageManager pm = getPackageManager();
ApplicationInfo appInfo = pm.getApplicationInfo("com.facebook.katana", 0);
ApkParser apkParser = ApkParser.create(appInfo);
ApkMeta meta = apkParser.getApkMeta();
String packageName = meta.packageName;
long versionCode = meta.versionCode;
List<UseFeature> usesFeatures = meta.usesFeatures;
List<String> requestedPermissions = meta.usesPermissions;
2. Get binary xml and manifest xml file
ApplicationInfo appInfo = getPackageManager().getApplicationInfo("some.package.name", 0);
ApkParser apkParser = ApkParser.create(appInfo);
String readableAndroidManifest = apkParser.getManifestXml();
String xml = apkParser.transBinaryXml("res/layout/activity_main.xml");
3. Get dex classes
ApplicationInfo appInfo = getPackageManager().getApplicationInfo("com.instagram.android", 0);
ApkParser apkParser = ApkParser.create(appInfo);
List<DexInfo> dexFiles = apkParser.getDexInfos(); // if size > 1 then app is using multidex
for (DexInfo dexInfo : dexFiles) {
DexClass[] dexClasses = dexInfo.classes;
DexHeader dexHeader = dexInfo.header;
}
4. Get certificate and verify apk signature
ApplicationInfo appInfo = getPackageManager().getApplicationInfo("com.instagram.android", 0);
ApkParser apkParser = ApkParser.create(appInfo);
if (apkParser.verifyApk() == ApkParser.ApkSignStatus.SIGNED) {
System.out.println(apkParser.getCertificateMeta().signAlgorithm);
}
5. Get intent-filters from apk manifest:
ApkParser parser = ApkParser.create(getPackageManager(), "com.android.settings");
AndroidManifest androidManifest = parser.getAndroidManifest();
for (AndroidComponent component : androidManifest.getComponents()) {
if (!component.intentFilters.isEmpty()) {
for (IntentFilter intentFilter : component.intentFilters) {
// Got an intent filter for activity/service/provider/receiver.
}
}
}
6. Locales
Apk may return different infos(title, icon, etc.) for different region and language, which is determined by Locales. If the locale is not set, the "en_US" locale(Locale.US) is used. You can set the locale like this:
ApkParser apkParser = ApkParser.create(filePath);
apkParser.setPreferredLocale(Locale.SIMPLIFIED_CHINESE);
ApkMeta apkMeta = apkParser.getApkMeta();
The PreferredLocale parameter work for getApkMeta, getManifestXml, and other binary xmls. Apk parser will find best match languages with locale you specified.
If locale is set to null, ApkParser will not translate resource tag, just give the resource id. For example, apk title will be '@string/app_name' instead of 'WeChat'.
APK Parser is based on CaoQianLi's apk-parser
*Note that all licence references and agreements mentioned in the APKParser README section above
are relevant to that project's source code only.