Running hammerhead (Nexus 5) AOSP build on emulator

1,260 views
Skip to first unread message

Julio Suarez

unread,
Dec 30, 2014, 11:22:48 PM12/30/14
to android-...@googlegroups.com
Hello,

I am able to compile AOSP for hammerhead, and flash it into a device. Everything works great. However, I would rather play around with the emulator to make my changes to the AOSP, and then eventually flash my actual device once I've made all my changes.

My understanding is you simply run "emulator" in the terminal after building the AOSP. This doesn't appear to be working. Note, I am able to boot with the AOSP_arm build, just not the hammerhead-userdebug.

Below is what I see when I run "emulator -verbose"
I don't see any errors, but not sure what to make of it. Maybe someone out there can help.

emulator:Found ANDROID_PRODUCT_OUT: /media/julio/FreeAgent750GB/android-5.0.1_r1/out/target/product/hammerhead
emulator
:Found build target architecture: arm
emulator
:Looking for emulator-arm to emulate 'arm' CPU
emulator
:Probing program: ./emulator64-arm
emulator
:Probing program: ./emulator-arm
emulator
:Probing path for: emulator64-arm
emulator
:Found target-specific emulator binary: /media/julio/FreeAgent750GB/android-5.0.1_r1/prebuilts/devtools/tools/emulator64-arm
emulator
:Probing for: /media/julio/FreeAgent750GB/android-5.0.1_r1/prebuilts/devtools/tools/libOpenglRender.so
emulator
:Probing for: /media/julio/FreeAgent750GB/android-5.0.1_r1/prebuilts/devtools/tools/lib/libOpenglRender.so
emulator
:Found OpenGLES emulation libraries in /media/julio/FreeAgent750GB/android-5.0.1_r1/prebuilts/devtools/tools/lib
emulator
:Setting LD_LIBRARY_PATH=/media/julio/FreeAgent750GB/android-5.0.1_r1/prebuilts/devtools/tools/lib
emulator
: found Android build root: /media/julio/FreeAgent750GB/android-5.0.1_r1
emulator
: found Android build out:  /media/julio/FreeAgent750GB/android-5.0.1_r1/out/target/product/hammerhead
emulator
: Read property file at /media/julio/FreeAgent750GB/android-5.0.1_r1/out/target/product/hammerhead/system/build.prop
emulator
: Cannot find boot properties file: /media/julio/FreeAgent750GB/android-5.0.1_r1/out/target/product/hammerhead/boot.prop

emulator
: Found target API sdkVersion: 21

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

emulator
: autoconfig: -data /media/julio/FreeAgent750GB/android-5.0.1_r1/out/target/product/hammerhead/userdata-qemu.img
emulator
: autoconfig: -initdata /media/julio/FreeAgent750GB/android-5.0.1_r1/out/target/product/hammerhead/userdata.img
emulator
: autoconfig: -cache /media/julio/FreeAgent750GB/android-5.0.1_r1/out/target/product/hammerhead/cache.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.path = /media/julio/FreeAgent750GB/android-5.0.1_r1/out/target/product/hammerhead/cache.img
  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 = /media/julio/FreeAgent750GB/android-5.0.1_r1/out/target/product/hammerhead/kernel
  kernel
.parameters =  android.checkjni=1
  kernel
.newDeviceNaming = no
  kernel
.supportsYaffs2 = no
  disk
.ramdisk.path = /media/julio/FreeAgent750GB/android-5.0.1_r1/out/target/product/hammerhead/ramdisk.img
  disk
.systemPartition.initPath = /media/julio/FreeAgent750GB/android-5.0.1_r1/out/target/product/hammerhead/system.img
  disk
.systemPartition.size = 356m
  disk
.dataPartition.path = /media/julio/FreeAgent750GB/android-5.0.1_r1/out/target/product/hammerhead/userdata-qemu.img
  disk
.dataPartition.size = 200m
  avd
