build cm12.1 for nexus 7 successfully, but emulator black screen.

145 views
Skip to first unread message

peng fei

unread,
Oct 28, 2016, 2:56:52 AM10/28/16
to Android emulator development
I download cm12.1 and compile Nexus7 2012(grouper) successfully  on my computer.
start emulator but black screen
$ cd new kernel dir.
$ make ARCH=arm cyanogenmod_grouper_defconfig
modify Makefile
# ARCH ?= $(SUBARCH)
ARCH ?= arm
# CROSS_COMPILE ?= $(CONFIG_CROSS_COMPILE:"%"=%)
CROSS_COMPILE ?= arm-eabi-

# LDFLAGS_BUILD_ID = $(patsubst -Wl$(comma)%,%,\
# $(call cc-ldoption, -Wl$(comma)--build-id,))
LDFLAGS_BUILD_ID =
$ make

return to the cm12.1 for Nexus7 dir.

[pengfei@pengfei ~]$ cd android/system/
[pengfei@pengfei system]$ source build/envsetup.sh
including device/asus/grouper/vendorsetup.sh
including device/generic/mini-emulator-arm64/vendorsetup.sh
including device/generic/mini-emulator-x86_64/vendorsetup.sh
including device/generic/mini-emulator-armv7-a-neon/vendorsetup.sh
including device/generic/mini-emulator-mips/vendorsetup.sh
including device/generic/mini-emulator-x86/vendorsetup.sh
including vendor/cm/vendorsetup.sh
including sdk/bash_completion/adb.bash
including vendor/cm/bash_completion/git.bash
including vendor/cm/bash_completion/repo.bash
[pengfei@pengfei system]$ breakfast grouper
including vendor/cm/vendorsetup.sh
Looking for dependencies

============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=5.1.1
CM_VERSION=12.1-20161020-UNOFFICIAL-grouper
TARGET_PRODUCT=cm_grouper
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a-neon
TARGET_CPU_VARIANT=cortex-a9
TARGET_2ND_ARCH=
TARGET_2ND_ARCH_VARIANT=
TARGET_2ND_CPU_VARIANT=
HOST_ARCH=x86_64
HOST_OS=linux
HOST_OS_EXTRA=Linux-3.17.4-x86_64-with-fedora-21-Twenty_One
HOST_BUILD_TYPE=release
BUILD_ID=LMY49J
OUT_DIR=/home/pengfei/android/system/out
============================================

[pengfei@pengfei system]$ emulator -kernel /home/pengfei/android/kernel_asus_grouper-cm-12.1/arch/arm/boot/zImage  -system /home/pengfei/android/system/out/target/product/grouper/system.img -data /home/pengfei/android/system/out/target/product/grouper/userdata-qemu.img -ramdisk /home/pengfei/android/system/out/target/product/grouper/ramdisk.img -debug-init -logcat '*:v'
emulator: found Android build root: /home/pengfei/android/system
emulator: found Android build out:  /home/pengfei/android/system/out/target/product/grouper
emulator: Read property file at /home/pengfei/android/system/out/target/product/grouper/system/build.prop
emulator: Cannot find boot properties file: /home/pengfei/android/system/out/target/product/grouper/boot.prop

emulator: Found target API sdkVersion: 22

emulator: virtual device has no config file - no problem
emulator: using core hw config path: /home/pengfei/android/system/out/target/product/grouper/hardware-qemu.ini
emulator: found skin-specific hardware.ini: /home/pengfei/android/system/development/tools/emulator/skins/HVGA/hardware.ini
emulator: autoconfig: -skin HVGA
emulator: autoconfig: -skindir /home/pengfei/android/system/development/tools/emulator/skins
emulator: found skin-specific hardware.ini: /home/pengfei/android/system/development/tools/emulator/skins/HVGA/hardware.ini
emulator: keyset loaded from: /home/pengfei/.android/default.keyset
emulator: trying to load skin file '/home/pengfei/android/system/development/tools/emulator/skins/HVGA/layout'
emulator: skin network speed: 'full'
emulator: skin network delay: 'none'
emulator: Auto-detect: Kernel image requires legacy device naming scheme.
emulator: Auto-detect: Kernel does not support YAFFS2 partitions.
emulator: autoconfig: -sysdir /home/pengfei/android/system/out/target/product/grouper
emulator: Using initial system image: /home/pengfei/android/system/out/target/product/grouper/system.img
emulator: WARNING: system partition size adjusted to match image file (369 MB > 200 MB)

emulator: autoconfig: -initdata /home/pengfei/android/system/out/target/product/grouper/userdata.img
emulator: Physical RAM size: 512MB

