在模拟器上编译并运行CM 10.2(GOLDFISH)

时间:2013-10-29 14:01:41

标签: android build cyanogenmod

我想在模拟器上构建并运行CyanongenMod 10.2。首先,我的开发者机器还可以(它为crespo构建CM 10.2,为摩托罗拉Defy构建CM分支......为三星p4平板电脑构建CM 10.1)。

为了为模拟器构建CM 10.2,我执行以下步骤: 早餐金鱼:下载内核和金鱼相关的东西 mka:做一个完整的版本 构建完成:所有.img文件都在$ OUT文件夹中。似乎一切都好......但是如果我运行“emulator -show-kernel”它会阻塞很多错误:

init: could not import file '/init.carrier.rc' from '/init.rc'
init: do_chown: Could not access /selinux/booleans
init: do_chown: Could not access /sys/fs/selinux/booleans
init: cannot open '/initlogo.rle'
yaffs: dev is 32505856 name is "mtdblock0"
yaffs: passed flags ""
yaffs: Attempting MTD mount on 31.0, "mtdblock0"
block 1177 is bad
block 1182 is bad
yaffs: dev is 32505857 name is "mtdblock1"
yaffs: passed flags ""
yaffs: Attempting MTD mount on 31.1, "mtdblock1"
yaffs_read_super: isCheckpointed 0
yaffs: dev is 32505858 name is "mtdblock2"
yaffs: passed flags ""
yaffs: Attempting MTD mount on 31.2, "mtdblock2"
yaffs_read_super: isCheckpointed 0
fs_mgr: Cannot mount filesystem on /dev/block/mtdblock0 at /system
init: fs_mgr_mount_all returned an error
yaffs tragedy: no more erased blocks
[....]
yaffs tragedy: no more erased blocks
init: cannot find '/system/bin/sysinit', disabling 'sysinit'
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/auditd', disabling 'auditd'
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'
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/bin/keystore', disabling 'keystore'
init: cannot find '/system/bin/handle_compcache', disabling 'compcache'
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: cannot find '/system/bin/sh', disabling 'console'

EXT4图像文件似乎出错了:模拟器不接受EXT4文件系统但只接受yaffs?

问题很简单:是否可以在模拟器上运行CM构建?

2 个答案:

答案 0 :(得分:1)

是的,我和你有同样的问题,然后我运行命令:

mkyaffs2image -f out/target/product/generic/system out/target/product/generic/system_yaffs2.img

emulator -kernel out/target/product/generic/zImage  -system out/target/product/generic/system_yaffs2.img -ramdisk out/target/product/generic/ramdisk.img -data out/target/product/generic/data_yaffs2.img -partition-size 1024  -show-kernel -verbose

等几分钟,可以启动模拟器。

但是ril服务似乎是coredump,所以3G网络将无法工作。我正在寻找如何解决这个问题。

答案 1 :(得分:0)

我尝试另一种方式: *)编辑system / core / rootdir / init.rc文件并更改mount命令:

on fs
# mount mtd partitions
    # Mount /system rw first to give the filesystem a chance to save a checkpoint
    mount ext4 mtd@system /system
    mount ext4 mtd@system /system ro remount
    mount ext4 mtd@userdata /data nosuid nodev
    mount ext4 mtd@cache /cache nosuid nodev

输出结果为:

fs_mgr: Cannot mount filesystem on /dev/block/mtdblock0 at /system
init: fs_mgr_mount_all returned an error
init: cannot find '/system/bin/sysinit', disabling 'sysinit'
init: Unable to open persistent property directory /data/property errno: 2
init: cannot find '/system/bin/servicemanager', disabling 'servicemanager'

*)使用前面的init.rc文件,从GIT源编译一个新的金鱼内核并编辑.config文件

CONFIG_EXT4_FS=y
CONFIG_EXT4_USE_FOR_EXT23=y
CONFIG_EXT4_FS_XATTR=y
CONFIG_EXT4_FS_POSIX_ACL=y
CONFIG_EXT4_FS_SECURITY=y

然后使用“emulator -show-kernel -kernel~ / goldfish / arch / arm / boot / zImage”运行模拟器

输出结果为:

init: could not import file '/init.carrier.rc' from '/init.rc'
init (1): /proc/1/oom_adj is deprecated, please use /proc/1/oom_score_adj instead.
init: do_chown: Could not access /selinux/booleans
init: cannot open '/initlogo.rle'
goldfish_nand_read: invalid read, start 0, len 200, dev_size 21560000, write_size 800
end_request: I/O error, dev mtdblock0, sector 2
EXT4-fs (mtdblock0): unable to read superblock
goldfish_nand_read: invalid read, start 0, len 200, dev_size c200000, write_size 800
end_request: I/O error, dev mtdblock1, sector 2
EXT4-fs (mtdblock1): unable to read superblock
goldfish_nand_read: invalid read, start 0, len 200, dev_size 4000000, write_size 800
end_request: I/O error, dev mtdblock2, sector 2
EXT4-fs (mtdblock2): unable to read superblock
goldfish_nand_read: invalid read, start 0, len 200, dev_size 21560000, 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: cannot find '/system/bin/sysinit', disabling 'sysinit'