Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
adbkit-apkreader
Advanced tools
adbkit-apkreader provides a Node.js API for extracting information from Android APK files. For example, it allows you to read the AndroidManifest.xml
of an existing APK file.
Install via NPM:
npm install --save adbkit-apkreader
Note that while adbkit-apkreader is written in CoffeeScript, it is compiled to JavaScript before being published to NPM, which means that you are not required to use CoffeeScript.
AndroidManifest.xml
of an APKvar util = require('util')
var ApkReader = require('adbkit-apkreader')
var reader = ApkReader.readFile('HelloApp.apk')
var manifest = reader.readManifestSync()
console.log(util.inspect(manifest, { depth: null }))
Alternate syntax to manually creating an ApkReader instance. Currently, only files are supported, but support for streams might be added at some point.
Error
on error (e.g. if the file is not valid)ApkReader
instance.Manually construct an ApkReader
instance. Useful for testing and/or playing around. Normally you would use ApkReader.readFile(file)
to create the instance.
Error
on error (e.g. if the file is not valid)Synchronously reads and parses the AndroidManifest.xml
file inside the APK and returns a simplified object representation of it.
Error
(e.g. if parsing was unsuccessful)Object
representation of the manifest. See example output below:{ versionCode: 1,
versionName: '1.0',
package: 'com.example.hello.helloapp.app',
usesPermissions: [],
permissions: [],
permissionTrees: [],
permissionGroups: [],
instrumentation: null,
usesSdk: { minSdkVersion: 7, targetSdkVersion: 19 },
usesConfiguration: null,
usesFeatures: [],
supportsScreens: null,
compatibleScreens: [],
supportsGlTextures: [],
application:
{ theme: 'resourceId:0x7f0b0000',
label: 'resourceId:0x7f0a000e',
icon: 'resourceId:0x7f020057',
debuggable: true,
allowBackup: true,
activities:
[ { label: 'resourceId:0x7f0a000e',
name: 'com.example.hello.helloapp.app.MainActivity',
intentFilters:
[ { actions: [ { name: 'android.intent.action.MAIN' } ],
categories: [ { name: 'android.intent.category.LAUNCHER' } ],
data: [] } ],
metaData: [] } ],
activityAliases: [],
launcherActivities:
[ { label: 'resourceId:0x7f0a000e',
name: 'com.example.hello.helloapp.app.MainActivity',
intentFilters:
[ { actions: [ { name: 'android.intent.action.MAIN' } ],
categories: [ { name: 'android.intent.category.LAUNCHER' } ],
data: [] } ],
metaData: [] } ],
services: [],
receivers: [],
providers: [],
usesLibraries: [] } }
Synchronously reads and parses the binary XML file at the given path inside the APK file. Attempts to be somewhat compatible with the DOM API.
AndroidManifest.xml
as the path would parse the manifest (but you'll probably want to use reader.readManifestSync()
instead).Error
(e.g. if parsing was unsuccessful)Object
representation of the root node of the XML file. All nodes including the root node have the following properties:
null
if none.1
for element nodes, 2
for attribute nodes, and 4
for CData sections.null
, String
, Boolean
, Number
or even an Object
for the most complex types.String
representation of the type of the value.See CONTRIBUTING.md.
See LICENSE.
Copyright © CyberAgent, Inc. All Rights Reserved.
FAQs
Extracts information from APK files.
The npm package adbkit-apkreader receives a total of 40,813 weekly downloads. As such, adbkit-apkreader popularity was classified as popular.
We found that adbkit-apkreader demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.