← Back to team overview

ubuntu-phone team mailing list archive

Re: Ubuntu Touch on Emulator

 

This is what I have on my Magro (image from Friday):

fstab:
# UNCONFIGURED FSTAB FOR BASE SYSTEM

ubuntu_chroot:
#!/system/bin/sh
# This program is free software: you can redistribute it and/or modify it
# under the terms of the the GNU General Public License version 3, as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranties of
# MERCHANTABILITY, SATISFACTORY QUALITY or FITNESS FOR A PARTICULAR
# PURPOSE.  See the applicable version of the GNU Lesser General Public
# License for more details.
#.
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
#
# Copyright (C) 2012 Canonical, Ltd.

export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
export HOME=/root
export USER=root

ROOT=/data/ubuntu
MOUNT=/system/bin/mount
CHROOT=/system/xbin/chroot
ECHO=/system/xbin/echo
MKDIR=/system/bin/mkdir
UCHROOT=/system/bin/uchroot

enable_swap()
{
    if [ -f /data/ubuntu/SWAP.swap ]
    then
        /system/xbin/swapon /data/ubuntu/SWAP.swap
    fi
}

export_qt5_shell_envvars()
{
    # These are here to be able to launch the Qt5 apps seamlessly
    export QML2_IMPORT_PATH=/usr/lib/arm-linux-gnueabihf/qt5/imports
    export QT_QPA_PLATFORM=ubuntu
}

setup_mounts()
{
    if [ ! -d $ROOT/vendor ]
    then
        $MKDIR $ROOT/vendor
    fi
    if [ ! -d $ROOT/system ]
    then
        $MKDIR $ROOT/system
    fi
    if [ ! -d $ROOT/data ]
    then
        $MKDIR $ROOT/data
    fi

    $MOUNT -o bind /dev $ROOT/dev

    $MOUNT -t devpts devpts $ROOT/dev/pts
    $MOUNT -t sysfs sysfs $ROOT/sys
    $MOUNT -t tmpfs run $ROOT/run

    if [ ! -d $ROOT/run/shm ]
    then
        $MKDIR $ROOT/run/shm
    fi

    $MOUNT -t tmpfs none $ROOT/run/shm

    if [ ! -d $ROOT/run/lock ]
    then
        $MKDIR $ROOT/run/lock
    fi

    $MOUNT -t tmpfs -o size=5242880 none $ROOT/run/lock
    $MOUNT -o bind /system $ROOT/system
    $MOUNT -o bind /vendor $ROOT/vendor
    $MOUNT -o bind /data $ROOT/data
}

launch_uchroot()
{
    exec $UCHROOT
}

launch_shell()
{
    export_qt5_shell_envvars
    exec $CHROOT $ROOT /bin/bash -c su -
}

case $1 in
"init")
    setup_mounts
    enable_swap
    launch_uchroot
    ;;
*)
    launch_shell
    ;;
esac

There's some issue with mountall. Can anyone with a working touch do me a favor? Just "cat /data/ubuntu/etc/fstab; cat /system/bin/ubuntu_chroot" in adb shell, and show me the result for me. thanks.

------------------ ??? ? ------------------
*???:* "leon lee"<llrraa@xxxxxx>;
*????:* 2013?7?11?(???) ??1:30
*???:* "ubuntu-phone"<ubuntu-phone@xxxxxxxxxxxxxxxxxxx>;
*??:* Re: [Ubuntu-phone] Ubuntu Touch on Emulator

Any one help on this?
swapon: swapfile has holes

When I try it on adb shell, still no luck.
root@android:/ # /system/xbin/swapon /data/ubuntu/SWAP.swap
swapon: /data/ubuntu/SWAP.swap: Invalid argument



------------------ ???? ------------------
*???:* "leon lee"<llrraa@xxxxxx>;
*????:* 2013?7?9?(???) ??11:55
*???:* "leon lee"<llrraa@xxxxxx>; "Joey Jiao"<joey.jiaojg@xxxxxxxxx>;
*??:* "ubuntu-phone"<ubuntu-phone@xxxxxxxxxxxxxxxxxxx>;
*??:* re: [Ubuntu-phone] Ubuntu Touch on Emulator

ubuntu_chroot shell is ok. I think ubuntu_chroot init should be also working. But still black screen. ubuntu_chroot init will at last start /sbin/init by clone. But I don't know if it's running or not. When I try to run uchroot manually, I have this:
clone: Invalid argument
Any idea on what should go next?

------------------ ???? ------------------
*???:* "leon lee"<llrraa@xxxxxx>;
*????:* 2013?7?9?(???) ??0:18
*???:* "leon lee"<llrraa@xxxxxx>; "Joey Jiao"<joey.jiaojg@xxxxxxxxx>;
*??:* "ubuntu-phone"<ubuntu-phone@xxxxxxxxxxxxxxxxxxx>;
*??:* re: [Ubuntu-phone] Ubuntu Touch on Emulator

Most of the services seem to be fine in the emulator, but still the screen is black.
If someone knows why, please show me what to do next. Thanks.

