POST
/
boxes
/
{boxId}
/
android
/
packages
JavaScript
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
    }
  ]
}

Authorizations

Authorization
string
header
required

Enter your API Key in the format: Bearer <token>. Get it from https://gbox.ai

Path Parameters

boxId
string
required

Box ID

Example:

"c9bdc193-b54b-4ddb-a035-5ac0c598d32d"

Body

multipart/form-data

APK file upload or URL (max size: 200MB)

Request for installing Android pkg from uploaded APK file

Response

201
application/json

Android pkg installed

Response containing the result of installing an Android pkg