.name = <build>
.
QEMU options list
:
emulator
: argv[00] = "/media/julio/FreeAgent750GB/android-5.0.1_r1/prebuilts/devtools/tools/emulator64-arm"
emulator
: argv[01] = "-android-hw"
emulator
: argv[02] = "/media/julio/FreeAgent750GB/android-5.0.1_r1/out/target/product/hammerhead/hardware-qemu.ini"
Concatenated QEMU options:
 
/media/julio/FreeAgent750GB/android-5.0.1_r1/prebuilts/devtools/tools/emulator64-arm -android-hw /media/julio/FreeAgent750GB/android-5.0.1_r1/out/target/product/hammerhead/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: /media/julio/FreeAgent750GB/android-5.0.1_r1/out/target/product/hammerhead/system.img
emulator
: system partition format: yaffs2
emulator
: Mapping 'system' partition image to /tmp/android-julio/emulator-3FiPJE
emulator
: nand_add_dev: system,size=0x16400000,file=/tmp/android-julio/emulator-3FiPJE,initfile=/media/julio/FreeAgent750GB/android-5.0.1_r1/out/target/product/hammerhead/system.img
emulator
: rounding devsize up to a full eraseunit, now 1640a000

emulator
: Probing userdata image file for partition type: /media/julio/FreeAgent750GB/android-5.0.1_r1/out/target/product/hammerhead/userdata-qemu.img
emulator
: userdata partition format: yaffs2
emulator
: nand_add_dev: userdata,size=0xc800000,file=/media/julio/FreeAgent750GB/android-5.0.1_r1/out/target/product/hammerhead/userdata-qemu.img
emulator
: rounding devsize up to a full eraseunit, now c810000

emulator
: cache partition format: ext4
emulator
: nand_add_dev: cache,size=0x4200000,file=/media/julio/FreeAgent750GB/android-5.0.1_r1/out/target/product/hammerhead/cache.img,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 android.checkjni=1 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
: sent '0012host:emulator:5555' to ADB server
emulator
: ping program: /media/julio/FreeAgent750GB/android-5.0.1_r1/prebuilts/devtools/tools/ddms
emulator
: ping command: /media/julio/FreeAgent750GB/android-5.0.1_r1/prebuilts/devtools/tools/ddms ping emulator standalone "Intel Open Source Technology Center" "Mesa DRI Intel(R) Ivybridge Desktop " "3.0 Mesa 10.1.3"


Glenn Kasten

unread,
Dec 31, 2014, 2:10:39 PM12/31/14
to android-...@googlegroups.com
For ARM-based emulator, lunch is aosp_arm
as described at https://source.android.com/source/building-running.html#choose-a-target
That section also has a partial list of lunches for real devices.
For a more complete list of lunches for real devices, see
https://source.android.com/source/building-devices.html#picking-and-building-the-configuration-that-matches-a-device
Note that one does not specify lunch for a real device,
then run that build on emulator.
...

Julio Suarez

unread,
Dec 31, 2014, 6:38:12 PM12/31/14
to android-...@googlegroups.com
Right,

What I'm saying is, if I do:
lunch aosp_hammerhead-userdebug
make
-j8
emulator

It doesn't work, I get what I posted in my original post.

If I do:
lunch
make
-j8
emulator

This works.

Also, what do you mean by one does not specify lunch for a real device? The emulator won't even try to launch if you don't select a build from the lunch menu.

Suresh Manchi

unread,
Jan 2, 2015, 7:25:41 AM1/2/15
to android-...@googlegroups.com
Hello,

lunch aosp_hammerhead-userdebug
make 
-j8

Above command sequence generates images that are meant to be flashed on real device ( Nexus5 here ) and will not work with emulator

lunch
make 
-j8
emulator


lunch command without any product or device option selects aosp_arm-eng by default and make command builds images meant for emulator and is the reason for working emulator.

Hope this gives better information about why emulator works in second case.

Julio Suarez

unread,
Jan 2, 2015, 2:47:13 PM1/2/15
to android-...@googlegroups.com
I see,

What it sounds like is that I need to make my changes to aosp_arm-eng, then when I have everything I want port it over to aosp_hammerhead-userdebug and flash. This is because I was making changes to hammeheard under the /device/lge//

Thanks,
Reply all
Reply to author
Forward
0 new messages