yaffs: passed flags ""
init: skipping insecure file '/system/build.prop'
init: cannot find '/system/bin/qemu-props', disabling 'qemu-props'
init: cannot find '/system/bin/qemud', disabling 'qemud'
emulator: Connecting ADB debugging guest: '<null>'
emulator: qemud_service_connect_client: registered client channel -1 for 'adb-debug' service
--------- beginning of /dev/alog/main
emulator: Connecting ADB guest: '5555'
emulator: qemud_service_connect_client: registered client channel -1 for 'adb' service
emulator: _qemudPipe_sendBuffers: accept
emulator: ADB client 0x9618928(o=(nil)) received from guest 6 bytes in accept emulator: Connecting ADB host 0x961ccb0(so=22) with ADB guest 0x961cbf0(o=0x9618928)
emulator: ADB client 0x9618928(o=(nil)) is connected to the host 0x961cbf0
emulator: _qemud_pipe_send: len=  2 'ok'
emulator: _qemudPipe_recvBuffers: -> 2 (of 256)
emulator: _qemudPipe_sendBuffers: start
emulator: ADB client 0x9618928(o=0x961cbf0) received from guest 5 bytes in start
emulator: Pushing 31 bytes of the pending ADB host data.
emulator: ADB client 0x9618928(o=0x961cbf0) received from the host 0x961cbf0 31 bytes in CNXN\x00\x00\x00\x01\x00\x10\x00\x00\x07\x00\x00\x002\x02\x00\x00\xbc\xb1\xa7\xb1host::\x00 emulator: _qemud_pipe_send: len= 31 'CNXN\x00\x00\x00\x01\x00\x10\x00\x00\x07\x00\x00\x002\x02\x00\x00\xbc\xb1\xa7\xb1host::\x00'
emulator: Connecting ADB guest: '5555'
emulator: qemud_service_connect_client: registered client channel -1 for 'adb' service
emulator: _qemudPipe_sendBuffers: accept
emulator: ADB client 0x961d0c0(o=(nil)) received from guest 6 bytes in accept
emulator: Pend ADB guest 0x961cfe8(o=0x961d0c0)
emulator: _qemudPipe_wakeOn: -> 2
emulator: _qemudPipe_recvBuffers: -> 24 (of 24)
emulator: _qemudPipe_recvBuffers: -> 7 (of 7)
emulator: _qemudPipe_wakeOn: -> 2
emulator: _qemudPipe_sendBuffers: CNXN\x00\x00\x00\x01\x00\x10\x00\x00F\x00\x00\x00\x05\x1a\x00\x00\xbc\xb1\xa7\xb1device::ro.product.name=;ro.product.model=;ro.product.device=generic;\x00 emulator: ADB client 0x9618928(o=0x961cbf0) received from guest 94 bytes in CNXN\x00\x00\x00\x01\x00\x10\x00\x00F\x00\x00\x00\x05\x1a\x00\x00\xbc\xb1\xa7\xb1device:: emulator: Sending 94 bytes to the ADB host: CNXN\x00\x00\x00\x01\x00\x10\x00\x00F\x00\x00\x00\x05\x1a\x00\x00\xbc\xb1\xa7\xb1device:: emulator: Error while connecting to socket '127.0.0.1:1970': 111 -> Connection refused
emulator: ASC 127.0.0.1:1970: Retrying connection. Connector FD = 19
I/installd(   42): installd firing up
I/DEBUG   (   37): debuggerd: Jun 28 2013 22:45:52
eth0: link up
shell@android:/ $ emulator: Error while connecting to socket '127.0.0.1:1970': 111 -> Connection refused
emulator: ASC 127.0.0.1:1970: Retrying connection. Connector FD = 19
I/SurfaceFlinger(   39): SurfaceFlinger is starting
I/SurfaceFlinger( 39): SurfaceFlinger's main thread ready to run. Initializing graphics H/W... D/libEGL ( 39): Emulator without GPU support detected. Fallback to software renderer.
D/libEGL  (   39): loaded /system/lib/egl/libGLES_android.so
D/gralloc_goldfish(   39): Emulator without GPU emulation detected.
I/gralloc (   39): using (fd=14)
I/gralloc (   39): id           =
I/gralloc (   39): xres         = 320 px
I/gralloc (   39): yres         = 480 px
I/gralloc (   39): xres_virtual = 320 px
I/gralloc (   39): yres_virtual = 960 px
I/gralloc (   39): bpp          = 16
I/gralloc (   39): r            = 11:5
I/gralloc (   39): g            =  5:6
I/gralloc (   39): b            =  0:5
D/SensorService(   43): nuSensorService starting...
I/gralloc (   39): width        = 49 mm (165.877548 dpi)
I/gralloc (   39): height       = 74 mm (164.756760 dpi)
I/gralloc (   39): refresh rate = 651.04 Hz
E/SurfaceFlinger(   39): hwcomposer module not found
E/SensorService( 43): couldn't load sensors module (No such file or directory)
W/SurfaceFlinger(   39): getting VSYNC period from fb HAL: 1536001
W/SurfaceFlinger( 39): no suitable EGLConfig found, trying without EGL_FRAMEBUFFER_TARGET_ANDROID W/SurfaceFlinger( 39): no suitable EGLConfig found, trying without EGL_RECORDABLE_ANDROID W/SurfaceFlinger( 39): no suitable EGLConfig found, trying with 16-bit color allowed
W/SurfaceFlinger(   39): EGL_SLOW_CONFIG selected!
I/ServiceManager(   44): Waiting for service SurfaceFlinger...
E/Trace   (   39): error opening trace file: No such file or directory (2)
I/SurfaceFlinger(   39): EGL informations:
I/SurfaceFlinger(   39): vendor    : Android
I/SurfaceFlinger(   39): version   : 1.4 Android META-EGL
I/SurfaceFlinger( 39): extensions: EGL_KHR_image_base EGL_KHR_fence_sync EGL_ANDROID_image_native_buffer
I/SurfaceFlinger(   39): Client API: OpenGL_ES
I/SurfaceFlinger(   39): EGLSurface: 5-6-5-0, config=0x0
I/SurfaceFlinger(   39): OpenGL ES informations:
I/SurfaceFlinger(   39): vendor    : Android
I/SurfaceFlinger(   39): renderer  : Android PixelFlinger 1.4
I/SurfaceFlinger(   39): version   : OpenGL ES-CM 1.0
I/SurfaceFlinger( 39): extensions: GL_EXT_debug_marker GL_OES_byte_coordinates GL_OES_fixed_point GL_OES_single_precision GL_OES_read_format GL_OES_compressed_paletted_texture GL_OES_draw_texture GL_OES_matrix_get GL_OES_query_matrix GL_OES_EGL_image GL_OES_EGL_sync GL_OES_compressed_ETC1_RGB8_texture GL_ARB_texture_compression GL_ARB_texture_non_power_of_two GL_ANDROID_user_clip_plane GL_ANDROID_vertex_buffer_object GL_ANDROID_generate_mipmap
I/SurfaceFlinger(   39): GL_MAX_TEXTURE_SIZE = 4096
I/SurfaceFlinger(   39): GL_MAX_VIEWPORT_DIMS = 4096 x 4096
init: no such service 'bootanim'
D/SurfaceFlinger(   39): Screen acquired, type=0 flinger=0x40484370
E/SurfaceFlinger( 39): ro.sf.lcd_density must be defined as a build property
E/Trace   (   44): error opening trace file: No such file or directory (2)
E/SurfaceFlinger( 39): ro.sf.lcd_density must be defined as a build property I/ubuntu::detail::ApplicationManager( 44): virtual bool android::InputSetup::DummyApplication::updateInfo() I/ubuntu::detail::ApplicationManager( 44): virtual bool android::InputSetup::DummyApplicationWindow::updateInfo() E/EventHub( 44): could not get driver version for /dev/input/mouse0, Not a typewriter emulator: Error while connecting to socket '127.0.0.1:1970': 111 -> Connection refused
emulator: ASC 127.0.0.1:1970: Retrying connection. Connector FD = 19
I/EventHub( 44): New device: id=1, fd=31, path='/dev/input/event0', name='qwerty2', classes=0x2d, configuration='/system/usr/idc/qwerty2.idc', keyLayout='/system/usr/keylayout/qwerty.kl', keyCharacterMap='/system/usr/keychars/qwerty2.kcm', builtinKeyboard=true, usingSuspendBlockIoctl=true, usingClockIoctl=true E/EventHub( 44): could not get driver version for /dev/input/mice, Not a typewriter
swapon: swapfile has holes
I/InputReader( 44): Device added: id=-1, name='Virtual', sources=0x00000301 I/InputReader( 44): Device reconfigured: id=0, name='qwerty2', size 320x480, orientation 0, mode 1, display id 0 I/InputReader( 44): Device added: id=0, name='qwerty2', sources=0x00011307
I/mediaserver(   41): ServiceManager: 0x417bcdd0
I/AudioFlinger(   41): Using default 3000 mSec as standby time.
I/CameraService(   41): CameraService started (pid=41)
E/CameraService(   41): Could not load camera HAL module
I/AudioPolicyManagerBase( 41): loadAudioPolicyConfig() loaded /system/etc/audio_policy.conf I/AudioFlinger( 41): loadHwModule() Loaded primary audio interface from Default audio HW HAL (audio) handle 1 I/AudioFlinger( 41): HAL output buffer size 1024 frames, normal mix buffer size 1024 frames I/AudioMixer( 41): found effect "Multichannel Downmix To Stereo" from The Android Open Source Project
I/AudioFlinger(   41): Using module 1 has the primary audio interface
I/AudioFlinger(   41): AudioFlinger's thread 0x417be440 ready to run
W/AudioFlinger( 41): Thread AudioOut_2 cannot connect to the power manager service I/AudioPolicyService( 41): Loaded audio policy from LEGACY Audio Policy HAL (audio_policy)


