Skip to content

Instantly share code, notes, and snippets.

@qti3e
Created September 29, 2017 07:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save qti3e/469d5a0b51f8e9af7f072f7e70ae7361 to your computer and use it in GitHub Desktop.
Save qti3e/469d5a0b51f8e9af7f072f7e70ae7361 to your computer and use it in GitHub Desktop.
Script that I use to run Android Emulator without making my system slow
#!/bin/bash
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root"
exit 1
fi
export HOME=/home/qti3e/
cd /home/qti3e/Android/Sdk/tools/
./emulator @Nexus_5X_API_26 -gpu on &> /dev/null &
sleep 5
renice -n -30 -p $(ps aux | grep "@Nexus_5X_API_26" | grep -v grep | head -n 1 | awk '{print $2}')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment