Gathering detailed insights and metrics for @devicefarmer/adbkit-apkreader
Gathering detailed insights and metrics for @devicefarmer/adbkit-apkreader
Gathering detailed insights and metrics for @devicefarmer/adbkit-apkreader
Gathering detailed insights and metrics for @devicefarmer/adbkit-apkreader
Extracts information from APK files.
npm install @devicefarmer/adbkit-apkreader
Typescript
Module System
Min. Node Version
Node Version
NPM Version
97.4
Supply Chain
99.1
Quality
79.9
Maintenance
100
Vulnerability
100
License
JavaScript (100%)
Total Downloads
5,820,790
Last Day
2,762
Last Week
46,584
Last Month
175,339
Last Year
3,900,595
NOASSERTION License
16 Stars
98 Commits
7 Forks
1 Watchers
5 Branches
1 Contributors
Updated on Jun 24, 2025
Latest Version
3.2.4
Package Id
@devicefarmer/adbkit-apkreader@3.2.4
Unpacked Size
39.80 kB
Size
10.19 kB
File Count
11
NPM Version
6.14.16
Node Version
12.22.12
Published on
Mar 30, 2023
Cumulative downloads
Total Downloads
Last Day
-30.7%
2,762
Compared to previous day
Last Week
11.8%
46,584
Compared to previous week
Last Month
-8%
175,339
Compared to previous month
Last Year
113.9%
3,900,595
Compared to previous year
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:
1npm install --save adbkit-apkreader
AndroidManifest.xml
of an APK1const util = require('util') 2const ApkReader = require('adbkit-apkreader') 3 4ApkReader.open('HelloApp.apk') 5 .then(reader => reader.readManifest()) 6 .then(manifest => console.log(util.inspect(manifest, { depth: null })))
A convenience constant with the value 'AndroidManifest.xml'
. Can use useful with other API methods in certain circumstances.
Alternate syntax to manually creating an ApkReader instance. Currently, only files are supported, but support for streams might be added at some point.
Note that currently this method cannot reject as the file is opened lazily, but this may change in the future and therefore returns a Promise for fewer future compatibility issues. On a related node, calling the constructor directly is still possible, but discouraged.
Promise
that resolves with an ApkReader
instance.Reads the content of the given file inside the APK.
'META-INF/MANIFEST.MF'
as the path would read the content of that file.Promise
that resolves with a Buffer
containing the full contents of the file.Reads and parses the AndroidManifest.xml
file inside the APK and returns a simplified object representation of it.
Promise
that resolves with a JavaScript Object
representation of the manifest. See example output below. Rejects on error (e.g. if parsing was unsuccessful).1{ versionCode: 1, 2 versionName: '1.0', 3 package: 'com.example.hello.helloapp.app', 4 usesPermissions: [], 5 permissions: [], 6 permissionTrees: [], 7 permissionGroups: [], 8 instrumentation: null, 9 usesSdk: { minSdkVersion: 7, targetSdkVersion: 19 }, 10 usesConfiguration: null, 11 usesFeatures: [], 12 supportsScreens: null, 13 compatibleScreens: [], 14 supportsGlTextures: [], 15 application: 16 { theme: 'resourceId:0x7f0b0000', 17 label: 'resourceId:0x7f0a000e', 18 icon: 'resourceId:0x7f020057', 19 debuggable: true, 20 allowBackup: true, 21 activities: 22 [ { label: 'resourceId:0x7f0a000e', 23 name: 'com.example.hello.helloapp.app.MainActivity', 24 intentFilters: 25 [ { actions: [ { name: 'android.intent.action.MAIN' } ], 26 categories: [ { name: 'android.intent.category.LAUNCHER' } ], 27 data: [] } ], 28 metaData: [] } ], 29 activityAliases: [], 30 launcherActivities: 31 [ { label: 'resourceId:0x7f0a000e', 32 name: 'com.example.hello.helloapp.app.MainActivity', 33 intentFilters: 34 [ { actions: [ { name: 'android.intent.action.MAIN' } ], 35 categories: [ { name: 'android.intent.category.LAUNCHER' } ], 36 data: [] } ], 37 metaData: [] } ], 38 services: [], 39 receivers: [], 40 providers: [], 41 usesLibraries: [] } }
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.readManifest()
instead).Promise
that resolves with a JavaScript Object
representation of the root node of the XML file. All nodes including the root node have the properties listed below. Rejects on error (e.g. if parsing was unsuccessful).
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.Opens a readable Stream to the given file inside the APK and runs the given action with it. The APK file is kept open while the action runs, allowing you to process the stream. Once the action finishes, the APK will be automatically closed.
'META-INF/MANIFEST.MF'
as the path would open that file.Promise
that resolves when you're done processing the stream. The value that the Promise
resolves with will also be the value that usingFileStream()
resolves with.
Promise
that resolves with whatever action
resolves with.See CONTRIBUTING.md.
See LICENSE.
Copyright © The OpenSTF Project. All Rights Reserved.
No vulnerabilities found.