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();import os
from gbox_sdk import GboxSDK
def main():
gbox_sdk = GboxSDK(api_key=os.environ["GBOX_API_KEY"])
# Create Android box
box = gbox_sdk.create(type="android")
# Install Android app from URL
app = 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
# with open("path/to/your/app.apk", "rb") as apk_file:
# app = box.app.install(apk=apk_file)
print(f"Android app installed successfully: {app.data.package_name}")
app.open()
if __name__ == "__main__":
main()curl --request POST \
--url https://gbox.ai/api/v1/boxes/{boxId}/android/packages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form 'apk=Select APK file or ZIP archive' \
--form 0.apk='@example-file'{
"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
}
]
}Install app
Install an Android app on the box
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();import os
from gbox_sdk import GboxSDK
def main():
gbox_sdk = GboxSDK(api_key=os.environ["GBOX_API_KEY"])
# Create Android box
box = gbox_sdk.create(type="android")
# Install Android app from URL
app = 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
# with open("path/to/your/app.apk", "rb") as apk_file:
# app = box.app.install(apk=apk_file)
print(f"Android app installed successfully: {app.data.package_name}")
app.open()
if __name__ == "__main__":
main()curl --request POST \
--url https://gbox.ai/api/v1/boxes/{boxId}/android/packages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form 'apk=Select APK file or ZIP archive' \
--form 0.apk='@example-file'{
"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
Enter your API Key in the format: Bearer . Get it from https://gbox.ai
Path Parameters
Box ID
"c9bdc193-b54b-4ddb-a035-5ac0c598d32d"
Body
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 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.
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.
false
Response
Android pkg installed
Response containing the result of installing an Android pkg
Android pkg package name
"com.google.android.apps.googlevoice"
Android apk path
"/data/app/com.google.android.apps.googlevoice-1/base.apk"
system or thirdParty
system, thirdParty "thirdParty"
Activity list
Show child attributes
Show child attributes
[
{
"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
}
]
Was this page helpful?