------------------ ???? ------------------
*???:* "leon lee"<llrraa@xxxxxx>;
*????:* 2013?7?5?(???) ??10:35
*???:* "leon lee"<llrraa@xxxxxx>; "Joey Jiao"<joey.jiaojg@xxxxxxxxx>;
*??:* "ubuntu-phone"<ubuntu-phone@xxxxxxxxxxxxxxxxxxx>;
*??:* re: [Ubuntu-phone] Ubuntu Touch on Emulator

There's no ubuntuappmanager in the emulator. I tryed to upload one into it and run ubuntuappmanager , but got no luck. Below is the log. If someone knows why, please show me what to do next. Thanks.

shell@android:/ $ E/SurfaceFlinger( 39): ro.sf.lcd_density must be defined as a build property
E/Trace   (  146): error opening trace file: No such file or directory (2)
E/SurfaceFlinger( 39): ro.sf.lcd_density must be defined as a build property I/ubuntu::detail::ApplicationManager( 146): virtual bool android::InputSetup::DummyApplication::updateInfo() I/ubuntu::detail::ApplicationManager( 146): virtual bool android::InputSetup::DummyApplicationWindow::updateInfo() E/EventHub( 146): could not get driver version for /dev/input/mouse0, Not a typewriter I/EventHub( 146): New device: id=1, fd=32, path='/dev/input/event0', name='qwerty2', classes=0x2d, configuration='/system/usr/idc/qwerty2.idc', keyLayout='/system/usr/keylayout/qwerty.kl', keyCharacterMap='/system/usr/keychars/qwerty2.kcm', builtinKeyboard=true, usingSuspendBlockIoctl=true, usingClockIoctl=true E/EventHub( 146): could not get driver version for /dev/input/mice, Not a typewriter I/InputReader( 146): Device added: id=-1, name='Virtual', sources=0x00000301 I/InputReader( 146): Device reconfigured: id=0, name='qwerty2', size 320x480, orientation 0, mode 1, display id 0 I/InputReader( 146): Device added: id=0, name='qwerty2', sources=0x00011307

