node-aapt
v1.1.0
Published
Android Asset Packaging Tool for Node.js allows you to view .apk archives
Downloads
7
Readme
node-aapt
Install
With npm do:
npm install node-aapt --save
Example
Using a callback:
const packageInfo = require('node-aapt');
packageInfo('/path/to/your/ExampleApp.apk', (err, data) => {
if (err) {
// something went wrong
} else {
console.log(data);
}
});
Using a promise:
const packageInfo = require('node-aapt');
packageInfo('/path/to/your/ExampleApp.apk')
.then (data => {
console.log(data)
})
.catch (err) {
// something went wrong
}
In the console output you will see something like this:
{ packageName: 'com.example.app',
versionCode: '12',
versionName: '1.2.3' }
API
packageInfo(path, callback)
path
Type: String
Path to your APK file.
callback
Type: function (err, data)
data
Type: Object
It contains the parsed data obtained from aapt tool.
License
MIT © Makarian Vladyslav