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
npm install @devicefarmer/adbkit-apkreader
Typescript
Module System
Min. Node Version
Node Version
NPM Version
JavaScript (100%)
Total Downloads
3,857,547
Last Day
13,696
Last Week
84,766
Last Month
375,132
Last Year
3,671,900
12 Stars
98 Commits
5 Forks
2 Watching
5 Branches
1 Contributors
Minified
Minified + Gzipped
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
Publised On
30 Mar 2023
Cumulative downloads
Total Downloads
Last day
-17.1%
13,696
Compared to previous day
Last week
-1.1%
84,766
Compared to previous week
Last month
-2.1%
375,132
Compared to previous month
Last year
3,094.7%
3,671,900
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.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
Found 2/25 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2024-12-23
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More