Skip to content

Instantly share code, notes, and snippets.

@hram
Created April 12, 2021 22:06
Show Gist options
  • Save hram/0d817ab701489dc917701cdabe024552 to your computer and use it in GitHub Desktop.
Save hram/0d817ab701489dc917701cdabe024552 to your computer and use it in GitHub Desktop.
yevgeny.khramov@srv8-footonto:~/HowTo$ kubectl logs default-9c656f70-0a30-4138-9b17-11da8d4846ae-765bf9fd6d-qvlxp
+ ./adb_redirect.sh
+ ./run_emulator.sh
+ [[ -z 29 ]]
+ emulator_name=emulator_29
+ sd_card_name=/sdcard.img
+ emulator_arguments=(-avd ${emulator_name} -sdcard ${sd_card_name} -verbose)
+ [[ '' == \t\r\u\e ]]
+ binary_name=qemu-system-x86_64-headless
+ echo 'Rendering: Headless swiftshader (software) rendering mode is enabled'
Rendering: Headless swiftshader (software) rendering mode is enabled
+ emulator_arguments+=(-no-window -gpu swiftshader_indirect)
+ [[ '' == \t\r\u\e ]]
+ echo 'Snapshots: Emulator will be ran with loading snapshot (for using emulator with snapshot on CI)'
+ emulator_arguments+=(-snapshot ci -no-snapshot-save)
+ emulator_arguments+=(-no-boot-anim -no-audio -partition-size 2048)
+ adb start-server
Snapshots: Emulator will be ran with loading snapshot (for using emulator with snapshot on CI)
* daemon not running; starting now at tcp:5037
* daemon started successfully
+ cd /opt/android-sdk/emulator
+ echo 'Run qemu-system-x86_64-headless binary for emulator emulator_29 with abi: x86 (Version: 29)'
Run qemu-system-x86_64-headless binary for emulator emulator_29 with abi: x86 (Version: 29)
+ echo no
+ ./qemu/linux-x86_64/qemu-system-x86_64-headless -avd emulator_29 -sdcard /sdcard.img -verbose -no-window -gpu swiftshader_indirect -snapshot ci -no-snapshot-save -no-boot-anim -no-audio -partition-size 2048
emulator: autoconfig: -skin 320x480
emulator: autoconfig: -skindir (null)
emulator: autoconfig: -kernel /opt/android-sdk/system-images/android-29/google_apis/x86_64//kernel-ranchu
emulator: Target arch = 'x86_64'
emulator: Auto-detect: Kernel image requires new device naming scheme.
emulator: Auto-detect: Kernel does not support YAFFS2 partitions.
emulator: autoconfig: -ramdisk /opt/android-sdk/system-images/android-29/google_apis/x86_64//ramdisk.img
emulator: Using initial system image: /opt/android-sdk/system-images/android-29/google_apis/x86_64//system.img
emulator: Using initial vendor image: /opt/android-sdk/system-images/android-29/google_apis/x86_64//vendor.img
emulator: autoconfig: -data /root/.android/avd/emulator_29.avd/userdata-qemu.img
emulator: autoconfig: -initdata /root/.android/avd/emulator_29.avd/userdata.img
emulator: autoconfig: -cache /root/.android/avd/emulator_29.avd/cache.img
emulator: Physical RAM size: 2048MB
emulator: VM heap size 0MB is below hardware specified minimum of 512MB,setting it to that value
emulator: System image is read only
emulator: Found 1 DNS servers: 10.254.0.10
emulator: VERBOSE: FeatureControlImpl.cpp:172: WARNING: unexpected system image feature string, emulator might not function correctly, please try updating the emulator.
emulator: VERBOSE: FeatureControlImpl.cpp:175: Unexpected feature list:
emulator: VERBOSE: FeatureControlImpl.cpp:177: Vulkan
emulator: VERBOSE: FeatureControlImpl.cpp:179:
emulator: found magic skin width=320 height=480 bpp=16
emulator: registered 'boot-properties' qemud service
emulator: Adding boot property: 'qemu.cmdline' = 'androidboot.logcat=v:* androidboot.consolepipe=qemu_pipe,pipe:logcat'
emulator: Adding boot property: 'qemu.logcat' = 'start'
emulator: CPU Acceleration: working
emulator: CPU Acceleration status: KVM (version 12) is installed and usable.
emulator: VERBOSE: AdbInterface.cpp:385: Found: 3 adb executables
emulator: VERBOSE: AdbInterface.cpp:387: Adb: /opt/android-sdk/platform-tools/adb
emulator: VERBOSE: AdbInterface.cpp:387: Adb: /opt/android-sdk/platform-tools/adb
emulator: VERBOSE: AdbInterface.cpp:387: Adb: /opt/android-sdk/platform-tools/adb
emulator: VERBOSE: AdbInterface.cpp:408: Path:/opt/android-sdk/platform-tools/adb protocol version: 41
emulator: VERBOSE: AdbInterface.cpp:408: Path:/opt/android-sdk/platform-tools/adb protocol version: 41
emulator: VERBOSE: AdbInterface.cpp:408: Path:/opt/android-sdk/platform-tools/adb protocol version: 41
emulator: GPU emulation enabled using 'swiftshader_indirect' mode
emulator: Initializing hardware OpenGLES emulation support
emulator: VERBOSE: MultiDisplay.cpp:304: create display 0
emulator: VERBOSE: MultiDisplay.cpp:393: setDisplayPose 0 x 0 y 0 w 320 h 480 dpi 0
emulator: Found 1 DNS servers: 10.254.0.10
Content of hardware configuration file:
hw.cpu.arch = x86_64
hw.cpu.ncore = 2
hw.ramSize = 2048
hw.screen = multi-touch
hw.mainKeys = true
hw.trackBall = true
hw.keyboard = false
hw.keyboard.lid = false
hw.keyboard.charmap = qwerty2
hw.dPad = false
hw.rotaryInput = false
hw.gsmModem = true
hw.gps = true
hw.battery = true
hw.accelerometer = false
hw.gyroscope = false
hw.audioInput = false
hw.audioOutput = false
hw.sdCard = true
hw.sdCard.path = /sdcard.img
disk.cachePartition = true
disk.cachePartition.path = /root/.android/avd/emulator_29.avd/cache.img
disk.cachePartition.size = 66m
test.quitAfterBootTimeOut = -1
test.delayAdbTillBootComplete = 0
test.monitorAdb = 0
hw.lcd.width = 320
hw.lcd.height = 480
hw.lcd.depth = 16
hw.lcd.density = 120
hw.lcd.backlight = true
hw.lcd.vsync = 60
hw.gltransport = pipe
hw.gltransport.asg.writeBufferSize = 1048576
hw.gltransport.asg.writeStepSize = 4096
hw.gltransport.asg.dataRingSize = 32768
hw.gltransport.drawFlushInterval = 800
hw.displayRegion.0.1.xOffset = -1
hw.displayRegion.0.1.yOffset = -1
hw.displayRegion.0.1.width = 0
hw.displayRegion.0.1.height = 0
hw.display1.width = 0
hw.display1.height = 0
hw.display1.density = 0
hw.display1.xOffset = -1
hw.display1.yOffset = -1
hw.display1.flag = 0
hw.display2.width = 0
hw.display2.height = 0
hw.display2.density = 0
hw.display2.xOffset = -1
hw.display2.yOffset = -1
hw.display2.flag = 0
hw.display3.width = 0
hw.display3.height = 0
hw.display3.density = 0
hw.display3.xOffset = -1
hw.display3.yOffset = -1
hw.display3.flag = 0
hw.gpu.enabled = true
hw.gpu.mode = swiftshader_indirect
hw.initialOrientation = portrait
hw.camera.back = emulated
hw.camera.front = none
vm.heapSize = 512
hw.sensors.light = false
hw.sensors.pressure = false
hw.sensors.humidity = false
hw.sensors.proximity = false
hw.sensors.magnetic_field = false
hw.sensors.magnetic_field_uncalibrated = false
hw.sensors.gyroscope_uncalibrated = false
hw.sensors.orientation = false
hw.sensors.temperature = false
hw.sensor.hinge = true
hw.sensor.hinge.count = 0
hw.sensor.hinge.type = 0
hw.sensor.hinge.sub_type = 0
hw.sensor.hinge.fold_to_displayRegion.0.1_at_posture = 1
hw.useext4 = true
hw.arc = false
hw.arc.autologin = false
kernel.path = /opt/android-sdk/system-images/android-29/google_apis/x86_64//kernel-ranchu
kernel.newDeviceNaming = yes
kernel.supportsYaffs2 = no
disk.ramdisk.path = /opt/android-sdk/system-images/android-29/google_apis/x86_64//ramdisk.img
disk.systemPartition.initPath = /opt/android-sdk/system-images/android-29/google_apis/x86_64//system.img
disk.systemPartition.size = 3083m
disk.vendorPartition.initPath = /opt/android-sdk/system-images/android-29/google_apis/x86_64//vendor.img
disk.vendorPartition.size = 2g
disk.dataPartition.path = /root/.android/avd/emulator_29.avd/userdata-qemu.img
disk.dataPartition.size = 2g
disk.encryptionKeyPartition.path = /root/.android/avd/emulator_29.avd/encryptionkey.img
PlayStore.enabled = false
avd.name = emulator_29
avd.id = emulator_29
fastboot.forceColdBoot = false
android.sdk.root = /opt/android-sdk
android.avd.home = /root/.android/avd
.
QEMU options list:
emulator: argv[00] = "./qemu/linux-x86_64/qemu-system-x86_64-headless"
emulator: argv[01] = "-dns-server"
emulator: argv[02] = "10.254.0.10"
emulator: argv[03] = "-no-audio"
emulator: argv[04] = "-loadvm"
emulator: argv[05] = "ci"
emulator: argv[06] = "-serial"
emulator: argv[07] = "null"
emulator: argv[08] = "-device"
emulator: argv[09] = "goldfish_pstore,addr=0xff018000,size=0x10000,file=/root/.android/avd/emulator_29.avd/data/misc/pstore/pstore.bin"
emulator: argv[10] = "-cpu"
emulator: argv[11] = "android64"
emulator: argv[12] = "-enable-kvm"
emulator: argv[13] = "-smp"
emulator: argv[14] = "cores=2"
emulator: argv[15] = "-m"
emulator: argv[16] = "2048"
emulator: argv[17] = "-lcd-density"
emulator: argv[18] = "120"
emulator: argv[19] = "-object"
emulator: argv[20] = "iothread,id=disk-iothread"
emulator: argv[21] = "-nodefaults"
emulator: argv[22] = "-kernel"
emulator: argv[23] = "/opt/android-sdk/system-images/android-29/google_apis/x86_64//kernel-ranchu"
emulator: argv[24] = "-initrd"
emulator: argv[25] = "/opt/android-sdk/system-images/android-29/google_apis/x86_64//ramdisk.img"
emulator: argv[26] = "-drive"
emulator: argv[27] = "if=none,index=0,id=system,if=none,file=/opt/android-sdk/system-images/android-29/google_apis/x86_64//system.img,read-only"
emulator: argv[28] = "-device"
emulator: argv[29] = "virtio-blk-pci,drive=system,iothread=disk-iothread,modern-pio-notify"
emulator: argv[30] = "-drive"
emulator: argv[31] = "if=none,index=1,id=cache,if=none,file=/root/.android/avd/emulator_29.avd/cache.img.qcow2,overlap-check=none,cache=unsafe,l2-cache-size=1048576"
emulator: argv[32] = "-device"
emulator: argv[33] = "virtio-blk-pci,drive=cache,iothread=disk-iothread,modern-pio-notify"
emulator: argv[34] = "-drive"
emulator: argv[35] = "if=none,index=2,id=userdata,if=none,file=/root/.android/avd/emulator_29.avd/userdata-qemu.img.qcow2,overlap-check=none,cache=unsafe,l2-cache-size=1048576"
emulator: argv[36] = "-device"
emulator: argv[37] = "virtio-blk-pci,drive=userdata,iothread=disk-iothread,modern-pio-notify"
emulator: argv[38] = "-drive"
emulator: argv[39] = "if=none,index=3,id=encrypt,if=none,file=/root/.android/avd/emulator_29.avd/encryptionkey.img.qcow2,overlap-check=none,cache=unsafe,l2-cache-size=1048576"
emulator: argv[40] = "-device"
emulator: argv[41] = "virtio-blk-pci,drive=encrypt,iothread=disk-iothread,modern-pio-notify"
emulator: argv[42] = "-drive"
emulator: argv[43] = "if=none,index=4,id=vendor,if=none,file=/opt/android-sdk/system-images/android-29/google_apis/x86_64//vendor.img,read-only"
emulator: argv[44] = "-device"
emulator: argv[45] = "virtio-blk-pci,drive=vendor,iothread=disk-iothread,modern-pio-notify"
emulator: argv[46] = "-drive"
emulator: argv[47] = "if=none,index=5,id=sdcard,if=none,file=/sdcard.img.qcow2,overlap-check=none,cache=unsafe,l2-cache-size=1048576"
emulator: argv[48] = "-device"
emulator: argv[49] = "virtio-blk-pci,drive=sdcard,iothread=disk-iothread,modern-pio-notify"
emulator: argv[50] = "-netdev"
emulator: argv[51] = "user,id=mynet"
emulator: argv[52] = "-device"
emulator: argv[53] = "virtio-net-pci,netdev=mynet"
emulator: argv[54] = "-device"
emulator: argv[55] = "virtio-rng-pci"
emulator: argv[56] = "-show-cursor"
emulator: argv[57] = "-device"
emulator: argv[58] = "virtio_input_multi_touch_pci_1"
emulator: argv[59] = "-device"
emulator: argv[60] = "virtio_input_multi_touch_pci_2"
emulator: argv[61] = "-device"
emulator: argv[62] = "virtio_input_multi_touch_pci_3"
emulator: argv[63] = "-device"
emulator: argv[64] = "virtio_input_multi_touch_pci_4"
emulator: argv[65] = "-device"
emulator: argv[66] = "virtio_input_multi_touch_pci_5"
emulator: argv[67] = "-device"
emulator: argv[68] = "virtio_input_multi_touch_pci_6"
emulator: argv[69] = "-device"
emulator: argv[70] = "virtio_input_multi_touch_pci_7"
emulator: argv[71] = "-device"
emulator: argv[72] = "virtio_input_multi_touch_pci_8"
emulator: argv[73] = "-device"
emulator: argv[74] = "virtio_input_multi_touch_pci_9"
emulator: argv[75] = "-device"
emulator: argv[76] = "virtio_input_multi_touch_pci_10"
emulator: argv[77] = "-device"
emulator: argv[78] = "virtio_input_multi_touch_pci_11"
emulator: argv[79] = "-L"
emulator: argv[80] = "lib/pc-bios"
emulator: argv[81] = "-soundhw"
emulator: argv[82] = "hda"
emulator: argv[83] = "-vga"
emulator: argv[84] = "none"
emulator: argv[85] = "-append"
emulator: argv[86] = "qemu=1 no_timer_check androidboot.hardware=ranchu androidboot.serialno=EMULATOR30X0X26X0 clocksource=pit no-kvmclock android.qemud=1 console=0 android.checkjni=1 android.bootanim=0 qemu.gles=1 qemu.settings.system.screen_off_timeout=2147483647 qemu.encrypt=1 qemu.vsync=60 qemu.gltransport=pipe qemu.gltransport.drawFlushInterval=800 qemu.opengles.version=131072 cma=260M@0-4G qemu.wifi=1 mac80211_hwsim.channels=2 loop.max_part=7 androidboot.vbmeta.size=4352 androidboot.vbmeta.hash_alg=sha256 androidboot.vbmeta.digest=9af534b972512e0650fc06dcd3a619d51520b67dc509067c1b9ab0d6227b010e androidboot.boot_devices=pci0000:00/0000:00:03.0 ramoops.mem_address=0xff018000 ramoops.mem_size=0x10000 memmap=0x10000$0xff018000 qemu.dalvik.vm.heapsize=512m"
emulator: argv[87] = "-android-hw"
emulator: argv[88] = "/root/.android/avd/emulator_29.avd/hardware-qemu.ini"
Concatenated QEMU options:
./qemu/linux-x86_64/qemu-system-x86_64-headless -dns-server 10.254.0.10 -no-audio -loadvm ci -serial null -device goldfish_pstore,addr=0xff018000,size=0x10000,file=/root/.android/avd/emulator_29.avd/data/misc/pstore/pstore.bin -cpu android64 -enable-kvm -smp cores=2 -m 2048 -lcd-density 120 -object iothread,id=disk-iothread -nodefaults -kernel /opt/android-sdk/system-images/android-29/google_apis/x86_64//kernel-ranchu -initrd /opt/android-sdk/system-images/android-29/google_apis/x86_64//ramdisk.img -drive if=none,index=0,id=system,if=none,file=/opt/android-sdk/system-images/android-29/google_apis/x86_64//system.img,read-only -device virtio-blk-pci,drive=system,iothread=disk-iothread,modern-pio-notify -drive if=none,index=1,id=cache,if=none,file=/root/.android/avd/emulator_29.avd/cache.img.qcow2,overlap-check=none,cache=unsafe,l2-cache-size=1048576 -device virtio-blk-pci,drive=cache,iothread=disk-iothread,modern-pio-notify -drive if=none,index=2,id=userdata,if=none,file=/root/.android/avd/emulator_29.avd/userdata-qemu.img.qcow2,overlap-check=none,cache=unsafe,l2-cache-size=1048576 -device virtio-blk-pci,drive=userdata,iothread=disk-iothread,modern-pio-notify -drive if=none,index=3,id=encrypt,if=none,file=/root/.android/avd/emulator_29.avd/encryptionkey.img.qcow2,overlap-check=none,cache=unsafe,l2-cache-size=1048576 -device virtio-blk-pci,drive=encrypt,iothread=disk-iothread,modern-pio-notify -drive if=none,index=4,id=vendor,if=none,file=/opt/android-sdk/system-images/android-29/google_apis/x86_64//vendor.img,read-only -device virtio-blk-pci,drive=vendor,iothread=disk-iothread,modern-pio-notify -drive if=none,index=5,id=sdcard,if=none,file=/sdcard.img.qcow2,overlap-check=none,cache=unsafe,l2-cache-size=1048576 -device virtio-blk-pci,drive=sdcard,iothread=disk-iothread,modern-pio-notify -netdev user,id=mynet -device virtio-net-pci,netdev=mynet -device virtio-rng-pci -show-cursor -device virtio_input_multi_touch_pci_1 -device virtio_input_multi_touch_pci_2 -device virtio_input_multi_touch_pci_3 -device virtio_input_multi_touch_pci_4 -device virtio_input_multi_touch_pci_5 -device virtio_input_multi_touch_pci_6 -device virtio_input_multi_touch_pci_7 -device virtio_input_multi_touch_pci_8 -device virtio_input_multi_touch_pci_9 -device virtio_input_multi_touch_pci_10 -device virtio_input_multi_touch_pci_11 -L lib/pc-bios -soundhw hda -vga none -append 'qemu=1 no_timer_check androidboot.hardware=ranchu androidboot.serialno=EMULATOR30X0X26X0 clocksource=pit no-kvmclock android.qemud=1 console=0 android.checkjni=1 android.bootanim=0 qemu.gles=1 qemu.settings.system.screen_off_timeout=2147483647 qemu.encrypt=1 qemu.vsync=60 qemu.gltransport=pipe qemu.gltransport.drawFlushInterval=800 qemu.opengles.version=131072 cma=260M@0-4G qemu.wifi=1 mac80211_hwsim.channels=2 loop.max_part=7 androidboot.vbmeta.size=4352 androidboot.vbmeta.hash_alg=sha256 androidboot.vbmeta.digest=9af534b972512e0650fc06dcd3a619d51520b67dc509067c1b9ab0d6227b010e androidboot.boot_devices=pci0000:00/0000:00:03.0 ramoops.mem_address=0xff018000 ramoops.mem_size=0x10000 memmap=0x10000$0xff018000 qemu.dalvik.vm.heapsize=512m' -android-hw /root/.android/avd/emulator_29.avd/hardware-qemu.ini
emulator: Android qemu version 30.0.26.0 (build_id 6755297) (CL:N/A)
emulator: Starting QEMU main loop
emulator: Adding boot property: 'ro.opengles.version' = '131072'
emulator: Adding boot property: 'qemu.sf.fake_camera' = 'back'
emulator: Adding boot property: 'dalvik.vm.heapsize' = '512m'
emulator: Adding boot property: 'qemu.hw.mainkeys' = '1'
emulator: Adding boot property: 'qemu.sf.lcd_density' = '120'
emulator: goldfish_events.have-dpad: false
emulator: goldfish_events.have-trackball: true
emulator: goldfish_events.have-camera: true
emulator: goldfish_events.have-keyboard: false
emulator: goldfish_events.have-lidswitch: false
emulator: goldfish_events.have-tabletmode: false
emulator: goldfish_events.have-touch: false
emulator: goldfish_events.have-multitouch: false
emulator: control console listening on port 5554, ADB on port 5555
Not using any http proxy
emulator: Adding boot property: 'qemu.timezone' = 'Unknown/Unknown'
emulator: android_hw_fingerprint_init: fingerprint qemud listen service initialized
### WARNING: could not find /usr/share/zoneinfo/ directory. unable to determine host timezone
WARNING. Using fallback path for the emulator registration directory.
emulator: VERBOSE: GrpcServices.cpp:279: Started GRPC server at 127.0.0.1:8554, security: Local
emulator: emulator_window_fb_rotate
emulator: VERBOSE: MultiDisplay.cpp:689: config multidisplay with config.ini 0x0 0x0 0x0
emulator: No acpi ini file provided, using default
emulator: Adding boot property: 'qemu.cmdline' = 'androidboot.logcat=v:* androidboot.consolepipe=qemu_pipe,pipe:logcat'
emulator: Adding boot property: 'qemu.logcat' = 'start'
emulator: Adding boot property: 'ro.opengles.version' = '131072'
emulator: Adding boot property: 'qemu.sf.fake_camera' = 'back'
emulator: Adding boot property: 'dalvik.vm.heapsize' = '512m'
emulator: Adding boot property: 'qemu.hw.mainkeys' = '1'
emulator: Adding boot property: 'qemu.sf.lcd_density' = '120'
emulator: Adding boot property: 'qemu.timezone' = 'Unknown/Unknown'
emulator: _hwFingerprint_connect: connect finger print listen is called
### WARNING: could not find /usr/share/zoneinfo/ directory. unable to determine host timezone
qemu-system-x86_64-headless: warning: TSC frequency mismatch between VM (2596991 kHz) and host (2697124 kHz), and TSC scaling unavailable
qemu-system-x86_64-headless: warning: TSC frequency mismatch between VM (2596991 kHz) and host (2697124 kHz), and TSC scaling unavailable
emulator: onGuestSendCommand: [0xfb5a4e0] Adb connected, start proxing data
### WARNING: could not find /usr/share/zoneinfo/ directory. unable to determine host timezone
./run_emulator.sh: line 53: 23 Done echo "no"
24 Segmentation fault (core dumped) | ./qemu/linux-x86_64/${binary_name} "${emulator_arguments[@]}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment