> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gbox.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# List pkg

> Retrieves detailed information for all installed pkgs. This endpoint provides comprehensive pkg details.



## OpenAPI

````yaml get /boxes/{boxId}/android/packages
openapi: 3.0.0
info:
  title: GBOX Open API
  description: GBOX Open API Documentation
  version: '1.0'
  contact: {}
servers:
  - url: https://gbox.ai/api/v1
    description: Production Server
security: []
tags: []
paths:
  /boxes/{boxId}/android/packages:
    get:
      tags:
        - Android
      summary: List pkg
      description: >-
        Retrieves detailed information for all installed pkgs. This endpoint
        provides comprehensive pkg details.
      operationId: AndroidController_listAndroidPkg
      parameters:
        - name: boxId
          required: true
          in: path
          description: Box ID
          schema:
            example: c9bdc193-b54b-4ddb-a035-5ac0c598d32d
            type: string
        - name: pkgType
          required: false
          in: query
          description: system or thirdParty, default is thirdParty
          schema:
            default:
              - thirdParty
            example:
              - thirdParty
            type: array
            items:
              type: string
              enum:
                - system
                - thirdParty
        - name: runningFilter
          required: false
          in: query
          description: >-
            Filter pkgs by running status: running (show only running pkgs),
            notRunning (show only non-running pkgs). Default is all
          schema:
            default:
              - running
              - notRunning
            example:
              - running
              - notRunning
            type: array
            items:
              type: string
              enum:
                - running
                - notRunning
      responses:
        '200':
          description: Android pkg list
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListAndroidPkgResult'
      security:
        - bearer: []
      x-codeSamples:
        - lang: JavaScript
          source: |-
            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.operators) {
                console.log(`Pkg data: ${JSON.stringify(pkg.data, null, 2)}`);
              }
            }

            main();
        - lang: Python
          source: |-
            import os
            from gbox_sdk import GboxSDK

            def main():
                gbox_sdk = GboxSDK(api_key=os.environ["GBOX_API_KEY"])

                # Create an Android box
                box = gbox_sdk.create(type="android")

                # Get basic package information (metadata only)
                android_pkg_list_info = box.pkg.list_info()
                print(f"Android Pkg List: {android_pkg_list_info}")

                # Get package operators for interaction capabilities
                android_pkg_list = box.pkg.list()

                # Iterate through each package operator and perform actions
                print("Android Pkg Operators:")
                for pkg in android_pkg_list.operators:
                    print(f"Package: {pkg.data}")

            if __name__ == "__main__":
                main()
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"log\"\n\t\"os\"\n\n\t\"github.com/gbox/gbox-sdk-go\"\n)\n\nfunc main() {\n\tgboxSDK := gbox.NewGboxSDK(os.Getenv(\"GBOX_API_KEY\"))\n\n\t// Create an Android box\n\tbox, err := gboxSDK.Create(context.Background(), gbox.CreateRequest{Type: \"android\"})\n\tif err != nil {\n\t\tlog.Fatalf(\"Failed to create box: %v\", err)\n\t}\n\n\t// Get basic package information (metadata only)\n\tandroidPkgListInfo, err := box.Pkg.ListInfo(context.Background())\n\tif err != nil {\n\t\tlog.Fatalf(\"Failed to get package info: %v\", err)\n\t}\n\n\t// Format output similar to JavaScript version\n\tandroidPkgListInfoJSON, err := json.MarshalIndent(androidPkgListInfo, \"\", \"  \")\n\tif err != nil {\n\t\tlog.Fatalf(\"Failed to marshal package info: %v\", err)\n\t}\n\tfmt.Printf(\"Android Pkg List: %s\\n\", androidPkgListInfoJSON)\n\n\t// Get package operators for interaction capabilities\n\tandroidPkgList, err := box.Pkg.List(context.Background())\n\tif err != nil {\n\t\tlog.Fatalf(\"Failed to get package operators: %v\", err)\n\t}\n\n\t// Iterate through each package operator and perform actions\n\tfor _, pkg := range androidPkgList.Operators {\n\t\tpkgDataJSON, err := json.MarshalIndent(pkg.Data, \"\", \"  \")\n\t\tif err != nil {\n\t\t\tlog.Printf(\"Failed to marshal package data: %v\", err)\n\t\t\tcontinue\n\t\t}\n\t\tfmt.Printf(\"Pkg data: %s\\n\", pkgDataJSON)\n\t}\n}"
components:
  schemas:
    ListAndroidPkgResult:
      type: object
      properties:
        data:
          description: Android pkg list
          example:
            - 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
          type: array
          items:
            $ref: '#/components/schemas/AndroidPkg'
      title: List Android Pkg Result
      description: Response containing list of Android pkgs
      required:
        - data
    AndroidPkg:
      type: object
      properties:
        name:
          type: string
          description: Android pkg name
          example: Google Voice
        packageName:
          type: string
          description: Android package name
          example: com.google.android.apps.googlevoice
        apkPath:
          type: string
          description: Android apk path
          example: /data/app/com.google.android.apps.googlevoice-1/base.apk
        version:
          type: string
          description: Android pkg version
          example: 1.0.0
        pkgType:
          type: string
          description: system or thirdParty
          enum:
            - system
            - thirdParty
          example: thirdParty
        isRunning:
          type: boolean
          description: Whether the pkg is currently running
          example: false
      title: Android Pkg
      description: Android pkg information
      required:
        - name
        - packageName
        - apkPath
        - version
        - pkgType
        - isRunning
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: JWT
      type: http
      description: >-
        Enter your API Key in the format: Bearer <token>. Get it from
        https://gbox.ai

````