#!/bin/bash # Android Emulator Launch Script - High Performance Mode # Maximum performance with all optimizations enabled # Author: Matthew Raymer echo "🚀 Launching Android Emulator - High Performance Mode..." # Check if emulator command exists if ! command -v emulator &> /dev/null; then echo "❌ Error: Android emulator not found!" echo "Please install Android Studio and add emulator to PATH" exit 1 fi # Check if AVD exists if ! emulator -list-avds | grep -q "TimeSafari_Emulator"; then echo "❌ Error: TimeSafari_Emulator AVD not found!" echo "Available AVDs:" emulator -list-avds exit 1 fi # Check if NVIDIA drivers are available if ! ls /usr/share/vulkan/icd.d/nvidia_icd.json &> /dev/null; then echo "⚠️ Warning: NVIDIA Vulkan ICD not found" echo "GPU acceleration may not work optimally" fi echo "✅ Environment checks passed" echo "🎮 Starting emulator with maximum performance..." # Launch emulator with all performance optimizations QT_QPA_PLATFORM=xcb \ __NV_PRIME_RENDER_OFFLOAD=1 \ __GLX_VENDOR_LIBRARY_NAME=nvidia \ __VK_LAYER_NV_optimus=NVIDIA_only \ VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/nvidia_icd.json \ DRI_PRIME=1 \ emulator -avd TimeSafari_Emulator \ -gpu host \ -feature Vulkan \ -accel on \ -cores 8 \ -memory 6144 \ -no-boot-anim \ -no-snapshot-load \ -dns-server 8.8.8.8,1.1.1.1 \ -feature -Bluetooth \ -camera-back none \ -camera-front none \ -no-audio echo "🎯 Emulator launched with maximum performance!" echo "" echo "📋 High Performance Features:" echo " - Hardware GPU acceleration with Vulkan" echo " - NVIDIA GPU offloading" echo " - 8 CPU cores allocated (maximum)" echo " - 6GB RAM allocated (high memory)" echo " - Fast startup (no boot animation)" echo " - Clean state (no snapshot loading)" echo " - Fixed DNS servers (8.8.8.8, 1.1.1.1)" echo " - Disabled unnecessary features:" echo " - Bluetooth disabled" echo " - Cameras disabled" echo " - Audio disabled" echo "" echo "🔍 Performance Monitoring:" echo " - GPU usage: nvidia-smi dmon -s u" echo " - CPU usage: htop" echo " - Memory usage: free -h" echo "" echo "⚠️ Note: This configuration uses maximum resources" echo " - Ensure your system has sufficient RAM (16GB+ recommended)" echo " - Monitor system performance during use" echo " - Adjust -cores and -memory if system becomes unresponsive"