Skip to main content
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 URL
  const app = await box.app.install({
    apk: "https://github.com/gsantner/markor/releases/download/v2.14.1/net.gsantner.markor-v158-2.14.1-flavorDefault-release.apk"
  });

	// Or install Android app from APK file
  // const apkFile = fs.createReadStream("path/to/your/app.apk");
  // const app =  await box.app.install({ apk: apkFile });

  console.log(`Android app installed successfully: ${app.data.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: 512MB)

  • Install Android Pkg By File
  • Install Android Pkg By URL

Request for installing Android pkg from uploaded APK file or ZIP archive

apk
file
required

APK file or ZIP archive to install (max file size: 512MB).

Single APK mode:

  • Upload a single APK file (e.g., app.apk)
  • System will automatically detect and install as single APK

Multi-APK mode (automatically detected):

  • Upload a ZIP archive containing multiple APK files
  • System will automatically detect ZIP format and install all APKs inside
  • ZIP filename example: com.reddit.frontpage-gplay.zip
  • ZIP contents example:

com.reddit.frontpage-gplay.zip └── com.reddit.frontpage-gplay/ (folder) ├── reddit-base.apk (base APK) ├── reddit-arm64.apk (architecture-specific) ├── reddit-en.apk (language pack) └── reddit-mdpi.apk (density-specific resources)

This is commonly used for split APKs where different components are separated by architecture, language, or screen density.

open
boolean
default:false

Whether to open the app after installation. Will find and launch the launcher activity of the installed app. If there are multiple launcher activities, only one will be opened. If the installed APK has no launcher activity, this parameter will have no effect.

Example:

false

Response

Android pkg installed

Response containing the result of installing an Android pkg

packageName
string
required

Android pkg package name

Example:

"com.google.android.apps.googlevoice"

apkPath
string
required

Android apk path

Example:

"/data/app/com.google.android.apps.googlevoice-1/base.apk"

pkgType
enum<string>
required

system or thirdParty

Available options:
system,
thirdParty
Example:

"thirdParty"

activities
Android Pkg Activity · object[]
required

Activity list

Example:
[
{
"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
}
]
I