emulator命令启动模拟器失败

Young_2717 2012-06-06 06:22:17
编译完android系统后,在/out/target/product/filename目录中生成了img文件(system.img userdata.img ramdisk.img uImage)想用emulator启动编译好的内核,
于是输入命令:
emulator -image system.img -data userdata.img -ramdisk ramdisk.img

这时出现了以下警告:
emulator: WARNING: Please note that -image is obsolete and that -system is now used to point
to the system image. Next time, try using '-sysdir <path> -system <file>' instead.

emulator: WARNING: system partition size adjusted to match image file (200 MB > 66 MB)

emulator: WARNING: Unable to create sensors port: Connection refused
emulator: emulator window was out of view and was recentered
弹出的模拟器一直黑屏,启动没成功,开始以为是WARNING: system partition size adjusted to match image file (200 MB > 66 MB)这个问题产生的
于是又输入以下命令:
emulator -image system.img -data userdata.img -ramdisk ramdisk.img -partition-size 210

这时出现的警告又变了:
emulator: WARNING: Please note that -image is obsolete and that -system is now used to point
to the system image. Next time, try using '-sysdir <path> -system <file>' instead.

emulator: WARNING: Unable to create sensors port: Connection refused
弹出的模拟器还是一直黑屏

怀疑是不是因为没加上内核的关系,于是输入以下命令:
emulator -image system.img -data userdata.img -ramdisk ramdisk.img -partition-size 210 -kernel uImage

感觉这时应该能启动了吧,却又报错:
emulator: WARNING: Please note that -image is obsolete and that -system is now used to point
to the system image. Next time, try using '-sysdir <path> -system <file>' instead.

emulator: WARNING: Unable to create sensors port: Connection refused
qemu: fatal: Trying to execute code outside RAM or ROM at 0x10008000

R00=00000000 R01=000005a1 R02=00000100 R03=00000000
R04=00000000 R05=00000000 R06=00000000 R07=00000000
R08=00000000 R09=00000000 R10=00000000 R11=00000000
R12=00000000 R13=00000000 R14=00000000 R15=10008000
PSR=400001d3 -Z-- A svc32
已放弃

这时模拟器启动之后又快速退出,连黑屏都省了直接异常退出!!!!!!!

该怎么解决这个问题呢?????

...全文
2657 10 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
10 条回复
切换为时间正序
请发表友善的回复…
发表回复
amdxypf123 2014-08-05
  • 打赏
  • 举报
回复
LZ还在么,我也遇到类似的我问题,不过一直提示段错误!相信两年之后的现在LZ应该也是大牛了~求指导啊
Jake_Rio_Smart 2012-08-27
  • 打赏
  • 举报
回复
具体怎么做啊?
努力的大军 2012-08-19
  • 打赏
  • 举报
回复
我也是这个问题,你这个问题解决了吗?你的QQ是多少啊!
Young_2717 2012-06-07
  • 打赏
  • 举报
回复
[Quote=引用 3 楼 的回复:]

几次提示你的try using '-sysdir <path> -system <file>' instead.
你的这个system.img能不能改一下
[/Quote]
按提示输入命令:
emulator -sysdir /android/out/target/product/xbroad/ -system system.img -data userdata.img -ramdisk ramdisk.img -partition-size 210 -kernel uImage

发现emulator报错:
emulator: WARNING: Unable to create sensors port: Connection refused
qemu: fatal: Trying to execute code outside RAM or ROM at 0x10008000

R00=00000000R01=000005a1 R02=00000100 R03=00000000
R04=00000000 R05=00000000 R06=00000000 R07=00000000
R08=00000000 R09=00000000 R10=00000000 R11=00000000
R12=00000000 R13=00000000 R14=00000000 R15=10008000
PSR=400001d3 -Z-- A svc32
已放弃

这时模拟器都直接退出了,是不是我的kernel的问题??
aSysBang 2012-06-07
  • 打赏
  • 举报
回复
src的根目录。。。
make 之后不换目录,直接emulator
仔细看看官方说明吧。。
Young_2717 2012-06-07
  • 打赏
  • 举报
回复
[Quote=引用 2 楼 的回复:]

4.0代码 make 之后 直接emulator
[/Quote]试过,这个不行呢,我是直接在system.img目录直接emulator,提示:
emulator: ERROR: You did not provide the name of an Android Virtual Device
with the '-avd <name>' option. Read -help-avd for more information.
加上我配置好的AVD名称之后启动的是以前SDk配置好的模拟器,根本不是我编译好的内核,不过我编译的源码确实是4.0.3,是不是我的操作不当?
Young_2717 2012-06-07
  • 打赏
  • 举报
回复
好像是找到问题了,我编译的源码内核不是基于goldfish,而是直接是硬件设备上的映像,而且源码已经把goldfish部分砍掉了,这样的话是不是我不下载goldfish源码就没办法在emulator上运行了?
franzhong 2012-06-06
  • 打赏
  • 举报
回复
几次提示你的try using '-sysdir <path> -system <file>' instead.
你的这个system.img能不能改一下
aSysBang 2012-06-06
  • 打赏
  • 举报
回复
4.0代码 make 之后 直接emulator
Young_2717 2012-06-06
  • 打赏
  • 举报
回复
本人分不多,还请各位不吝赐教!!谢谢大家!

80,471

社区成员

发帖
与我相关
我的任务
社区描述
移动平台 Android
androidandroid-studioandroidx 技术论坛(原bbs)
社区管理员
  • Android
  • yechaoa
  • 失落夏天
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