GET
/
boxes
/
{boxId}
/
android
/
packages
JavaScript
import GboxSDK from "gbox-sdk";

const gboxSDK = new GboxSDK({
  apiKey: process.env["GBOX_API_KEY"] // This is the default and can be omitted
});

async function main() {
  // Create an Android box
  const box = await gboxSDK.create({ type: "android" });

  // Get basic package information (metadata only)
  const androidPkgListInfo = await box.pkg.listInfo();
  console.log(`Android Pkg List: ${JSON.stringify(androidPkgListInfo, null, 2)}`);

  // Get package operators for interaction capabilities
  const androidPkgList = await box.pkg.list();

  // Iterate through each package operator and perform actions
  for (const pkg of androidPkgList) {
    console.log(`Pkg data: ${JSON.stringify(pkg.data, null, 2)}`);
  }
}

main();
{
  "data": [
    {
      "name": "Google Voice",
      "packageName": "com.google.android.apps.googlevoice",
      "apkPath": "/data/app/com.google.android.apps.googlevoice-1/base.apk",
      "version": "1.0.0",
      "pkgType": "thirdParty",
      "isRunning": false
    },
    {
      "name": "Chrome Browser",
      "packageName": "com.android.chrome",
      "apkPath": "/data/app/com.android.chrome-2/base.apk",
      "version": "120.0.6099.210",
      "pkgType": "thirdParty",
      "isRunning": true
    },
    {
      "name": "System Settings",
      "packageName": "com.android.settings",
      "apkPath": "/system/app/Settings/Settings.apk",
      "version": "1.0.0",
      "pkgType": "system",
      "isRunning": 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"

Query Parameters

pkgType
enum<string>[]

system or thirdParty, default is thirdParty

Example:
["thirdParty"]
runningFilter
enum<string>[]

Filter pkgs by running status: running (show only running pkgs), notRunning (show only non-running pkgs). Default is all

Example:
["running", "notRunning"]

Response

200 - application/json

Android pkg list

Response containing list of Android pkgs