Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,807,727 Members 51,920 Now Online
XDA Developers Android and Mobile Development Forum

[Q] Test minimal Android build on emulator

Tip us?
 
lokicall
Old
#1  
Junior Member - OP
Thanks Meter 0
Posts: 2
Join Date: Sep 2008
Default [Q] Test minimal Android build on emulator

I build a minimal android distribution using a modified mako build(with embedded.mk instead of full aosp). When i tried to test this image on the emulator i run into the problem that the kernel cannot mount my system partition[1]. I started the emulator with "emulator -show-kernel -data userdata.img -ramdisk ramdisk.img @nexus4"(both images are from my build and the configuration is for nexus4). So how can i test my custom build?

[1]
Quote:
serial0 console

Uncompressing Linux... done, booting the kernel.

Booting Linux on physical CPU 0
Initializing cgroup subsys cpu
Linux version 3.4.0-gd853d22 (nnk@nnk.mtv.corp.google.com) (gcc version 4.6.x-google 20120106 (prerelease) (GCC) ) #1 PREEMPT Tue Jul 9 17:46:46 PDT 2013
CPU: ARMv7 Processor [410fc080] revision 0 (ARMv7), cr=10c53c7d
CPU: PIPT / VIPT nonaliasing data cache, VIPT nonaliasing instruction cache
Machine: Goldfish
Truncating RAM at 00000000-772fffff to -2f7fffff (vmalloc region overlap).
Memory policy: ECC disabled, Data cache writeback
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 193040
Kernel command line: qemu.gles=0 qemu=1 console=ttyS0 android.qemud=ttyS1 android.checkjni=1 ndns=2
PID hash table entries: 4096 (order: 2, 16384 bytes)
Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
Memory: 760MB = 760MB total
Memory: 764912k/764912k available, 13328k reserved, 0K highmem
Virtual kernel memory layout:
vector : 0xffff0000 - 0xffff1000 ( 4 kB)
fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB)
vmalloc : 0xf0000000 - 0xff000000 ( 240 MB)
lowmem : 0xc0000000 - 0xef800000 ( 760 MB)
.text : 0xc0008000 - 0xc044a190 (4361 kB)
.init : 0xc044b000 - 0xc0470000 ( 148 kB)
.data : 0xc0470000 - 0xc04a8fc0 ( 228 kB)
.bss : 0xc04a9000 - 0xc05f33c8 (1321 kB)
NR_IRQS:256
sched_clock: 32 bits at 100 Hz, resolution 10000000ns, wraps every 4294967286ms
Console: colour dummy device 80x30
Calibrating delay loop... 242.07 BogoMIPS (lpj=1210368)
pid_max: default: 32768 minimum: 301
Security Framework initialized
SELinux: Initializing.
Mount-cache hash table entries: 512
Initializing cgroup subsys debug
Initializing cgroup subsys cpuacct
Initializing cgroup subsys freezer
CPU: Testing write buffer coherency: ok
Setting up static identity map for 0x35e610 - 0x35e668
NET: Registered protocol family 16
bio: create slab <bio-0> at 0
Switching to clocksource goldfish_timer
NET: Registered protocol family 2
IP route cache hash table entries: 32768 (order: 5, 131072 bytes)
TCP established hash table entries: 131072 (order: 8, 1048576 bytes)
TCP bind hash table entries: 65536 (order: 6, 262144 bytes)
TCP: Hash tables configured (established 131072 bind 65536)
TCP: reno registered
UDP hash table entries: 512 (order: 1, 8192 bytes)
UDP-Lite hash table entries: 512 (order: 1, 8192 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
Trying to unpack rootfs image as initramfs...
Freeing initrd memory: 312K
goldfish_new_pdev goldfish_interrupt_controller at ff000000 irq -1
goldfish_new_pdev goldfish_device_bus at ff001000 irq 1
goldfish_new_pdev goldfish_timer at ff003000 irq 3
goldfish_new_pdev goldfish_rtc at ff010000 irq 10
goldfish_new_pdev goldfish_tty at ff002000 irq 4
goldfish_new_pdev goldfish_tty at ff011000 irq 11
goldfish_new_pdev goldfish_tty at ff012000 irq 12
goldfish_new_pdev smc91x at ff013000 irq 13
goldfish_new_pdev goldfish_fb at ff014000 irq 14
goldfish_new_pdev goldfish_audio at ff004000 irq 15
goldfish_new_pdev goldfish_memlog at ff006000 irq -1
goldfish_new_pdev goldfish-battery at ff015000 irq 16
goldfish_new_pdev goldfish_events at ff016000 irq 17
goldfish_new_pdev goldfish_nand at ff017000 irq -1
goldfish_new_pdev qemu_pipe at ff018000 irq 18
goldfish_new_pdev goldfish-switch at ff01a000 irq 19
goldfish_new_pdev goldfish-switch at ff01b000 irq 20
goldfish_pdev_worker registered goldfish_interrupt_controller
goldfish_pdev_worker registered goldfish_device_bus
goldfish_pdev_worker registered goldfish_timer
goldfish_pdev_worker registered goldfish_rtc
goldfish_pdev_worker registered goldfish_tty
goldfish_pdev_worker registered goldfish_tty
audit: initializing netlink socket (disabled)
type=2000 audit(0.380:1): initialized
goldfish_pdev_worker registered goldfish_tty
goldfish_pdev_worker registered smc91x
goldfish_pdev_worker registered goldfish_fb
goldfish_pdev_worker registered goldfish_audio
goldfish_pdev_worker registered goldfish_memlog
goldfish_pdev_worker registered goldfish-battery
goldfish_pdev_worker registered goldfish_events
goldfish_pdev_worker registered goldfish_nand
goldfish_pdev_worker registered qemu_pipe
goldfish_pdev_worker registered goldfish-switch
goldfish_pdev_worker registered goldfish-switch
Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
fuse init (API version 7.18)
msgmni has been set to 1494
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
allocating frame buffer 768 * 1280, got ffa00000
console [ttyS0] enabled
brd: module loaded
loop: module loaded
nbd: registered device at major 43
goldfish_audio_probe
goldfish nand dev0: size c200000, page 2048, extra 64, erase 131072
goldfish nand dev1: size c200000, page 2048, extra 64, erase 131072
goldfish nand dev2: size 4000000, page 2048, extra 64, erase 131072
tun: Universal TUN/TAP device driver, 1.6
tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
smc91x.c: v1.1, sep 22 2004 by Nicolas Pitre <nico@fluxnic.net>
eth0: SMC91C11xFD (rev 1) at fe013000 IRQ 13 [nowait]
eth0: Ethernet addr: 52:54:00:12:34:56
mousedev: PS/2 mouse device common for all mice
*** events probe ***
events_probe() addr=0xfe016000 irq=17
events_probe() keymap=qwerty2
input: qwerty2 as /devices/virtual/input/input0
goldfish_rtc goldfish_rtc: rtc core: registered goldfish_rtc as rtc0
device-mapper: uevent: version 1.0.3
device-mapper: ioctl: 4.22.0-ioctl (2011-10-19) initialised: dm-devel@redhat.com
ashmem: initialized
logger: created 256K log 'log_main'
logger: created 256K log 'log_events'
logger: created 256K log 'log_radio'
logger: created 256K log 'log_system'
Netfilter messages via NETLINK v0.30.
nf_conntrack version 0.5.0 (11956 buckets, 47824 max)
ctnetlink v0.93: registering with nfnetlink.
NF_TPROXY: Transparent proxy support initialized, version 4.1.0
NF_TPROXY: Copyright (c) 2006-2007 BalaBit IT Ltd.
xt_time: kernel timezone is -0000
ip_tables: (C) 2000-2006 Netfilter Core Team
arp_tables: (C) 2002 David S. Miller
TCP: cubic registered
NET: Registered protocol family 10
ip6_tables: (C) 2000-2006 Netfilter Core Team
IPv6 over IPv4 tunneling driver
NET: Registered protocol family 17
NET: Registered protocol family 15
8021q: 802.1Q VLAN Support v1.8
VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 0
goldfish_rtc goldfish_rtc: setting system clock to 2014-04-14 09:21:14 UTC (1397467274)
Freeing init memory: 148K
type=1403 audit(1397467274.720:2): policy loaded auid=4294967295 ses=4294967295
SELinux: Loaded policy from /sepolicy
type=1404 audit(1397467274.750:3): enforcing=1 old_enforcing=0 auid=4294967295 ses=4294967295
init (1): /proc/1/oom_adj is deprecated, please use /proc/1/oom_score_adj instead.
init: /dev/hw_random not found
init: cannot open '/initlogo.rle'
goldfish_nand_read: invalid read, start 0, len 200, dev_size c200000, write_size 800
end_request: I/O error, dev mtdblock0, sector 2
EXT4-fs (mtdblock0): unable to read superblock
fs_mgr: Cannot mount filesystem on /dev/block/mtdblock0 at /system
init: fs_mgr_mount_all returned an error
init: /dev/hw_random not found
init: Unable to open persistent property directory /data/property errno: 2
init: cannot find '/system/bin/servicemanager', disabling 'servicemanager'
init: cannot find '/system/bin/vold', disabling 'vold'
init: cannot find '/system/bin/qemu-props', disabling 'qemu-props'
init: cannot find '/system/bin/netd', disabling 'netd'
init: cannot find '/system/bin/debuggerd', disabling 'debuggerd'
init: cannot find '/system/bin/rild', disabling 'ril-daemon'
type=1400 audit(1397467281.760:4): avc: denied { entrypoint } for pid=33 comm="init" path="/sbin/healthd" dev="rootfs" ino=1232 scontext=u:r:healthd:s0 tcontext=ubject_r:rootfs:s0 tclass=file
init: cannot find '/system/bin/surfaceflinger', disabling 'surfaceflinger'
init: cannot find '/system/bin/app_process', disabling 'zygote'
init: cannot find '/system/bin/drmserver', disabling 'drm'
init: cannot find '/system/bin/mediaserver', disabling 'media'
init: cannot find '/system/bin/installd', disabling 'installd'
init: cannot find '/system/etc/install-recovery.sh', disabling 'flash_recovery'
init: cannot find '/system/bin/keystore', disabling 'keystore'
type=1405 audit(1397467281.790:5): bool=in_qemu val=1 old_val=0 auid=4294967295 ses=4294967295
init: cannot find '/system/bin/qemud', disabling 'qemud'
init: cannot find '/system/bin/logcat', disabling 'goldfish-logcat'
init: cannot find '/system/etc/init.goldfish.sh', disabling 'goldfish-setup'
init: property 'sys.powerctl' doesn't exist while expanding '${sys.powerctl}'
init: powerctl: cannot expand '${sys.powerctl}'
healthd: wakealarm_init: timerfd_create failed
init: property 'sys.sysctl.extra_free_kbytes' doesn't exist while expanding '${sys.sysctl.extra_free_kbytes}'
init: cannot expand '${sys.sysctl.extra_free_kbytes}' while writing to '/proc/sys/vm/extra_free_kbytes'
init: cannot find '/system/bin/sh', disabling 'console'
healthd: BatteryVoltagePath not found
healthd: BatteryTemperaturePath not found
binder: 33:33 transaction failed 29189, size 0-0
 
lokicall
Old
#2  
Junior Member - OP
Thanks Meter 0
Posts: 2
Join Date: Sep 2008
I exchange all files(taken from android build). Also this configuration stops during the boot. Now i get a nice kernel panic[1].

[1]kernel panic
Quote:
serial0 console

Uncompressing Linux... done, booting the kernel.

Booting Linux on physical CPU 0
Initializing cgroup subsys cpu
Linux version 3.4.0-gfb3ea4f (keunyoung@keunyoung-linux.mtv.corp.google.com) (gcc version 4.7 (GCC) ) #1 Tue Apr 2 17:27:47 PDT 2013
CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00093177
CPU: VIVT data cache, VIVT instruction cache
Machine: Goldfish
Truncating RAM at 00000000-3fffffff to -2f7fffff (vmalloc region overlap).
Memory policy: ECC disabled, Data cache writeback
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 193040
Kernel command line: qemu.gles=0 qemu=1 console=ttyS0 android.qemud=ttyS1 android.checkjni=1 ndns=2
PID hash table entries: 4096 (order: 2, 16384 bytes)
Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
Memory: 760MB = 760MB total
Memory: 765100k/765100k available, 13140k reserved, 0K highmem
Virtual kernel memory layout:
vector : 0xffff0000 - 0xffff1000 ( 4 kB)
fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB)
vmalloc : 0xf0000000 - 0xff000000 ( 240 MB)
lowmem : 0xc0000000 - 0xef800000 ( 760 MB)
.text : 0xc0008000 - 0xc03f83e8 (4033 kB)
.init : 0xc03f9000 - 0xc041c000 ( 140 kB)
.data : 0xc041c000 - 0xc0452760 ( 218 kB)
.bss : 0xc0452784 - 0xc0599fd0 (1311 kB)
NR_IRQS:256
sched_clock: 32 bits at 100 Hz, resolution 10000000ns, wraps every 4294967286ms
Console: colour dummy device 80x30
Calibrating delay loop... 243.30 BogoMIPS (lpj=1216512)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
Initializing cgroup subsys debug
Initializing cgroup subsys cpuacct
Initializing cgroup subsys freezer
CPU: Testing write buffer coherency: ok
Setting up static identity map for 0x319390 - 0x3193e8
NET: Registered protocol family 16
bio: create slab <bio-0> at 0
Switching to clocksource goldfish_timer
NET: Registered protocol family 2
IP route cache hash table entries: 32768 (order: 5, 131072 bytes)
TCP established hash table entries: 131072 (order: 8, 1048576 bytes)
TCP bind hash table entries: 65536 (order: 6, 262144 bytes)
TCP: Hash tables configured (established 131072 bind 65536)
TCP: reno registered
UDP hash table entries: 512 (order: 1, 8192 bytes)
UDP-Lite hash table entries: 512 (order: 1, 8192 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
Trying to unpack rootfs image as initramfs...
Freeing initrd memory: 484K
goldfish_new_pdev goldfish_interrupt_controller at ff000000 irq -1
goldfish_new_pdev goldfish_device_bus at ff001000 irq 1
goldfish_new_pdev goldfish_timer at ff003000 irq 3
goldfish_new_pdev goldfish_rtc at ff010000 irq 10
goldfish_new_pdev goldfish_tty at ff002000 irq 4
goldfish_new_pdev goldfish_tty at ff011000 irq 11
goldfish_new_pdev goldfish_tty at ff012000 irq 12
goldfish_new_pdev smc91x at ff013000 irq 13
goldfish_new_pdev goldfish_fb at ff014000 irq 14
goldfish_new_pdev goldfish_audio at ff004000 irq 15
goldfish_new_pdev goldfish_memlog at ff006000 irq -1
goldfish_new_pdev goldfish-battery at ff015000 irq 16
goldfish_new_pdev goldfish_events at ff016000 irq 17
goldfish_new_pdev goldfish_nand at ff017000 irq -1
goldfish_new_pdev qemu_pipe at ff018000 irq 18
goldfish_new_pdev goldfish-switch at ff01a000 irq 19
goldfish_new_pdev goldfish-switch at ff01b000 irq 20
goldfish_pdev_worker registered goldfish_interrupt_controller
goldfish_pdev_worker registered goldfish_device_bus
goldfish_pdev_worker registered goldfish_timer
goldfish_pdev_worker registered goldfish_rtc
goldfish_pdev_worker registered goldfish_tty
goldfish_pdev_worker registered goldfish_tty
goldfish_pdev_worker registered goldfish_tty
goldfish_pdev_worker registered smc91x
goldfish_pdev_worker registered goldfish_fb
goldfish_pdev_worker registered goldfish_audio
goldfish_pdev_worker registered goldfish_memlog
goldfish_pdev_worker registered goldfish-battery
goldfish_pdev_worker registered goldfish_events
goldfish_pdev_worker registered goldfish_nand
goldfish_pdev_worker registered qemu_pipe
goldfish_pdev_worker registered goldfish-switch
goldfish_pdev_worker registered goldfish-switch
Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
fuse init (API version 7.18)
msgmni has been set to 1495
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
allocating frame buffer 480 * 800, got ffc00000
console [ttyS0] enabled
brd: module loaded
loop: module loaded
nbd: registered device at major 43
goldfish_audio_probe
goldfish nand dev0: size 5aea0000, page 2048, extra 64, erase 131072
goldfish nand dev1: size 5aea0000, page 2048, extra 64, erase 131072
goldfish nand dev2: size 4000000, page 2048, extra 64, erase 131072
tun: Universal TUN/TAP device driver, 1.6
tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
smc91x.c: v1.1, sep 22 2004 by Nicolas Pitre <nico@fluxnic.net>
eth0: SMC91C11xFD (rev 1) at fe013000 IRQ 13 [nowait]
eth0: Ethernet addr: 52:54:00:12:34:56
mousedev: PS/2 mouse device common for all mice
*** events probe ***
events_probe() addr=0xfe016000 irq=17
events_probe() keymap=qwerty2
input: qwerty2 as /devices/virtual/input/input0
goldfish_rtc goldfish_rtc: rtc core: registered goldfish_rtc as rtc0
device-mapper: uevent: version 1.0.3
device-mapper: ioctl: 4.22.0-ioctl (2011-10-19) initialised: dm-devel@redhat.com
ashmem: initialized
logger: created 256K log 'log_main'
logger: created 256K log 'log_events'
logger: created 256K log 'log_radio'
logger: created 256K log 'log_system'
Netfilter messages via NETLINK v0.30.
nf_conntrack version 0.5.0 (11962 buckets, 47848 max)
ctnetlink v0.93: registering with nfnetlink.
NF_TPROXY: Transparent proxy support initialized, version 4.1.0
NF_TPROXY: Copyright (c) 2006-2007 BalaBit IT Ltd.
xt_time: kernel timezone is -0000
ip_tables: (C) 2000-2006 Netfilter Core Team
arp_tables: (C) 2002 David S. Miller
TCP: cubic registered
NET: Registered protocol family 10
ip6_tables: (C) 2000-2006 Netfilter Core Team
IPv6 over IPv4 tunneling driver
NET: Registered protocol family 17
NET: Registered protocol family 15
8021q: 802.1Q VLAN Support v1.8
VFP support v0.3: implementor 41 architecture 1 part 10 variant 9 rev 0
goldfish_rtc goldfish_rtc: setting system clock to 2014-04-15 11:52:05 UTC (1397562725)
Freeing init memory: 140K
Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000004

[<c0011ac4>] (unwind_backtrace+0x0/0xe0) from [<c03143cc>] (panic+0x6c/0x1ac)
[<c03143cc>] (panic+0x6c/0x1ac) from [<c001c384>] (do_exit+0x2dc/0x6ec)
[<c001c384>] (do_exit+0x2dc/0x6ec) from [<c001c840>] (do_group_exit+0x80/0xbc)
[<c001c840>] (do_group_exit+0x80/0xbc) from [<c00277c4>] (get_signal_to_deliver+0x478/0x4e8)
[<c00277c4>] (get_signal_to_deliver+0x478/0x4e8) from [<c000fd60>] (do_signal+0xcc/0x510)
[<c000fd60>] (do_signal+0xcc/0x510) from [<c001063c>] (do_notify_resume+0x18/0x4c)
[<c001063c>] (do_notify_resume+0x18/0x4c) from [<c000d9b4>] (work_pending+0x24/0x28)
[2] emulator call
Quote:
emulator -show-kernel -sysdir build -system build\system.img -ramdisk build\ramdisk.img -data build\userdata.img -kernel build\kernel-qemu -sdcard sdcard.img -skindir C:\adt-bundle-windows-x86_64-20131030\sdk\platforms\android-19\skins -skin WVGA800 -scale 0.7 -memory 1024 -partition-size 1500
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes