Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- * Tips
- - if you want start the all over, delete /opt/android-sdk/
- - To update the emulator version(other pre-build number), delete the /emulator and start procedure over from the middle.
- * Step 1
- sudo apt update && sudo apt upgrade
- sudo apt install default-jdk python3-pip repo python-is-python3 unzip libpcre2-dev adb
- ## i did not include repo because i was told there was no repo
- * Step 2
- wget https://dl.google.com/android/repository/commandlinetools-linux-11076708_latest.zip
- ## i'll use the latest version "commandlinetools-linux"
- unzip commandlinetools-linux-11076708_latest.zip -d android-sdk
- sudo mv android-sdk /opt/
- mkdir /opt/android-sdk/cmdline-tools/latest
- mv /opt/android-sdk/cmdline-tools/* /opt/android-sdk/cmdline-tools/latest
- echo "export ANDROID_SDK_ROOT=/opt/android-sdk" >> ~/.bashrc
- echo "export ANDROID_HOME=/opt/android-sdk" >> ~/.bashrc
- echo "export ANDROID_EMULATOR_WAIT_TIME_BEFORE_KILL=60" >> ~/.bashrc
- echo "export PATH=$PATH:/opt/android-sdk/cmdline-tools/latest/bin" >> ~/.bashrc
- source ~/.bashrc
- sdkmanager --update
- sdkmanager --licenses
- ## Appect All licenses
- * Step 3
- cd /opt/android-sdk/
- ## download https://ci.android.com/builds/submitted/11435509/emulator-linux_aarch64/latest/sdk-repo-linux_aarch64-emulator-11435509.zip and rename "emulator.zip" and copy here
- ## i'll use 11435509 build
- unzip emulator.zip
- cd emulator
- cat source.properties
- ## memo the Pkg.Revision = 34.2.8
- vi /opt/android-sdk/emulator/package.xml
- ## copy and paste this text and edit version: <major>, <minor>, <micro> and save text => https://chromium.googlesource.com/android_tools/+/refs/heads/master/sdk/emulator/package.xml
- * Step 4
- sdkmanager "system-images;android-28;google_apis;arm64-v8a"
- ## i'll use API28(Android9.0)
- avdmanager -v create avd -f -n MyAVD -k "system-images;android-28;google_apis;arm64-v8a" -p "/opt/android-sdk/avd"
- ## [no]
- * Step 5
- mkdir /opt/android-sdk/platforms
- mkdir /opt/android-sdk/platform-tools
- echo "Vulkan = on" >> ~/.android/advancedFeatures.ini
- ## Turn on ShaderTranslator in case it is used. (Swiftshader cases an error, but it's only turned auto off, so it's not a problem)
- echo "GLDirectMem = on" >> ~/.android/advancedFeatures.ini
- * Step 6
- sudo gpasswd -a $USER kvm
- ##logout and re-login
- /opt/android-sdk/emulator/emulator -accel-check
- * Step 7
- /opt/android-sdk/emulator/emulator @MyAVD -cores 4 -lowram -memory 2048 -gpu swiftshader -ports 5554,5555 -skip-adb-auth -no-boot-anim -no-snapshot -no-metrics -qemu -machine gic-version=2
- ## INFO | Boot completed in 126014 ms
- ## The emulator crash message appears, but if the optional log is left blank and [Don't Send] is pressed, the emulator will continue to run.
- ## The error message also appears when the emulator is deleted.
Advertisement
Comments
-
- Original References:https://gist.github.com/atyachin/2f7c6054c4cd6945397165a23623987d
- Thank you for atyachin
Add Comment
Please, Sign In to add comment
Advertisement