emulator: WARNING: CPU acceleration only works with x86/x86_64 system images.
emulator: Auto-config: -qemu -cpu cortex-a8
Content of hardware configuration file:
  hw.cpu.arch = arm
  hw.cpu.model = cortex-a8
  hw.ramSize = 512
  hw.screen = touch
  hw.mainKeys = yes
  hw.trackBall = yes
  hw.keyboard = no
  hw.keyboard.lid = no
  hw.keyboard.charmap = qwerty2
  hw.dPad = yes
  hw.gsmModem = yes
  hw.gps = yes
  hw.battery = yes
  hw.accelerometer = yes
  hw.audioInput = yes
  hw.audioOutput = yes
  hw.sdCard = yes
  disk.cachePartition = yes
  disk.cachePartition.size = 66m
  hw.lcd.width = 320
  hw.lcd.height = 480
  hw.lcd.depth = 16
  hw.lcd.density = 160
  hw.lcd.backlight = yes
  hw.gpu.enabled = no
  hw.initialOrientation = portrait
  hw.camera.back = emulated
  hw.camera.front = none
  vm.heapSize = 48
  hw.sensors.proximity = yes
  hw.sensors.magnetic_field = yes
  hw.sensors.orientation = yes
  hw.sensors.temperature = yes
  hw.useext4 = yes
  kernel.path = /home/pengfei/android/kernel_asus_grouper-cm-12.1/arch/arm/boot/zImage
  kernel.parameters =  androidboot.console=ttyS2 android.checkjni=1 androidboot.logcat=*:v
  kernel.newDeviceNaming = no
  kernel.supportsYaffs2 = no
  disk.ramdisk.path = /home/pengfei/android/system/out/target/product/grouper/ramdisk.img
  disk.systemPartition.initPath = /home/pengfei/android/system/out/target/product/grouper/system.img
  disk.systemPartition.size = 369m
  disk.dataPartition.path = /home/pengfei/android/system/out/target/product/grouper/userdata-qemu.img
  disk.dataPartition.size = 200m
  avd.name = <build>
.
QEMU options list:
emulator: argv[00] = "/home/pengfei/android/system/prebuilts/android-emulator/linux-x86_64/emulator64-arm"
emulator: argv[01] = "-serial"
emulator: argv[02] = "stdio"
emulator: argv[03] = "-android-hw"
emulator: argv[04] = "/home/pengfei/android/system/out/target/product/grouper/hardware-qemu.ini"
Concatenated QEMU options:
 /home/pengfei/android/system/prebuilts/android-emulator/linux-x86_64/emulator64-arm -serial stdio -android-hw /home/pengfei/android/system/out/target/product/grouper/hardware-qemu.ini
emulator: registered 'boot-properties' qemud service
emulator: Using kernel serial device prefix: ttyS
emulator: No fstab.goldfish file in ramdisk image
emulator: Probing system image file for partition type: /home/pengfei/android/system/out/target/product/grouper/system.img
emulator: system partition format: yaffs2
emulator: Mapping 'system' partition image to /tmp/android-pengfei/emulator-rOi6Q7
emulator: nand_add_dev: system,size=0x17100000,file=/tmp/android-pengfei/emulator-rOi6Q7,initfile=/home/pengfei/android/system/out/target/product/grouper/system.img
emulator: rounding devsize up to a full eraseunit, now 1710f000

emulator: Probing userdata image file for partition type: /home/pengfei/android/system/out/target/product/grouper/userdata-qemu.img
emulator: userdata partition format: yaffs2
emulator: nand_add_dev: userdata,size=0xc800000,file=/home/pengfei/android/system/out/target/product/grouper/userdata-qemu.img
emulator: rounding devsize up to a full eraseunit, now c810000

emulator: cache partition format: ext4
emulator: Mapping 'cache' partition image to /tmp/android-pengfei/emulator-HIG0IX
emulator: Creating empty cache partition image at: /tmp/android-pengfei/emulator-HIG0IX
Creating filesystem with parameters:
    Size: 69206016
    Block size: 4096
    Blocks per group: 32768
    Inodes per group: 4224
    Inode size: 256
    Journal blocks: 1024
    Label: 
    Blocks: 16896
    Block groups: 1
    Reserved block group size: 7
Created filesystem with 11/4224 inodes and 1302/16896 blocks
emulator: nand_add_dev: cache,size=0x4200000,file=/tmp/android-pengfei/emulator-HIG0IX,pagesize=512,extrasize=0
emulator: registered 'boot-properties' qemud service
emulator: Adding boot property: 'dalvik.vm.heapsize' = '48m'
emulator: Adding boot property: 'ro.config.low_ram' = 'true'
emulator: Adding boot property: 'qemu.sf.lcd_density' = '160'
emulator: Adding boot property: 'qemu.hw.mainkeys' = '1'
emulator: Adding boot property: 'qemu.sf.fake_camera' = 'back'
emulator: Initializing hardware OpenGLES emulation support
emulator: Kernel parameters: qemu.gles=0 qemu=1 console=ttyS0 android.qemud=ttyS1 androidboot.console=ttyS2 android.checkjni=1 androidboot.logcat=*:v ndns=1
emulator: autoconfig: -scale 1
emulator: Forcing ro.adb.qemud to "0".
emulator: control console listening on port 5554, ADB on port 5555
emulator: can't connect to ADB server: Transport endpoint is not connected
emulator: ping program: /home/pengfei/android/system/prebuilts/android-emulator/linux-x86_64/ddms


Ye Roger

unread,
Nov 1, 2016, 4:04:52 AM11/1/16
to Android emulator development
What you did it does not make sense. Why you want to run a non-emulator image on emulator? You should run that image on Nexus 7 (grouper) hardware. Do you know what you are doing?


Reply all
Reply to author
Forward
0 new messages