Gbox lets you easily install Android applications on cloud-based devices without needing physical hardware. You can install apps from APK files, URLs, or local files, making app testing and development seamless:

  • Flexible Installation - Install apps from URLs, local APK files, or app stores
  • Instant Access - Install and launch apps in seconds on clean Android environments
  • No Setup Required - Skip device configuration and app sideloading complexities
  • Live Testing - View and interact with installed apps through live browser sessions
1

Get an API Key

  1. Go to Gbox AI
  2. Copy your API Key
  3. Paste your Gbox API Key into your env file
.env
GBOX_API_KEY=gbox-******
2

Install Gbox SDK and other dependencies

Install gbox-sdk and other dependencies by running the following command in your terminal.

npm install gbox-sdk dotenv typescript tsx @types/node
3

Create Android box and install app

Create a basic Android box by running the following code.

import GboxSDK from "gbox-sdk";
import * as dotenv from "dotenv";

dotenv.config();

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" });

  console.log(`Android box created: ${box.data.id}`);

  // install markor (a open source markdown editor)
  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"
  })

  // open the app
  await app.open()

  // you can also install an apk from your local machine
  // const app = await box.app.install({
  //   apk: "/path/to/your/app.apk"
  // })

  const liveView = await box.liveView()
  console.log(`Open the following URL in your browser to see the live view: ${liveView.url}`);
}

main();
4

Run the box

Run the box by running the following command in your terminal.

npx tsx index.ts

More Android Capabilities

Explore the complete Android API reference to discover all available operations and features.