Skip to content

Instantly share code, notes, and snippets.

@jhonatasfender
Last active February 2, 2024 08:14
Show Gist options
  • Save jhonatasfender/f6fd2d0bf07499e1047c8c7449b831da to your computer and use it in GitHub Desktop.
Save jhonatasfender/f6fd2d0bf07499e1047c8c7449b831da to your computer and use it in GitHub Desktop.
enulator android
# first
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
# second
repo init -u https://android.googlesource.com/platform/manifest
#!/usr/bin/env bash
ANDROID_BUILD_OUT=/var/www/android/out
ANDROID_SDK_LINUX=/opt/android-studio/sdk
# ANDROID_BUILD=${ANDROID_BUILD_OUT}/target/product/generic_x86_64
ANDROID_BUILD=${ANDROID_BUILD_OUT}/target/product/generic
sudo chmod -R 777 /dev/kvm
USE_CCACHE=1 CCACHE_DIR=ccache make -j$(nproc --all)
source build/envsetup.sh
set_stuff_for_environment
./prebuilts/android-emulator/linux-x86_64/emulator \
-avd AOSP -debug-init -logcat '*:v' -verbose \
-sysdir ${ANDROID_BUILD} \
-system ${ANDROID_BUILD}/system.img \
-ramdisk ${ANDROID_BUILD}/ramdisk.img \
-data ${ANDROID_BUILD}/userdata.img \
-kernel prebuilt/android-arm/kernel/kernel-qemu \
-partition-size 2000 \
-memory 2000 \
# -kernel ./prebuilts/qemu-kernel/x86_64/kernel-qemu \
# out/host/linux-x86/bin/emulator
# -sysdir out/target/product/generic/
# -system out/target/product/generic/system.img
# -ramdisk out/target/product/generic/ramdisk.img
# -data out/target/product/generic/userdata.img
# -kernel prebuilt/android-arm/kernel/kernel-qemu
# -sdcard sdcard.img
# -skindir sdk/emulator/skins
# -skin WVGA800
# -scale 0.7
# -memory 512
# -partition-size 1024
# -debug-init -logcat '*:v' -verbose \
# -kernel ./prebuilts/qemu-kernel/x86_64/3.10/kernel-qemu \
# -kernel ./prebuilts/qemu-kernel/x86_64/kernel-qemu \
# -kernel ./prebuilts/qemu-kernel/x86_64/ranchu/kernel-qemu \
# -kernel ./prebuilts/qemu-kernel/arm/3.10/kernel-qemu \
# -kernel ./prebuilts/qemu-kernel/arm/kernel-qemu \
# -kernel ./prebuilts/qemu-kernel/arm/ranchu/kernel-qemu \
# -kernel ./prebuilts/qemu-kernel/arm64/3.10/kernel-qemu \
# -kernel ./prebuilts/qemu-kernel/arm64/kernel-qemu \
# -kernel ./prebuilts/qemu-kernel/arm64/ranchu/kernel-qemu \
# -kernel ./prebuilts/qemu-kernel/mips/3.10/kernel-qemu \
# -kernel ./prebuilts/qemu-kernel/mips/kernel-qemu \
# -kernel ./prebuilts/qemu-kernel/mips/ranchu/kernel-qemu \
# -kernel ./prebuilts/qemu-kernel/mips64/3.10/kernel-qemu \
# -kernel ./prebuilts/qemu-kernel/mips64/kernel-qemu \
# -kernel ./prebuilts/qemu-kernel/mips64/ranchu/kernel-qemu \
# -kernel ./prebuilts/qemu-kernel/x86/3.10/kernel-qemu \
# -kernel ./prebuilts/qemu-kernel/x86/kernel-qemu \
# -kernel ./prebuilts/qemu-kernel/x86/ranchu/kernel-qemu \
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment