import GboxSDK from "gbox-sdk";
import fs from "fs";
const gboxSDK = new GboxSDK({
apiKey: process.env["GBOX_API_KEY"] // This is the default and can be omitted
});
async function main() {
const box = await gboxSDK.create({ type: "android" });
// Install Android app from APK file
const apkFile = fs.createReadStream("path/to/your/app.apk");
await box.app.install({ apk: apkFile });
// Or install Android app from URL
const app = await box.app.install({
apk: "https://example.com/path/to/app.apk"
});
console.log(`Android app installed successfully: ${app.packageName}`);
await app.open();
}
main();
{
"packageName": "com.google.android.apps.googlevoice",
"apkPath": "/data/app/com.google.android.apps.googlevoice-1/base.apk",
"pkgType": "thirdParty",
"activities": [
{
"name": "Settings",
"className": "com.android.settings.Settings",
"packageName": "com.android.settings",
"isExported": true,
"isMain": true
},
{
"name": "About Phone",
"className": "com.android.settings.AboutPhone",
"packageName": "com.android.settings",
"isExported": true,
"isMain": false
}
]
}
import GboxSDK from "gbox-sdk";
import fs from "fs";
const gboxSDK = new GboxSDK({
apiKey: process.env["GBOX_API_KEY"] // This is the default and can be omitted
});
async function main() {
const box = await gboxSDK.create({ type: "android" });
// Install Android app from APK file
const apkFile = fs.createReadStream("path/to/your/app.apk");
await box.app.install({ apk: apkFile });
// Or install Android app from URL
const app = await box.app.install({
apk: "https://example.com/path/to/app.apk"
});
console.log(`Android app installed successfully: ${app.packageName}`);
await app.open();
}
main();
{
"packageName": "com.google.android.apps.googlevoice",
"apkPath": "/data/app/com.google.android.apps.googlevoice-1/base.apk",
"pkgType": "thirdParty",
"activities": [
{
"name": "Settings",
"className": "com.android.settings.Settings",
"packageName": "com.android.settings",
"isExported": true,
"isMain": true
},
{
"name": "About Phone",
"className": "com.android.settings.AboutPhone",
"packageName": "com.android.settings",
"isExported": true,
"isMain": false
}
]
}
Enter your API Key in the format: Bearer <token>. Get it from https://gbox.ai
Box ID
"c9bdc193-b54b-4ddb-a035-5ac0c598d32d"
APK file upload or URL (max size: 512MB)
Request for installing Android pkg from uploaded APK file or ZIP archive
Android pkg installed
Response containing the result of installing an Android pkg
Was this page helpful?