Skip to main content

Quickstart

Get started with Null Autos in under 5 minutes. This guide will walk you through creating your first virtual Android device.

Prerequisites

  • A Null Autos account (sign up here)
  • Basic familiarity with command line tools
  • (Optional) ADB (Android Debug Bridge) installed

Step 1: Get Your API Key

  1. Log in to the Null Autos Console
  2. Navigate to Settings → API Keys
  3. Click Create API Key
  4. Copy your API key (you'll need it in the next step)

⚠️ Important: Store your API key securely. Don't commit it to version control.

Step 2: Install the CLI

The Ctrl CLI is the easiest way to interact with Null Autos.

Using npm

npm install -g @null-autos/ctrl-cli

Using yarn

yarn global add @null-autos/ctrl-cli

Verify Installation

ctrl --version

Step 3: Authenticate

Set your API key as an environment variable:

export CTRL_API_KEY="your-api-key-here"

Or authenticate via the CLI:

ctrl login

Step 4: Create Your First Device

Using the CLI

ctrl devices create \
--android-version 14 \
--device-type phone \
--name my-first-device

Expected output:

Creating device...
✓ Device created successfully!

Device ID: dev_abc123xyz
Android Version: 14.0
Status: booting

Waiting for device to boot...
✓ Device is ready!

ADB Endpoint: adb connect dev-abc123.null.autos:5555
Web Console: https://console.null.autos/devices/dev_abc123xyz

Using the Web Console

  1. Go to console.null.autos
  2. Click Create Device
  3. Select configuration:
    • Android Version: 14
    • Device Type: Phone
    • Profile: Default
  4. Click Create
  5. Wait ~30 seconds for boot

Step 5: Connect to Your Device

Using ADB

# Connect to device
adb connect dev-abc123.null.autos:5555

# Verify connection
adb devices

# Run a command
adb shell getprop ro.build.version.release

Using the Web Console

  1. Click on your device in the console
  2. Click Open Console
  3. Interact with device in browser

Step 6: Install and Run an App

# Install an APK
adb install path/to/your-app.apk

# Launch the app
adb shell am start -n com.example.yourapp/.MainActivity

# View logs
adb logcat

Step 7: Clean Up

When you're done, delete the device:

# Using CLI
ctrl devices delete my-first-device

# Or delete all devices
ctrl devices delete --all

Or via the web console:

  1. Select your device
  2. Click Delete Device
  3. Confirm

Next Steps

Learn the Basics

Explore Advanced Features

Try Example Projects

# Clone examples repository
git clone https://github.com/null-autos/examples.git
cd examples

# Run automated test example
cd automated-testing
npm install
npm run test

Common Issues

Device Won't Boot

Problem: Device stuck in "booting" status

Solution:

  • Wait up to 2 minutes for first boot
  • Check device logs: ctrl devices logs my-first-device
  • Try a different Android version
  • Contact support if issue persists

ADB Connection Failed

Problem: adb connect fails

Solution:

# Restart ADB server
adb kill-server
adb start-server

# Try connecting again
adb connect dev-abc123.null.autos:5555

API Key Issues

Problem: "Authentication failed" error

Solution:

  • Verify API key is correct
  • Check that key hasn't expired
  • Ensure proper environment variable: echo $CTRL_API_KEY
  • Re-authenticate: ctrl login

Getting Help

Code Examples

JavaScript/TypeScript

import { CtrlClient } from '@null-autos/ctrl-sdk';

const ctrl = new CtrlClient({
apiKey: process.env.CTRL_API_KEY,
});

async function main() {
// Create device
const device = await ctrl.devices.create({
androidVersion: '14.0',
deviceType: 'phone',
});

console.log(`Device created: ${device.id}`);

// Wait for ready
await device.waitForReady();

// Execute command
await device.adb.shell('input text "Hello World"');

// Cleanup
await device.delete();
}

main();

Python

from null_autos import CtrlClient
import os

ctrl = CtrlClient(api_key=os.environ['CTRL_API_KEY'])

# Create device
device = ctrl.devices.create(
android_version='14.0',
device_type='phone'
)

print(f'Device created: {device.id}')

# Wait for ready
device.wait_for_ready()

# Execute command
device.adb.shell('input text "Hello World"')

# Cleanup
device.delete()

cURL (REST API)

# Create device
curl -X POST https://api.null.autos/v1/devices \
-H "Authorization: Bearer $CTRL_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"androidVersion": "14.0",
"deviceType": "phone",
"name": "api-test-device"
}'

# Get device status
curl https://api.null.autos/v1/devices/dev_abc123 \
-H "Authorization: Bearer $CTRL_API_KEY"

# Delete device
curl -X DELETE https://api.null.autos/v1/devices/dev_abc123 \
-H "Authorization: Bearer $CTRL_API_KEY"

What's Next?

Now that you've created your first device, explore more capabilities:

  1. Automate Testing: Integrate with your CI/CD pipeline
  2. Scale Up: Create multiple devices in parallel
  3. Customize: Create custom device profiles
  4. Monitor: Set up monitoring and alerts
  5. Optimize: Learn performance best practices

Happy testing! 🚀