******************

root@android:/system/bin # ./ubuntuappmanager
fatal error opening "/sys/power/wake_lock"
fatal error opening "/sys/android_power/acquire_partial_wake_lock"



------------------ ???? ------------------
*???:* "leon lee"<llrraa@xxxxxx>;
*????:* 2013?7?2?(???) ??6:14
*???:* "Joey Jiao"<joey.jiaojg@xxxxxxxxx>;
*??:* "ubuntu-phone"<ubuntu-phone@xxxxxxxxxxxxxxxxxxx>;
*??:* Re: [Ubuntu-phone] Ubuntu Touch on Emulator

For this issue, I simply
https://github.com/CyanogenMod/android_build/commit/0f5bb3af4b3a14421885125ce4f9fba328b9bdd8.patch
I delete this line. And it goes fine for me. Hope this would help you.
+$(HOST_OUT_EXECUTABLES)/emulator$(HOST_EXECUTABLE_SUFFIX) \

diff --git a/core/Makefile b/core/Makefile
index be01706..94b5561 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -1482,10 +1482,17 @@ dalvikfiles: $(INTERNAL_DALVIK_MODULES)
 # -----------------------------------------------------------------
 # The emulator package
 ifeq ($(BUILD_EMULATOR),true)
+
+INSTALLED_QEMU_KERNEL_TARGET := $(PRODUCT_OUT)/kernel-qemu
+
+$(INSTALLED_QEMU_KERNEL_TARGET): $(INSTALLED_KERNEL_TARGET)
+$(hide) $(ACP) -fp $(INSTALLED_KERNEL_TARGET) $(INSTALLED_QEMU_KERNEL_TARGET)
+
 INTERNAL_EMULATOR_PACKAGE_FILES += \
-  $(HOST_OUT_EXECUTABLES)/emulator$(HOST_EXECUTABLE_SUFFIX) \
-  prebuilts/qemu-kernel/$(TARGET_ARCH)/kernel-qemu \
-        $(INSTALLED_RAMDISK_TARGET) \
//+$(HOST_OUT_EXECUTABLES)/emulator$(HOST_EXECUTABLE_SUFFIX) \ // I delete this line
+$(INSTALLED_QEMU_KERNEL_TARGET) \
+$(INSTALLED_RAMDISK_TARGET) \
+$(recovery_ramdisk) \
$(INSTALLED_SYSTEMIMAGE) \
$(INSTALLED_USERDATAIMAGE_TARGET)

------------------ ???? ------------------
*???:* "Joey Jiao"<joey.jiaojg@xxxxxxxxx>;
*????:* 2013?7?2?(???) ??5:16
*???:* "leon lee"<llrraa@xxxxxx>;
*??:* "ubuntu-phone"<ubuntu-phone@xxxxxxxxxxxxxxxxxxx>;
*??:* Re: [Ubuntu-phone] Ubuntu Touch on Emulator

Yes ,failed for me too

No private recovery resources for TARGET_DEVICE generic
build/core/tasks/kernel.mk:83 <http://kernel.mk:83>: *************************************************************** build/core/tasks/kernel.mk:84 <http://kernel.mk:84>: * Using prebuilt kernel binary instead of source * build/core/tasks/kernel.mk:85 <http://kernel.mk:85>: * THIS IS DEPRECATED, AND WILL BE DISCONTINUED * build/core/tasks/kernel.mk:86 <http://kernel.mk:86>: * Please configure your device to download the kernel * build/core/tasks/kernel.mk:87 <http://kernel.mk:87>: * source repository to kernel/goldfish build/core/tasks/kernel.mk:88 <http://kernel.mk:88>: * See http://wiki.cyanogenmod.com/wiki/Integrated_kernel_building build/core/tasks/kernel.mk:89 <http://kernel.mk:89>: * for more information * build/core/tasks/kernel.mk:90 <http://kernel.mk:90>: *************************************************************** make: *** No rule to make target `/store/projects/phablet/out/host/linux-x86/bin/emulator', needed by `/store/projects/phablet/out/target/product/generic/cm_goldfish-emulator-eng.jiangenj.zip'. Stop.


2013/6/30 leon lee <llrraa@xxxxxx <mailto:llrraa@xxxxxx>>

    Thans, Chirayu. This is exactly what I need. I have finished the
    build. I think not all the patches are merged. I get source from
    export:
    http://phablet.ubuntu.com/export/phablet-ubuntu-20130618.tar.xz
    But goldfish is not the Makefile. I have to do it myself.
    Just a small question: when I'm using "emulator -partition-size
    2047" to start emulator, where does emulator get the image file?
    Also, I paste my log from emulator. It's strange that there's no
    info about sdervicemanager. Where do you think should move on to
    fix the emulator?

    leon@ubuntu:/media/linux/1/touch/export/phablet-ubuntu-20130618$
    emulator   -show-kernel -shell -logcat '*:v'-debug-all
    -partition-size 2047
    Failed to load libGL.so
    error libGL.so: cannot open shared object file: No such file or
    directory
    Failed to load libGL.so
    error libGL.so: cannot open shared object file: No such file or
    directory
    Uncompressing Linux... done, booting the kernel.
    Booting Linux on physical CPU 0
    Initializing cgroup subsys cpu
    Linux version 3.4.0 (leon@ubuntu) (gcc version 4.4.3 (GCC) ) #1
    PREEMPT Sun Jun 30 17:53:36 CST 2013
    CPU: ARMv7 Processor [410fc080] revision 0 (ARMv7), cr=10c53c7d
    CPU: PIPT / VIPT nonaliasing data cache, VIPT nonaliasing
    instruction cache
    Machine: Goldfish
    Memory policy: ECC disabled, Data cache writeback
    Built 1 zonelists in Zone order, mobility grouping on.  Total
    pages: 130048
    Kernel command line: qemu.gles=0 qemu=1 console=ttyS0
    android.qemud=ttyS1 androidboot.console=ttyS2 android.checkjni=1
    androidboot.logcat=*:v-debug-all ndns=1
    PID hash table entries: 2048 (order: 1, 8192 bytes)
    Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
    Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
    Memory: 512MB = 512MB total
    Memory: 513572k/513572k available, 10716k reserved, 0K highmem
    Virtual kernel memory layout:
        vector  : 0xffff0000 - 0xffff1000 (   4 kB)
        fixmap  : 0xfff00000 - 0xfffe0000 ( 896 kB)
        vmalloc : 0xe0800000 - 0xff000000 ( 488 MB)
        lowmem  : 0xc0000000 - 0xe0000000 ( 512 MB)
          .text : 0xc0008000 - 0xc0436198 (4281 kB)
          .init : 0xc0437000 - 0xc045b000 ( 144 kB)
          .data : 0xc045c000 - 0xc0492a00 ( 219 kB)
           .bss : 0xc0492a24 - 0xc05da3d0 (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... 116.12 BogoMIPS (lpj=580608)
    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 0x34c3b8 - 0x34c410
    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: 4096 (order: 2, 16384 bytes)
    TCP established hash table entries: 16384 (order: 5, 131072 bytes)
    TCP bind hash table entries: 16384 (order: 4, 65536 bytes)
    TCP: Hash tables configured (established 16384 bind 16384)
    TCP: reno registered
    UDP hash table entries: 256 (order: 0, 4096 bytes)
    UDP-Lite hash table entries: 256 (order: 0, 4096 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: 180K
    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@xxxxxxxxxxxx
    <mailto:okir@xxxxxxxxxxxx>).
    fuse init (API version 7.18)
    msgmni has been set to 1003
    io scheduler noop registered
    io scheduler deadline registered
    io scheduler cfq registered (default)
    allocating frame buffer 320 * 480, got ffd00000
    console [ttyS0] enabled
    brd: module loaded
    loop: module loaded
    nbd: registered device at major 43
    goldfish_audio_probe
    goldfish nand dev0: size 7c100000, page 2048, extra 64, erase 131072
    goldfish nand dev1: size 7c100000, 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@xxxxxxxxxxxx
    <mailto:maxk@xxxxxxxxxxxx>>
    smc91x.c: v1.1, sep 22 2004 by Nicolas Pitre <nico@xxxxxxxxxxx
    <mailto:nico@xxxxxxxxxxx>>
    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@xxxxxxxxxx <mailto:dm-devel@xxxxxxxxxx>
    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 (8027 buckets, 32108 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 2013-07-01
    13:47:29 UTC (1372686449)
    Freeing init memory: 144K
    init (1): /proc/1/oom_adj is deprecated, please use
    /proc/1/oom_score_adj instead.
    init: cannot open '/initlogo.rle'
    yaffs: dev is 32505856 name is "mtdblock0" rw
    yaffs: passed flags ""
    yaffs: dev is 32505857 name is "mtdblock1" rw
    yaffs: passed flags ""
    yaffs: dev is 32505858 name is "mtdblock2" rw
    yaffs: passed flags ""
    init: cannot find '/system/bin/qemu-props', disabling 'qemu-props'
    init: cannot find '/system/bin/ubuntuappmanager', disabling
    'ubuntuappmanager'
    init: cannot find '/system/bin/qemud', disabling 'qemud'
    --------- beginning of /dev/alog/main
    I/DEBUG   (   37): debuggerd: Jun 28 2013 22:45:52
    I/installd(   42): installd firing up
    eth0: link up
    warning: `rild' uses 32-bit capabilities (legacy support in use)
    shell@android:/ $ I/SurfaceFlinger( 39): SurfaceFlinger is starting
    I/SurfaceFlinger(   39): SurfaceFlinger's main thread ready to
    run. Initializing graphics H/W...
    D/libEGL  (   39): Emulator without GPU support detected. Fallback
    to software renderer.
    D/libEGL  (   39): loaded /system/lib/egl/libGLES_android.so
    I/cm      (   73): ____ _   _ ____ _  _ ____ ____ ____ _  _ _  _
    ____ ___
    D/gralloc_goldfish(   39): Emulator without GPU emulation detected.
    I/cm      (   77): |     \_/  |__| |\ | |  | | __ |___ |\ | |\/| |
     | |  \
    I/gralloc (   39): using (fd=14)
    I/gralloc (   39): id           =
    I/gralloc (   39): xres         = 320 px
    I/gralloc (   39): yres         = 480 px
    I/gralloc (   39): xres_virtual = 320 px
    I/gralloc (   39): yres_virtual = 960 px
    I/gralloc (   39): bpp          = 16
    I/gralloc (   39): r            = 11:5
    I/gralloc (   39): g            =  5:6
    I/gralloc (   39): b            =  0:5
    D/SensorService(   43): nuSensorService starting...
    E/SensorService(   43): couldn't load sensors module (No such file
    or directory)
    I/gralloc (   39): width        = 49 mm (165.877548 dpi)
    I/gralloc (   39): height       = 74 mm (164.756760 dpi)
    I/gralloc (   39): refresh rate = 651.04 Hz
    E/SurfaceFlinger(   39): hwcomposer module not found
    W/SurfaceFlinger(   39): getting VSYNC period from fb HAL: 1536001
    W/SurfaceFlinger(   39): no suitable EGLConfig found, trying
    without EGL_FRAMEBUFFER_TARGET_ANDROID
    W/SurfaceFlinger(   39): no suitable EGLConfig found, trying
    without EGL_RECORDABLE_ANDROID
    W/SurfaceFlinger(   39): no suitable EGLConfig found, trying with
    16-bit color allowed
    W/SurfaceFlinger(   39): EGL_SLOW_CONFIG selected!
    E/Trace   (   39): error opening trace file: No such file or
    directory (2)
    I/cm      (   81): |___   |   |  | | \| |__| |__] |___ | \| |  |
    |__| |__/
    I/SurfaceFlinger(   39): EGL informations:
    I/SurfaceFlinger(   39): vendor    : Android
    I/SurfaceFlinger(   39): version   : 1.4 Android META-EGL
    I/SurfaceFlinger(   39): extensions: EGL_KHR_image_base
    EGL_KHR_fence_sync EGL_ANDROID_image_native_buffer
    I/SurfaceFlinger(   39): Client API: OpenGL_ES
    I/SurfaceFlinger(   39): EGLSurface: 5-6-5-0, config=0x0
    I/SurfaceFlinger(   39): OpenGL ES informations:
    I/SurfaceFlinger(   39): vendor    : Android
    I/SurfaceFlinger(   39): renderer  : Android PixelFlinger 1.4
    I/SurfaceFlinger(   39): version   : OpenGL ES-CM 1.0
    I/SurfaceFlinger(   39): extensions: GL_EXT_debug_marker
    GL_OES_byte_coordinates GL_OES_fixed_point GL_OES_single_precision
    GL_OES_read_format GL_OES_compressed_paletted_texture
    GL_OES_draw_texture GL_OES_matrix_get GL_OES_query_matrix
    GL_OES_EGL_image GL_OES_EGL_sync
    GL_OES_compressed_ETC1_RGB8_texture GL_ARB_texture_compression
    GL_ARB_texture_non_power_of_two GL_ANDROID_user_clip_plane
    GL_ANDROID_vertex_buffer_object GL_ANDROID_generate_mipmap
    I/SurfaceFlinger(   39): GL_MAX_TEXTURE_SIZE = 4096
    I/SurfaceFlinger(   39): GL_MAX_VIEWPORT_DIMS = 4096 x 4096
    init: no such service 'bootanim'
    D/SurfaceFlinger(   39): Screen acquired, type=0 flinger=0x40c73318
    I/cm      (   96): Welcome to Android 4.2.1 /
    CyanogenMod-10.1-20130628-UNOFFICIAL-goldfish
    swapon: swapfile has holes
    I/mediaserver(   41): ServiceManager: 0x40a6ae00
    I/AudioFlinger(   41): Using default 3000 mSec as standby time.
    I/CameraService(   41): CameraService started (pid=41)
    E/CameraService(   41): Could not load camera HAL module
    I/AudioPolicyManagerBase(   41): loadAudioPolicyConfig() loaded
    /system/etc/audio_policy.conf
    I/AudioFlinger(   41): loadHwModule() Loaded primary audio
    interface from Default audio HW HAL (audio) handle 1
    I/AudioFlinger(   41): HAL output buffer size 1024 frames, normal
    mix buffer size 1024 frames
    I/AudioMixer(   41): found effect "Multichannel Downmix To Stereo"
    from The Android Open Source Project
    I/AudioFlinger(   41): Using module 1 has the primary audio interface
    I/AudioFlinger(   41): AudioFlinger's thread 0x40d83008 ready to run
    W/AudioFlinger(   41): Thread AudioOut_2 cannot connect to the
    power manager service
    I/AudioPolicyService(   41): Loaded audio policy from LEGACY Audio
    Policy HAL (audio_policy)

    ------------------ Original ------------------
    *From: * "Chirayu Desai"<chirayudesai1@xxxxxxxxx
    <mailto:chirayudesai1@xxxxxxxxx>>;
    *Date: * Sat, Jun 29, 2013 07:57 PM
    *To: * "ubuntu-phone"<ubuntu-phone@xxxxxxxxxxxxxxxxxxx
    <mailto:ubuntu-phone@xxxxxxxxxxxxxxxxxxx>>;
    *Subject: * Re: [Ubuntu-phone] Ubuntu Touch on Emulator

    Leon, all of the above mentioned patches have already been merged.

    Run a `repo sync -d`, which will detach all repositories to the
    latest HEAD, and then apply [0], it will build then.

    [0]
    https://github.com/CyanogenMod/android_build/commit/56dae3d8f1f3578dd970221e1f6e26777226d54f.patch


    On 28 June 2013 20:19, leon lee <llrraa@xxxxxx
    <mailto:llrraa@xxxxxx>> wrote:

        Some issue remains:
        make: *** No rule to make target
        `/media/linux/1/touch/export/phablet-ubuntu-20130618/out/host/linux-x86/bin/emulator',
        needed by
        `/media/linux/1/touch/export/phablet-ubuntu-20130618/out/target/product/generic/cm_goldfish-emulator-eng.leon.zip'.
        Stop.



        ------------------ Original ------------------
        *From: * "leon lee"<llrraa@xxxxxx <mailto:llrraa@xxxxxx>>;
        *Date: * Fri, Jun 28, 2013 12:54 PM
        *To: * "ubuntu-phone"<ubuntu-phone@xxxxxxxxxxxxxxxxxxx
        <mailto:ubuntu-phone@xxxxxxxxxxxxxxxxxxx>>;
        *Subject: * Re: [Ubuntu-phone] Ubuntu Touch on Emulator

        After all of the patches have been applied to the respective
        directories,
        do the below.
        . build/envsetup.sh
        lunch cm_goldfish-eng
        mka goldfish

        When I try "mka goldfish", it says:make: *** No rule to make
        target `goldfish'. Stop.
        Is there something wrong?


        ------------------ Original ------------------
        *From: *
        ""<ubuntu-phone-bounces+llrraa=qq.com@xxxxxxxxxxxxxxxxxxx
        <mailto:qq.com@xxxxxxxxxxxxxxxxxxx>>;
        *Date: * Wed, Jun 19, 2013 10:52 PM
        *To: * "ubuntu-phone"<ubuntu-phone@xxxxxxxxxxxxxxxxxxx
        <mailto:ubuntu-phone@xxxxxxxxxxxxxxxxxxx>>;
        *Subject: * Re: [Ubuntu-phone] Ubuntu Touch on Emulator

          * *I really want to make the emulator work. But the
            discussion is a little confused, can *Chirayu or Sergio
            make a more readable guide for this?
          * If the img files(e.g. ramdisk-recovery.img, sdcard image
            and saucy-preinstalled-touch-armhf.zip) are shared, it
            would be much better.
          * *
            *
          * *To*: Ubuntu Touch <ubuntu-phone@xxxxxxxxxxxxxxxxxxx
            <mailto:ubuntu-phone@DOMAIN.HIDDEN>>
          * *From*: Chirayu Desai <chirayudesai1@xxxxxxxxx
            <mailto:chirayudesai1@DOMAIN.HIDDEN>>
          * *Date*: Mon, 17 Jun 2013 08:49:01 +0530
          * *In-reply-to*:
            <CAMso8J8GQJ-OEKXQ8X8r-LBLpkWc82_cm2Rk5wiZRA=Aau8W3w@xxxxxxxxxxxxxx
            <mailto:Aau8W3w@xxxxxxxxxxxxxx>>

        On 17 June 2013 06:36, Sergio Schvezov <sergio.schvezov@xxxxxxxxxxxxx>wrote:

        > On Sat, Jun 15, 2013 at 12:44 AM, Chirayu Desai <chirayudesai1@xxxxxxxxx>
        > wrote:
        > >
        > >
        > > On 15 June 2013 02:24, Sergio Schvezov <sergio.schvezov@xxxxxxxxxxxxx>
        > > wrote:
        > >>
        > >> On Tue, Jun 11, 2013 at 11:17 AM, Chirayu Desai <
        > chirayudesai1@xxxxxxxxx>
        > >> wrote:
        > >> > Hey everyone.
        > >> >
        > >> > I've got Ubuntu booting on the Android Emulator (QEMU).
        > >> > The display is black, but I'm able to get a shell, so I think that's
        > >> > good
        > >> > enough for a start.
        > >>
        > >> Yup looks like a good start.
        > >
        > > :)
        > >>
        > >>
        > >> > It needs forking of two repositories from CyanogenMod:
        > >> >https://github.com/CyanogenMod/android_sdk/tree/cm-10.1
        > >> >https://github.com/CyanogenMod/android_kernel_goldfish
        > >> >
        > >> > build/ and bootable/recovery were merged from CyanogenMod, and then
        > the
        > >> > below patches were applied.
        > >> > build/ merges with a minor conflict in tools/roomservice.py, which is
        > >> > easily
        > >> > fixable.
        > >> > Same for bootable/recovery, minor conflict in recovery.c
        > >> >
        > >> > Patches:
        > >> > bootable/recovery/
        > >> >https://gist.github.com/chirayudesai/5fb848f0b22a12990613
        > >>
        > >> Not sure this is needed since the we aren't including su in our
        > >> phablet-10.1 branch[1]
        > >
        > >
        > > It will be needed if you merge from CyanogenMod, and I would prefer that
        > > since we've got bug fixes from AOSP, some of our own, and some nice
        > features
        > > :)
        > >
        > > Or we could start adbd in init.recovery.goldfish.rc
        >
        > I'm leaving this open until I find out how the recovery work is
        > progressing[0], I'll be resolving this tomorrow (Monday).
        >
        Okay.

        >
        > >>
        > >> > build/
        > >> >https://gist.github.com/chirayudesai/7805698423d89e46c1a3
        > >>
        > >> Good, locally applied (going to push soon)
        > >>
        > >> > device/generic/goldfish/
        > >> >https://gist.github.com/chirayudesai/b9008fd57e7b21abbee1
        > >>
        > >> Good
        > >>
        > >> > kernel/goldfish
        > >> >https://gist.github.com/chirayudesai/00607ba8b0856e37754c
        > >>
        > >> And here's the problem, let me explain further down.
        > >>
        > >> >https://gist.github.com/chirayudesai/3a4583e83ad68b47363e  - needed to
        > >> > get
        > >> > ADB working.
        > >>
        > >> This link is broken.
        > >
        > > Yep, not needed, ignore it
        > >>
        > >>
        > >> > After all of the patches have been applied to the respective
        > >> > directories, do
        > >> > the below.
        > >> > . build/envsetup.sh
        > >> > lunch cm_goldfish-eng
        > >> > mka goldfish
        > >>
        > >> This works but I like to breakfast and brunch :-)
        > >
        > > breakfast will pick userdebug, but we usually use eng for the emulator.
        > > brunch won't work, since it runs make bacon, and otapackage isn't a
        > target
        > > for the emulator
        >
        > You are right, but breakfast provides me with roomservice :-)
        >
        breakfast calls lunch, so breakfast foo will run lunch cm_foo-userdebug.
        breakfast cm_goldfish-eng works too, and that'll have the same behaviour as
        lunch.
        It's lunch which runs roomservice, so either of this works.

        >
        > >> > This will build everything needed.
        > >> > Next, make a sdcard image using the `mksdcard` tool, which is used to
        > >> > install "saucy-preinstalled-touch-armhf.zip"
        > >> > Boot emulator into recovery with `emulator -partition-size 4096
        > -ramdisk
        > >> > $OUT/ramdisk-recovery.img -sdcard <path-to-sdcard>`
        > >> > Push the zip to /sdcard, and install it.
        > >> > After that, exit the emulator, and start it again with` emulator
        > >> > -partition-size 4096`
        > >> > `adb -e shell` will give you a shell :)
        > >>
        > >> The bullet proof test missing was to ubuntu_chroot or just chroot into
        > >> /data/ubuntu...
        > >> You will probably not be able to do anything since glibc
        > >> MIN_KERNEL_SUPPORTED := 2.6.32
        > >>
        > >>
        > >> And the kernel for the emulator in that repo is 2.6.29
        > >
        > >
        > > I was able to do that, the default branch in that repository[1] contains
        > the
        > > 3.4 kernel, and while I initially tested with 2.6.29, I switched to 3.4
        > as
        > > soon as I hit that
        > >
        > >>
        > >> Any further thoughts on this?
        >
        > Ok, so the build[1], device[2] and kernel[3] tree are in.
        > I've also added a cm.dependency of CyanogenMod/android_sdk to the device.
        >

        Thanks :)

        >
        > Let's see how this progresses :-)
        >

        I had merged CyanogenMod trees locally, so I forgot one patch to build/
        [0].

        >
        > Cheers
        > Sergio
        >
        > [0]
        https://github.com/CyanogenMod/android_build/commit/0f5bb3af4b3a14421885125ce4f9fba328b9bdd8.patch


        --
        Mailing list: https://launchpad.net/~ubuntu-phone
        <https://launchpad.net/%7Eubuntu-phone>
        Post to : ubuntu-phone@xxxxxxxxxxxxxxxxxxx
        <mailto:ubuntu-phone@xxxxxxxxxxxxxxxxxxx>
        Unsubscribe : https://launchpad.net/~ubuntu-phone
        <https://launchpad.net/%7Eubuntu-phone>
        More help : https://help.launchpad.net/ListHelp



    --
    Mailing list: https://launchpad.net/~ubuntu-phone
    <https://launchpad.net/%7Eubuntu-phone>
    Post to     : ubuntu-phone@xxxxxxxxxxxxxxxxxxx
    <mailto:ubuntu-phone@xxxxxxxxxxxxxxxxxxx>
    Unsubscribe : https://launchpad.net/~ubuntu-phone
    <https://launchpad.net/%7Eubuntu-phone>
    More help   : https://help.launchpad.net/ListHelp




--
-Joey Jiao




References